Closed Yaodada12 closed 8 months ago
It might be related to this one: https://github.com/coqui-ai/TTS/commit/36143fee2625aac6c6b3f7c7d0e0b7d75800167a
If the speaker_file_path is None, it will try to load os.path.join(checkpoint_dir, "speakers_xtts.pth") If checkoint_dir is also None, because it's an optional parameter it will throw an exception because checkpoint_dir is not a path but None.
Then will fail in if os.path.exists(speaker_file_path): because the
It might be related to this one: 36143fe
If the speaker_file_path is None, it will try to load os.path.join(checkpoint_dir, "speakers_xtts.pth") If checkoint_dir is also None, because it's an optional parameter it will throw an exception because checkpoint_dir is not a path but None.
Then will fail in if os.path.exists(speaker_file_path): because the
you are right, I can't find the speaker_file_path in model dir,this model is not officially open sourced by coqui-ai
I solved the problem by delete the "tts_models/multilingual/multi-dataset/xtts_v2" model path and install tts0.22.0 ,it will redownload the model.Then you can get the speakers_xtts.pth I don't know why sometimes it didn't download all the files.
from TTS.api import TTS
print(TTS().list_models())
model_name = TTS().list_models().list_models()[0]
print(model_name)
tts = TTS(model_name).to('cuda')
tts.tts_to_file("你好,这是一个测试。这也是一个测试。",speaker=tts.speakers[0], language='zh-cn',file_path="output.wav")
sometimes it didn't download all th
大佬666,你有尝试过用这套代码训练单个人的语音吗?
I solved the problem by delete the "tts_models/multilingual/multi-dataset/xtts_v2" model path and install tts0.22.0 ,it will redownload the model.Then you can get the speakers_xtts.pth I don't know why sometimes it didn't download all the files.
from TTS.api import TTS print(TTS().list_models()) model_name = TTS().list_models().list_models()[0] print(model_name) tts = TTS(model_name).to('cuda') tts.tts_to_file("你好,这是一个测试。这也是一个测试。",speaker=tts.speakers[0], language='zh-cn',file_path="output.wav")
根据你说的重新下载模型,speakers_xtts.pth确实下载了,但是又报错“ 'TTS' object has no attribute 'speakers'”
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
when I use tts_models/multilingual/multi-dataset/xtts_v2, speaker cannot be specified.
To Reproduce
Expected behavior
no error
Logs
Additional context
No response