Spaces:
Running
Running
| from transformers import pipeline | |
| import gradio as gr | |
| # Explicitly set the task | |
| pipe = pipeline("automatic-speech-recognition", model="nambn0321/ASR_french_3") | |
| def transcribe(audio): | |
| text = pipe(audio)["text"] | |
| return text | |
| iface = gr.Interface( | |
| fn=transcribe, | |
| inputs=gr.Audio(type="filepath"), # Removed source="microphone" | |
| outputs="text", | |
| title="Whisper Small French", | |
| description="Realtime demo for French speech recognition using a fine-tuned Whisper small model.", | |
| ) | |
| iface.launch() | |