asr_arabic / app.py
elina12's picture
Update app.py
7d8dcd3
raw
history blame
352 Bytes
from transformers import pipeline
import gradio as gr
import os
#add
pipe = pipeline(model="jonatasgrosman/wav2vec2-large-xlsr-53-arabic")
def transcribe(audio):
text = pipe(audio)["text"]
return text
iface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(source="upload", type="filepath"),
outputs="text",
)
iface.launch()