Spaces:
Sleeping
Sleeping
File size: 364 Bytes
711a34a 0fb5565 711a34a 0fb5565 711a34a 0fb5565 711a34a |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import gradio as gr
from transformers import pipeline
model = "openai/whisper-small"
pipe = pipeline("automatic-speech-recognition", model=model)
def transcribe(audio):
transcription = pipe(audio)["text"]
return transcription
demo = gr.Interface(fn=transcribe, inputs=gr.inputs.Audio(source="microphone", type="filepath"), outputs="text")
demo.launch()
|