From 6e980b49c404fdda3af487aa4b7c41e6d2bc471d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Mon, 10 May 2021 15:24:21 +0200 Subject: [PATCH] fix synthesizer.py for Coqpit --- TTS/utils/synthesizer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/TTS/utils/synthesizer.py b/TTS/utils/synthesizer.py index 7d418cb1..c7339d7b 100644 --- a/TTS/utils/synthesizer.py +++ b/TTS/utils/synthesizer.py @@ -113,12 +113,11 @@ class Synthesizer(object): # pylint: disable=global-statement global symbols, phonemes - self.tts_config = load_config(tts_config_path) self.use_phonemes = self.tts_config.use_phonemes self.ap = AudioProcessor(verbose=False, **self.tts_config.audio) - if "characters" in self.tts_config.keys(): + if self.tts_config.has('characters') and self.tts_config.characters: symbols, phonemes = make_symbols(**self.tts_config.characters) if self.use_phonemes: @@ -151,7 +150,7 @@ class Synthesizer(object): use_cuda (bool): enable/disable CUDA use. """ self.vocoder_config = load_config(model_config) - self.vocoder_ap = AudioProcessor(verbose=False, **self.vocoder_config["audio"]) + self.vocoder_ap = AudioProcessor(verbose=False, **self.vocoder_config.audio) self.vocoder_model = setup_generator(self.vocoder_config) self.vocoder_model.load_checkpoint(self.vocoder_config, model_file, eval=True) if use_cuda: