Update app.py
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ async def respond(audio):
|
|
72 |
voices = await VoicesManager.create()
|
73 |
voice = voices.find(Gender="Male", Locale="en-GB")
|
74 |
|
75 |
-
communicate = edge_tts.Communicate(
|
76 |
|
77 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
|
78 |
tmp_path = tmp_file.name
|
@@ -125,7 +125,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
125 |
|
126 |
#with gr.Row():
|
127 |
# translate_btn = gr.Button("Response")
|
128 |
-
# translate_btn.click(
|
129 |
|
130 |
with gr.Row():
|
131 |
user_input = gr.Textbox(label="Your Question", value="Dr. Watson can you summarize your adventures with Sherlock Holmes?")
|
|
|
72 |
voices = await VoicesManager.create()
|
73 |
voice = voices.find(Gender="Male", Locale="en-GB")
|
74 |
|
75 |
+
communicate = edge_tts.Communicate(reply, random.choice(voice)["Name"])
|
76 |
|
77 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
|
78 |
tmp_path = tmp_file.name
|
|
|
125 |
|
126 |
#with gr.Row():
|
127 |
# translate_btn = gr.Button("Response")
|
128 |
+
# translate_btn.click(fn=respond, inputs=[input], outputs=[output], api_name=False)
|
129 |
|
130 |
with gr.Row():
|
131 |
user_input = gr.Textbox(label="Your Question", value="Dr. Watson can you summarize your adventures with Sherlock Holmes?")
|