diff --git a/TTS/api.py b/TTS/api.py index abe9c56b25..992fbe69e9 100644 --- a/TTS/api.py +++ b/TTS/api.py @@ -120,8 +120,9 @@ def languages(self): def get_models_file_path(): return Path(__file__).parent / ".models.json" - def list_models(self): - return ModelManager(models_file=TTS.get_models_file_path(), progress_bar=False, verbose=False) + @staticmethod + def list_models(): + return ModelManager(models_file=TTS.get_models_file_path(), progress_bar=False, verbose=False).list_models() def download_model_by_name(self, model_name: str): model_path, config_path, model_item = self.manager.download_model(model_name)