-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[Bug] list_speaker_idx
and throws error (CLI, v0.22.0)
#3434
Comments
Do you have speakers_xtts.pth file? I would check that first. |
Seeing similar/same issue using Docker container on Ubuntu `tts --list_speaker_idxs results in:
|
I have a similar problem. My code is as follows: import torch
from TTS.api import TTS
# Get device
DEVICE: str = "cuda" if torch.cuda.is_available() else "cpu"
# Init TTS
tts: TTS = TTS(model_name="tts_models/multilingual/multi-dataset/xtts_v2").to(DEVICE)
if tts.is_multi_speaker:
print(tts.speakers) Then, I got the error: So I checked the source code of @property
def speakers(self):
if not self.is_multi_speaker:
return None
return self.synthesizer.tts_model.speaker_manager.speaker_names I ran it again using the implementation in the source code: print(tts.synthesizer.tts_model.speaker_manager.speaker_names) And a new error was: AttributeError: 'dict_keys' object has no attribute 'keys' Then again I checked the source code of @property
def speaker_names(self):
return list(self.name_to_id.keys()) And I tried to know what print(tts.synthesizer.tts_model.speaker_manager.name_to_id)
>>> dict_keys(['Claribel Dervla', 'Daisy Studious', ... , 'Marcos Rudaski']) So, if I use print(list(tts.synthesizer.tts_model.speaker_manager.name_to_id))
>>> ['Claribel Dervla', 'Daisy Studious', ...'Marcos Rudaski'] It's certain that there's a problem in the code, but I'm not sure where it's caused by. Obviously, |
Had the same problem. You probably have an outdated version of the model checkpoint. The speaker data has been updated only 1 month ago. Quick solution: The new model will automatically be downloaded the next time you try to use it. |
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. |
Describe the bug
trying to list studio speakers from the CLI, and getting errors (macOS, CPU)
To Reproduce
Expected behavior
Logs
Additional context
No response
The text was updated successfully, but these errors were encountered: