EloiCampeny's picture
small error solve
06ed778
raw
history blame
No virus
367 Bytes
import gradio as gr
from transformers import pipeline
# audio2text
trans = pipeline("automatic-speech-recognition", model = "facebook/wav2vec2-large-xlsr-53-spanish")
def audio2text(audio):
text = trans(audio)["text"]
return text
gr.Interface(
fn=audio2text,
inputs = [gr.Audio(source="microphone", type="filepath")],
outputs=["textbox"]
).launch()