Spaces:
Runtime error
Runtime error
Commit
·
e8a6903
1
Parent(s):
1accebe
Update app.py
Browse files
app.py
CHANGED
@@ -15,21 +15,16 @@ with gr.Blocks() as demo:
|
|
15 |
""")
|
16 |
with gr.Tab("Audio File"):
|
17 |
with gr.Row().style(equal_height=True):
|
18 |
-
|
19 |
-
|
20 |
-
file_button = gr.Button("
|
21 |
with gr.Tab("Record"):
|
22 |
with gr.Row().style(equal_height=True):
|
23 |
-
|
24 |
-
|
25 |
rec_button = gr.Button("Run")
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
</div>
|
30 |
-
''')
|
31 |
-
|
32 |
-
file_button.click(speech, inputs=audio_input1, outputs=text_output1)
|
33 |
-
rec_button.click(speech, inputs=audio_input2, outputs=text_output2)
|
34 |
|
35 |
demo.launch()
|
|
|
15 |
""")
|
16 |
with gr.Tab("Audio File"):
|
17 |
with gr.Row().style(equal_height=True):
|
18 |
+
audio1 = gr.Audio(label="Audio File", type="filepath")
|
19 |
+
text1 = gr.Textbox(label="Transcribed text", show_label=True)
|
20 |
+
file_button = gr.Button("Run")
|
21 |
with gr.Tab("Record"):
|
22 |
with gr.Row().style(equal_height=True):
|
23 |
+
audio2 = gr.Audio(label="Input Audio", source="microphone", type="filepath")
|
24 |
+
text2 = gr.Textbox(label="Transcribed text", show_label=True)
|
25 |
rec_button = gr.Button("Run")
|
26 |
+
|
27 |
+
file_button.click(speech, inputs=audio1, outputs=text1)
|
28 |
+
rec_button.click(speech, inputs=audio2, outputs=text2)
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
demo.launch()
|