Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,13 +5,14 @@ modelo = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large
|
|
5 |
titulo = "Audio2Text"
|
6 |
descripcion = "Graba un audio en castellano y env铆alo para obtener la transcripci贸n"
|
7 |
|
|
|
8 |
def transcribe(audio):
|
9 |
text = modelo(audio)["text"]
|
10 |
return text
|
11 |
|
12 |
gr.Interface(
|
13 |
fn=transcribe,
|
14 |
-
inputs=
|
15 |
outputs=["textbox"],
|
16 |
title = titulo,
|
17 |
description = descripcion
|
|
|
5 |
titulo = "Audio2Text"
|
6 |
descripcion = "Graba un audio en castellano y env铆alo para obtener la transcripci贸n"
|
7 |
|
8 |
+
|
9 |
def transcribe(audio):
|
10 |
text = modelo(audio)["text"]
|
11 |
return text
|
12 |
|
13 |
gr.Interface(
|
14 |
fn=transcribe,
|
15 |
+
inputs=gr.Audio(source="microphone", type="filepath"),
|
16 |
outputs=["textbox"],
|
17 |
title = titulo,
|
18 |
description = descripcion
|