Spaces:
Build error
Build error
| # Imports | |
| import gradio as gr | |
| import whisper | |
| #Loading the model from openai Whisper | |
| model = whisper.load_model("base") | |
| # Defining the transcription function | |
| def transcribing(audio): | |
| text = model.transcribe(audio)["text"] | |
| return text | |
| # Defining the audio filepaths | |
| audio = gr.inputs.Audio(type="filepath") | |
| # Loading the gradio framwork | |
| iface = gr.Interface(fn=transcribing,inputs=audio, outputs="text", title="Transcribe.AI", description="Transcribe audiofiles with artificial intelligence.") | |
| iface.launch() | |