Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,13 @@ from TTS.api import TTS # Import TTS API
|
|
4 |
# Initialize TTS
|
5 |
tts = TTS(model_path="best_model.pth", config_path="config.json")
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
10 |
|
11 |
def generate_speech(text):
|
12 |
wav = tts.tts(text) # Ensure this is the correct method for generating speech
|
|
|
4 |
# Initialize TTS
|
5 |
tts = TTS(model_path="best_model.pth", config_path="config.json")
|
6 |
|
7 |
+
# Override the _check_arguments method to bypass the multilingual check
|
8 |
+
def _check_arguments_override(language):
|
9 |
+
# We bypass the check since this model is not multilingual
|
10 |
+
pass
|
11 |
+
|
12 |
+
# Override the method in the TTS instance
|
13 |
+
tts._check_arguments = _check_arguments_override
|
14 |
|
15 |
def generate_speech(text):
|
16 |
wav = tts.tts(text) # Ensure this is the correct method for generating speech
|