Neomindapp commited on
Commit
e7983a7
·
verified ·
1 Parent(s): 44aa222

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
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
- # Ensure the 'is_multi_lingual' attribute is set if it's not present
8
- if not hasattr(tts, 'is_multi_lingual'):
9
- tts.is_multi_lingual = False # Set to False since your model is not multilingual
 
 
 
 
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