Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,8 @@ from transformers import pipeline
|
|
2 |
import gradio as gr
|
3 |
|
4 |
modelo = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-spanish")
|
|
|
|
|
5 |
|
6 |
def transcribe(audio):
|
7 |
text = modelo(audio)["text"]
|
@@ -10,5 +12,7 @@ def transcribe(audio):
|
|
10 |
gr.Interface(
|
11 |
fn=transcribe,
|
12 |
inputs=[gr.Audio(source="microphone", type="filepath")],
|
13 |
-
outputs=["textbox"]
|
|
|
|
|
14 |
).launch()
|
|
|
2 |
import gradio as gr
|
3 |
|
4 |
modelo = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-spanish")
|
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"]
|
|
|
12 |
gr.Interface(
|
13 |
fn=transcribe,
|
14 |
inputs=[gr.Audio(source="microphone", type="filepath")],
|
15 |
+
outputs=["textbox"],
|
16 |
+
title = titulo,
|
17 |
+
description = descripcion
|
18 |
).launch()
|