lampongyuen's picture
Update app.py
1dbebc5
raw
history blame
289 Bytes
import gradio as gr
from transformers import pipeline
p = pipeline("automatic-speech-recognition")
def transcribe(audio):
text = p(audio)["text"]
return text
gr.Interface(
fn=transcribe,
inputs=gr.Audio(source="microphone", type="filepath"),
outputs="text").launch()