Johnometalman's picture
Update app.py
1c54612 verified
raw
history blame contribute delete
356 Bytes
from transformers import pipeline
import gradio as gr
modelo = pipeline("automatic-speech-recognition", "facebook/wav2vec2-large-xlsr-53-spanish")
def transcribe(audio):
text = modelo(audio)["text"]
return text
# Crear la interfaz de Gradio
gr.Interface(
fn=transcribe,
inputs=gr.Audio(type="filepath"),
outputs="text"
).launch()