Spaces:
Running
Running
mrfakename
commited on
Commit
•
9154cc9
1
Parent(s):
1879049
Sync from GitHub repo
Browse filesThis Space is synced from the GitHub repo: https://github.com/SWivid/F5-TTS. Please submit contributions to the Space there
app.py
CHANGED
@@ -567,7 +567,7 @@ Have a conversation with an AI using your reference voice!
|
|
567 |
|
568 |
last_user_message, last_ai_response = history[-1]
|
569 |
if not last_ai_response:
|
570 |
-
return None
|
571 |
|
572 |
audio_result, _ = infer(
|
573 |
ref_audio,
|
@@ -579,7 +579,7 @@ Have a conversation with an AI using your reference voice!
|
|
579 |
speed=1.0,
|
580 |
show_info=print, # show_info=print no pull to top when generating
|
581 |
)
|
582 |
-
return audio_result
|
583 |
|
584 |
def clear_conversation():
|
585 |
"""Reset the conversation"""
|
@@ -603,7 +603,11 @@ Have a conversation with an AI using your reference voice!
|
|
603 |
).then(
|
604 |
generate_audio_response,
|
605 |
inputs=[chatbot_interface, ref_audio_chat, ref_text_chat, model_choice_chat, remove_silence_chat],
|
606 |
-
outputs=[audio_output_chat
|
|
|
|
|
|
|
|
|
607 |
)
|
608 |
|
609 |
# Handle clear button
|
|
|
567 |
|
568 |
last_user_message, last_ai_response = history[-1]
|
569 |
if not last_ai_response:
|
570 |
+
return None
|
571 |
|
572 |
audio_result, _ = infer(
|
573 |
ref_audio,
|
|
|
579 |
speed=1.0,
|
580 |
show_info=print, # show_info=print no pull to top when generating
|
581 |
)
|
582 |
+
return audio_result
|
583 |
|
584 |
def clear_conversation():
|
585 |
"""Reset the conversation"""
|
|
|
603 |
).then(
|
604 |
generate_audio_response,
|
605 |
inputs=[chatbot_interface, ref_audio_chat, ref_text_chat, model_choice_chat, remove_silence_chat],
|
606 |
+
outputs=[audio_output_chat],
|
607 |
+
).then(
|
608 |
+
lambda: None,
|
609 |
+
None,
|
610 |
+
audio_input_chat,
|
611 |
)
|
612 |
|
613 |
# Handle clear button
|