Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TTS().list_models() #3422

Closed
wants to merge 3 commits into from
Closed

Fix TTS().list_models() #3422

wants to merge 3 commits into from

Conversation

greerviau
Copy link

from TTS.api import TTS
print(TTS().list_models())

This currently throws an error because TTS.list_models() returns the ModelManager
Fix by calling list_models() on the model manager

I'm unsure if the functionality of TTS.list_models() was to return the ModelManager object, but this used to return a list of model names and currently does not.

@CLAassistant
Copy link

CLAassistant commented Dec 13, 2023

CLA assistant check
All committers have signed the CLA.

@FlorianEagox
Copy link
Contributor

Hi, just experienced this on the latest update.
you can do TTS().models just as list_models was before

But I propose we make it a static method or property if possible, because then you wouldn't have to initialize a TTS object just to list the models. That way you don't either have to reinitialize or do load_model_by_name after

@eginhard
Copy link
Contributor

Yes, now that the Coqui Studio functionality was removed from that method, it could be made static again.

TTS/api.py Outdated
@@ -122,8 +122,9 @@ def languages(self):
def get_models_file_path():
return Path(__file__).parent / ".models.json"

@staticmethod
def list_models(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def list_models(self):
def list_models():

You also need to sign the CLA for the PR to be merged.

Copy link

stale bot commented Jan 21, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

@stale stale bot added the wontfix This will not be worked on but feel free to help. label Jan 21, 2024
@stale stale bot closed this Jan 28, 2024
@eginhard
Copy link
Contributor

eginhard commented Apr 8, 2024

I've merged this into our fork, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on but feel free to help.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants