mirror of https://github.com/coqui-ai/TTS.git
Pass speaker manager to the model in synthesizer
This commit is contained in:
parent
588da1a24e
commit
0a3d1cc7ee
|
@ -107,12 +107,12 @@ class Synthesizer(object):
|
||||||
self.use_phonemes = self.tts_config.use_phonemes
|
self.use_phonemes = self.tts_config.use_phonemes
|
||||||
self.ap = AudioProcessor(verbose=False, **self.tts_config.audio)
|
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)
|
self.tts_model.load_checkpoint(self.tts_config, tts_checkpoint, eval=True)
|
||||||
if use_cuda:
|
if use_cuda:
|
||||||
self.tts_model.cuda()
|
self.tts_model.cuda()
|
||||||
speaker_manager = self._init_speaker_manager()
|
|
||||||
self.tts_model.speaker_manager = speaker_manager
|
|
||||||
|
|
||||||
def _init_speaker_manager(self):
|
def _init_speaker_manager(self):
|
||||||
"""Initialize the SpeakerManager"""
|
"""Initialize the SpeakerManager"""
|
||||||
|
|
Loading…
Reference in New Issue