ORI-Muchim commited on
Commit
20a3dd9
·
verified ·
1 Parent(s): a82e053

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -27,6 +27,7 @@ def get_text(text, hps):
27
 
28
  def create_tts_fn(model, hps, speaker_ids):
29
  def tts_fn(text, speaker, speed, is_phoneme):
 
30
  if limitation:
31
  text_len = len(text)
32
  max_len = 500
@@ -88,11 +89,12 @@ if __name__ == '__main__':
88
  model_path = f"saved_model/model.pth"
89
  cover_path = f"saved_model/cover.png"
90
  hps = utils.get_hparams_from_file(config_path)
 
91
  model = SynthesizerTrn(
92
- len(hps.symbols),
93
- hps.data.filter_length // 2 + 1,
94
  hps.train.segment_size // hps.data.hop_length,
95
- n_speakers=hps.data.n_speakers,
96
  **hps.model.to(device))
97
  utils.load_checkpoint(model_path, model, None)
98
  model.eval()
 
27
 
28
  def create_tts_fn(model, hps, speaker_ids):
29
  def tts_fn(text, speaker, speed, is_phoneme):
30
+ print(speaker, text)
31
  if limitation:
32
  text_len = len(text)
33
  max_len = 500
 
89
  model_path = f"saved_model/model.pth"
90
  cover_path = f"saved_model/cover.png"
91
  hps = utils.get_hparams_from_file(config_path)
92
+
93
  model = SynthesizerTrn(
94
+ len(symbols),
95
+ posterior_channels,
96
  hps.train.segment_size // hps.data.hop_length,
97
+ n_speakers=hps.data.n_speakers, #- >0 for multi speaker
98
  **hps.model.to(device))
99
  utils.load_checkpoint(model_path, model, None)
100
  model.eval()