generativespeech / whisper.py
smartdigitalnetworks's picture
Create whisper.py
4e27bce verified
Raw
History Blame
282 Bytes
import gradio as gr
whisper = gr.load("models/openai/whisper-small")
def transcribe(audio):
return whisper(audio).replace("AutomaticSpeechRecognitionOutput(text=' ", "").replace("', chunks=None)", "")
gr.Interface(transcribe, gr.Audio(type="filepath"), gr.Textbox()).launch()