oyemade's picture
Update app.py
3b51746 verified
from transformers import pipeline
import gradio as gr
pipe = pipeline("automatic-speech-recognition", model="oyemade/w2v-bert-2.0-hausa-CV17.0")
def transcribe(audio):
text = pipe(audio)["text"]
return text
iface = gr.Interface(
transcribe,
gr.Audio(sources="microphone", type="filepath"),
"text",
title="Neoform AI: Hausa Speech Recognition",
description="Realtime demo for Hausa speech recognition using a fine-tuned Wav2Vec-Bert model. https://neofomai.com . NOTE: If you get an error after pressing submit, give the audio some secs to load then try again.",
)
iface.launch()