Transcribe.AI / app.py
samusander's picture
Update app.py
f4b1aae
raw
history blame
508 Bytes
# Imports
!pip install git+https://github.com/openai/whisper.git
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()