From 02d88b5dec85c2c0c9f0ece787618cdcf1f243b0 Mon Sep 17 00:00:00 2001 From: Greer Date: Wed, 13 Dec 2023 00:21:39 -0500 Subject: [PATCH] Fix TTS().list_models() --- TTS/api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TTS/api.py b/TTS/api.py index 7abc188e74..ab3efd64f0 100644 --- a/TTS/api.py +++ b/TTS/api.py @@ -122,8 +122,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)