Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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()
|