Spaces:
Sleeping
Sleeping
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() | |