From 0a3d1cc7ee03a85dd64c9ccc4774a170c4ea75bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Wed, 20 Oct 2021 18:11:36 +0000 Subject: [PATCH] Pass speaker manager to the model in synthesizer --- TTS/utils/synthesizer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TTS/utils/synthesizer.py b/TTS/utils/synthesizer.py index 9ecb5be9..6d394378 100644 --- a/TTS/utils/synthesizer.py +++ b/TTS/utils/synthesizer.py @@ -107,12 +107,12 @@ class Synthesizer(object): self.use_phonemes = self.tts_config.use_phonemes self.ap = AudioProcessor(verbose=False, **self.tts_config.audio) - self.tts_model = setup_tts_model(config=self.tts_config) + speaker_manager = self._init_speaker_manager() + + self.tts_model = setup_tts_model(config=self.tts_config, speaker_manager=speaker_manager) self.tts_model.load_checkpoint(self.tts_config, tts_checkpoint, eval=True) if use_cuda: self.tts_model.cuda() - speaker_manager = self._init_speaker_manager() - self.tts_model.speaker_manager = speaker_manager def _init_speaker_manager(self): """Initialize the SpeakerManager"""