Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
modelo=pipeline("automatic-speech-recognition",model="facebook/wav2vec2-large-xlar-53-spanish")
|
4 |
+
def transcribe(audio):
|
5 |
+
text=modelo(audio)["texto"]
|
6 |
+
return text
|
7 |
+
|
8 |
+
gr.Interface(
|
9 |
+
fn=transcribe,
|
10 |
+
inputs=[gr.Audio(source="microphone",type="filepath")],
|
11 |
+
).launch()
|