NCAIR-Yoruba / app.py
ayscript's picture
Create app.py
ba4f651 verified
raw
history blame contribute delete
590 Bytes
import gradio as gr
from transformers import pipeline
# Use the NCAIR Yoruba model
# This might require a slightly larger Space (CPU Upgrade) or might run slowly on Free Tier
transcriber = pipeline("automatic-speech-recognition", model="NCAIR1/Yoruba-ASR")
def transcribe(audio):
text = transcriber(audio)["text"]
return text
iface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(type="filepath"), # Upload or Record audio
outputs="text",
title="Yoruba Speech Transcriber",
description="Speak or upload Yoruba audio to transcribe it to text."
)
iface.launch()