Spaces:
Runtime error
Runtime error
from transformers import pipeline | |
import gradio as gr | |
modelo = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-spanish") | |
titulo = "Audio a texto" | |
desc = "Graba un audio (en español) y este será transcrito" | |
def transcribe(audio): | |
text = modelo(audio)["text"] | |
return text | |
gr.Interface( | |
transcribe, | |
inputs=[gr.Audio(source="microphone", type="filepath")], | |
outputs=["textbox"], | |
title=titulo, | |
description=desc, | |
).launch() |