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

error in --list_speaker_idxs #760

Open
ghost opened this issue Dec 26, 2022 · 2 comments
Open

error in --list_speaker_idxs #760

ghost opened this issue Dec 26, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 26, 2022

Hello. I've installed tts via pip

tts --list_speaker_idxs generates the following error:

 > Available speaker ids: (Set --speaker_idx flag to one of these values to use the multi-speaker model.
Traceback (most recent call last):
  File "/home/user/.local/bin/tts", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.10/site-packages/TTS/bin/synthesize.py", line 333, in main
    print(synthesizer.tts_model.speaker_manager.name_to_id)
AttributeError: 'NoneType' object has no attribute 'name_to_id'
@shivammehta25
Copy link

If you are using a single-speaker model, a single-speaker model doesn't support speaker indexes, if you switch to any multispeaker model the command should work just fine! example:
tts --model_name tts_models/multilingual/multi-dataset/your_tts --list_speaker_idxs
Also when you install it via pip you get the https://github.com/coqui-ai/TTS maintained by the Coqui team and has more recent updates.

@Muhammad-Ali-Saqib
Copy link

I was doing

script  = 'hello this is the test audio.'
wav, alignment, _, _ = synthesis(model, script, C, "cuda" in str(next(model.parameters()).device), speaker_id=None, d_vector=target_emb, language_id=0).values()

and the error was

AttributeError: 'NoneType' object has no attribute 'name_to_id'

I have resolved that by setting language_id=None the final command will be

wav, alignment, _, _ = synthesis(model, script, C, "cuda" in str(next(model.parameters()).device), speaker_id=None, d_vector=target_emb, language_id=None).values()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants