Added Custom Layout
Browse files
app.py
CHANGED
@@ -36,4 +36,53 @@ examples = [
|
|
36 |
"./examples/audio_4.mp3"
|
37 |
]
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
"./examples/audio_4.mp3"
|
37 |
]
|
38 |
|
39 |
+
title = "# 馃嚨馃嚲 Reconocimiento de Voz en Guaran铆"
|
40 |
+
|
41 |
+
description = """Esta es una demostraci贸n del reconocimiento de voz en Guaran铆 utilizando el modelo speech-to-text [Whisper](https://arxiv.org/pdf/2212.04356.pdf)
|
42 |
+
|
43 |
+
Autores:
|
44 |
+
- Mateo Andr茅s Fidabel Gill
|
45 |
+
- Santiago Ruben Acevedo Zarza
|
46 |
+
"""
|
47 |
+
|
48 |
+
audio_input = gr.Audio(value="./examples/audio_1.mp3",
|
49 |
+
sources=["upload", "microphone"],
|
50 |
+
label="馃帳 Audio a transcribir",
|
51 |
+
interactive=True)
|
52 |
+
|
53 |
+
transcription = gr.Textbox(label="馃摑 Transcripci贸n",
|
54 |
+
interactive=False)
|
55 |
+
|
56 |
+
with gr.Blocks() as demo:
|
57 |
+
|
58 |
+
with gr.Row():
|
59 |
+
# Model Title and Description
|
60 |
+
gr.Markdown(title)
|
61 |
+
gr.Markdown(description)
|
62 |
+
|
63 |
+
with gr.Row():
|
64 |
+
# Audio Input
|
65 |
+
audio_input.render()
|
66 |
+
|
67 |
+
with gr.Row():
|
68 |
+
# Text Output
|
69 |
+
transcription.render()
|
70 |
+
|
71 |
+
with gr.Row():
|
72 |
+
# Submit and Clear Buttons
|
73 |
+
submit = gr.Button("馃摑 Transcribir el Audio")
|
74 |
+
|
75 |
+
with gr.Row():
|
76 |
+
gr.Examples(examples=examples,
|
77 |
+
inputs=[audio_input],
|
78 |
+
outputs=[transcription],
|
79 |
+
fn=transcribe,
|
80 |
+
label="Ejemplos")
|
81 |
+
|
82 |
+
submit.click(transcribe,
|
83 |
+
inputs=[audio_input],
|
84 |
+
outputs = [transcription])
|
85 |
+
|
86 |
+
|
87 |
+
demo.queue()
|
88 |
+
demo.launch(share=True)
|