Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def audio_to_audio_chatbot(audio):
|
|
26 |
#speech = text_to_speech(response_text)
|
27 |
#return speech["audio"], response_text
|
28 |
|
29 |
-
if __name__ == "__main__":
|
30 |
"""
|
31 |
iface = gr.Interface(
|
32 |
fn=audio_to_audio_chatbot,
|
@@ -38,13 +38,12 @@ if __name__ == "__main__":
|
|
38 |
live=True # Aktiviert Streaming
|
39 |
)
|
40 |
"""
|
41 |
-
|
42 |
-
|
43 |
with gr.Row():
|
44 |
sr_outputs = gr.Textbox(label="Antwort")
|
45 |
with gr.Row():
|
46 |
sr_inputs = gr.Microphone(type="filepath")
|
47 |
sr_inputs.change(transcribe_audio, inputs=sr_inputs, outputs=sr_outputs)
|
48 |
|
49 |
-
|
50 |
|
|
|
26 |
#speech = text_to_speech(response_text)
|
27 |
#return speech["audio"], response_text
|
28 |
|
29 |
+
#if __name__ == "__main__":
|
30 |
"""
|
31 |
iface = gr.Interface(
|
32 |
fn=audio_to_audio_chatbot,
|
|
|
38 |
live=True # Aktiviert Streaming
|
39 |
)
|
40 |
"""
|
41 |
+
with gr.Blocks() as speech:
|
|
|
42 |
with gr.Row():
|
43 |
sr_outputs = gr.Textbox(label="Antwort")
|
44 |
with gr.Row():
|
45 |
sr_inputs = gr.Microphone(type="filepath")
|
46 |
sr_inputs.change(transcribe_audio, inputs=sr_inputs, outputs=sr_outputs)
|
47 |
|
48 |
+
speech.launch(fn=audio_to_audio_chatbot)
|
49 |
|