ASR_french / app.py
nambn0321's picture
Update app.py
1941cee verified
raw
history blame contribute delete
533 Bytes
from transformers import pipeline
import gradio as gr
# Explicitly set the task
pipe = pipeline("automatic-speech-recognition", model="bofenghuang/whisper-small-cv11-french")
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()