Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
recognize_model = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-spanish")
|
5 |
+
|
6 |
+
def trasncript(sound):
|
7 |
+
text= recognize_model(sound)["txt"]
|
8 |
+
return txt
|
9 |
+
|
10 |
+
gr.Interface(fn=trasncript, inputs=[gr.Audio(source="microphone", type="filepath")], outputs=["textbox"]).launch()
|