fix(api): handle missing attribute in is_multilingual

This commit is contained in:
Enno Hermann 2023-12-20 15:18:01 +01:00
parent f24f7c1237
commit 4e183c61df
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class TTS(nn.Module):
isinstance(self.model_name, str)
and "xtts" in self.model_name
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
if hasattr(self.synthesizer.tts_model, "language_manager") and self.synthesizer.tts_model.language_manager: