Fix `num_char` init in Tacotron models

pull/719/head
Eren Gölge 2021-08-09 21:46:15 +00:00
parent e685ddfca7
commit 6af03ac476
4 changed files with 5 additions and 3 deletions

View File

@ -102,7 +102,8 @@
"tacotron2-DDC-GST":{
"github_rls_url": "https://github.com/coqui-ai/TTS/releases/download/v0.0.10/tts_models--zh-CN--baker--tacotron2-DDC-GST.zip",
"commit": "unknown",
"author": "@kirianguiller"
"author": "@kirianguiller",
"default_vocoder": null
}
}
},

View File

@ -208,7 +208,7 @@ def main():
if args.vocoder_name is not None and not args.vocoder_path:
vocoder_path, vocoder_config_path, _ = manager.download_model(args.vocoder_name)
# CASE3: set custome model paths
# CASE3: set custom model paths
if args.model_path is not None:
model_path = args.model_path
config_path = args.config_path

View File

@ -24,6 +24,7 @@ class Tacotron(BaseTacotron):
super().__init__(config)
self.num_chars, self.config = self.get_characters(config)
config.num_chars = self.num_chars
# pass all config fields to `self`
# for fewer code change

View File

@ -23,7 +23,7 @@ class Tacotron2(BaseTacotron):
super().__init__(config)
chars, self.config = self.get_characters(config)
self.num_chars = len(chars)
config.num_chars = len(chars)
self.decoder_output_dim = config.out_channels
# pass all config fields to `self`