mirror of https://github.com/coqui-ai/TTS.git
fix(api): handle missing attribute in is_multilingual
This commit is contained in:
parent
55c7063724
commit
91087205d2
|
@ -99,7 +99,7 @@ class TTS(nn.Module):
|
||||||
isinstance(self.model_name, str)
|
isinstance(self.model_name, str)
|
||||||
and "xtts" in self.model_name
|
and "xtts" in self.model_name
|
||||||
or self.config
|
or self.config
|
||||||
and ("xtts" in self.config.model or len(self.config.languages) > 1)
|
and ("xtts" in self.config.model or "languages" in self.config and len(self.config.languages) > 1)
|
||||||
):
|
):
|
||||||
return True
|
return True
|
||||||
if hasattr(self.synthesizer.tts_model, "language_manager") and self.synthesizer.tts_model.language_manager:
|
if hasattr(self.synthesizer.tts_model, "language_manager") and self.synthesizer.tts_model.language_manager:
|
||||||
|
@ -168,9 +168,7 @@ class TTS(nn.Module):
|
||||||
self.synthesizer = None
|
self.synthesizer = None
|
||||||
self.model_name = model_name
|
self.model_name = model_name
|
||||||
|
|
||||||
model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name(
|
model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name(model_name)
|
||||||
model_name
|
|
||||||
)
|
|
||||||
|
|
||||||
# init synthesizer
|
# init synthesizer
|
||||||
# None values are fetch from the model
|
# None values are fetch from the model
|
||||||
|
|
Loading…
Reference in New Issue