anupam_speech / app.py
gradioapp's picture
Update app.py
50a66b5
raw
history blame
320 Bytes
pip install transformers
from transformers import pipeline
p = pipeline("automatic-speech-recognition")
def transcribe(audio):
text = p(audio)["text"]
return text
import gradio as gr
gr.Interface(
fn=transcribe,
inputs=gr.Audio(source="microphone", type="filepath"),
outputs="text").launch()