ychafiqui's picture
Create app.py
96b0587 verified
raw
history blame
438 Bytes
from transformers import pipeline
import gradio as gr
pipe = pipeline(model="ychafiqui/whisper-medium-darija")
def transcribe(audio):
text = pipe(audio)["text"]
return text
iface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(source="microphone", type="filepath"),
outputs="text",
title="Moroccan Darija Text-to-Speech",
description="Realtime demo for Moroccan Darija speech recognition.",
)
iface.launch()