Transcribe.AI / app.py
samusander's picture
Update app.py
fa3081f
raw
history blame
452 Bytes
# 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")
iface.launch()