Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
asr_model = pipeline("automatic-speech-recognition", model="openai/whisper-small") | |
def transcribe(audio_file): | |
transcription = asr_model(audio_file) | |
return transcription["text"] | |
iface = gr.Interface( | |
fn=transcribe, | |
inputs=gr.inputs.Audio(source="microphone", type="filepath"), | |
outputs="text" | |
) | |
iface.launch() |