Spaces:
Sleeping
Sleeping
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() |