babel-fish / app.py
hexular's picture
Add explicit input
e824905
raw
history blame
287 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3")
def transcribe(audio):
return pipe(audio)['text']
app = gr.Interface(transcribe, gr.Audio(sources=["microphone"]), outputs="textbox")
app.launch()