wgcv commited on
Commit
ac1226c
1 Parent(s): 3834f49

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import gradio as gr
3
+
4
+ model = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-spanish")
5
+ def transcribe(audio):
6
+ texto = model(audio)["text"]
7
+ return texto
8
+
9
+ app = gr.Interface(fn=transcribe, inputs=gr.Audio(sources=["microphone"], type="filepath", label="Record Audio"), outputs=["textbox"])
10
+ app.launch()