Spaces:
Running
on
Zero
Running
on
Zero
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
@@ -779,13 +779,13 @@ Have a conversation with an AI using your reference voice!
|
|
779 |
return conv_state
|
780 |
|
781 |
@gpu_decorator
|
782 |
-
def generate_audio_response(
|
783 |
"""Generate TTS audio for AI response"""
|
784 |
-
if not
|
785 |
return None, ref_text, seed_input
|
786 |
|
787 |
-
last_ai_response =
|
788 |
-
if not last_ai_response or
|
789 |
return None, ref_text, seed_input
|
790 |
|
791 |
# Determine the seed to use
|
|
|
779 |
return conv_state
|
780 |
|
781 |
@gpu_decorator
|
782 |
+
def generate_audio_response(conv_state, ref_audio, ref_text, remove_silence, randomize_seed, seed_input):
|
783 |
"""Generate TTS audio for AI response"""
|
784 |
+
if not conv_state or not ref_audio:
|
785 |
return None, ref_text, seed_input
|
786 |
|
787 |
+
last_ai_response = conv_state[-1]["content"]
|
788 |
+
if not last_ai_response or conv_state[-1]["role"] != "assistant":
|
789 |
return None, ref_text, seed_input
|
790 |
|
791 |
# Determine the seed to use
|