ulichovick's picture
Update app.py
c28ce88
raw
history blame
477 Bytes
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()