mirror of https://github.com/coqui-ai/TTS.git
Make style
This commit is contained in:
parent
bb46727733
commit
c1bda6778f
|
@ -45,4 +45,4 @@ def rehash_fairseq_vits_checkpoint(checkpoint_file):
|
||||||
new_chk[k.replace("dp.", "duration_predictor.")] = v
|
new_chk[k.replace("dp.", "duration_predictor.")] = v
|
||||||
else:
|
else:
|
||||||
new_chk[k] = v
|
new_chk[k] = v
|
||||||
return new_chk
|
return new_chk
|
||||||
|
|
|
@ -79,8 +79,6 @@ class BaseVocabulary:
|
||||||
idx: char for idx, char in enumerate(self._vocab) # pylint: disable=unnecessary-comprehension
|
idx: char for idx, char in enumerate(self._vocab) # pylint: disable=unnecessary-comprehension
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def init_from_config(config, **kwargs):
|
def init_from_config(config, **kwargs):
|
||||||
"""Initialize from the given config."""
|
"""Initialize from the given config."""
|
||||||
|
|
|
@ -146,7 +146,7 @@ class Synthesizer(object):
|
||||||
"""
|
"""
|
||||||
self.tts_config = VitsConfig()
|
self.tts_config = VitsConfig()
|
||||||
self.tts_model = Vits.init_from_config(self.tts_config)
|
self.tts_model = Vits.init_from_config(self.tts_config)
|
||||||
self.tts_model.load_fairseq_checkpoint(self.tts_config , checkpoint_dir=model_dir, eval=True)
|
self.tts_model.load_fairseq_checkpoint(self.tts_config, checkpoint_dir=model_dir, eval=True)
|
||||||
self.tts_config = self.tts_model.config
|
self.tts_config = self.tts_model.config
|
||||||
if use_cuda:
|
if use_cuda:
|
||||||
self.tts_model.cuda()
|
self.tts_model.cuda()
|
||||||
|
|
Loading…
Reference in New Issue