Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,6 +16,9 @@ def generate_tts(input_text, reference_audio_path, output_path="cloned.wav"):
|
|
| 16 |
if result == 3:
|
| 17 |
raise gr.Error("Input text blocked by moderation layer. Please ensure your text complies with our content guidelines by avoiding Sexual, Hate, Violence, Self-Harm content or Prompt Injection attempts.")
|
| 18 |
return output_path if result == 0 else None
|
|
|
|
|
|
|
|
|
|
| 19 |
except Exception as e:
|
| 20 |
time.sleep(1*(i+1))
|
| 21 |
print(e)
|
|
|
|
| 16 |
if result == 3:
|
| 17 |
raise gr.Error("Input text blocked by moderation layer. Please ensure your text complies with our content guidelines by avoiding Sexual, Hate, Violence, Self-Harm content or Prompt Injection attempts.")
|
| 18 |
return output_path if result == 0 else None
|
| 19 |
+
except gr.Error as e:
|
| 20 |
+
print(f"Gradio Error: {e}")
|
| 21 |
+
raise e
|
| 22 |
except Exception as e:
|
| 23 |
time.sleep(1*(i+1))
|
| 24 |
print(e)
|