Adoetz commited on
Commit
2f71191
·
verified ·
1 Parent(s): 73abcf8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -58,6 +58,11 @@ def initialize_or_update_tts(model_name):
58
  if global_tts is None or model_name != current_model_name:
59
  print(f"Loading model: {model_name}")
60
  global_tts = TTS(model_name=model_name, progress_bar=True)
 
 
 
 
 
61
  global_tts.to(device)
62
  current_model_name = model_name
63
  return global_tts
 
58
  if global_tts is None or model_name != current_model_name:
59
  print(f"Loading model: {model_name}")
60
  global_tts = TTS(model_name=model_name, progress_bar=True)
61
+
62
+ # Set the phonemizer to gruut (if the model supports it)
63
+ if hasattr(global_tts.synthesizer, 'phonemizer'):
64
+ global_tts.synthesizer.phonemizer = "gruut"
65
+
66
  global_tts.to(device)
67
  current_model_name = model_name
68
  return global_tts