Spaces:
Runtime error
Runtime error
File size: 477 Bytes
9de9d22 c28ce88 9de9d22 c28ce88 9de9d22 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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() |