Spaces:
Running
Running
fixed return values
Browse files
app.py
CHANGED
@@ -145,7 +145,7 @@ def generate_audio_with_voice(text, voice_key, speed_val):
|
|
145 |
|
146 |
if audio_np is None:
|
147 |
print("Audio generation failed.")
|
148 |
-
return None,
|
149 |
|
150 |
# Prepare audio for Gradio
|
151 |
sr = 24000 # Adjust based on your actual sampling rate
|
@@ -156,7 +156,7 @@ def generate_audio_with_voice(text, voice_key, speed_val):
|
|
156 |
|
157 |
except Exception as e:
|
158 |
print(f"Error in generate_audio_with_voice: {e}")
|
159 |
-
return None,
|
160 |
|
161 |
|
162 |
def build_modified_vector(voice_key, top6_values):
|
|
|
145 |
|
146 |
if audio_np is None:
|
147 |
print("Audio generation failed.")
|
148 |
+
return None, "Audio generation failed."
|
149 |
|
150 |
# Prepare audio for Gradio
|
151 |
sr = 24000 # Adjust based on your actual sampling rate
|
|
|
156 |
|
157 |
except Exception as e:
|
158 |
print(f"Error in generate_audio_with_voice: {e}")
|
159 |
+
return None, "An error occurred during audio generation."
|
160 |
|
161 |
|
162 |
def build_modified_vector(voice_key, top6_values):
|