-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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] AttributeError: 'NoneType' object has no attribute 'load_wav' when using tts_with_vc_to_file #3143
Comments
@Aya-AlJafari can you look at this one? |
If anyone is still looking through this issue, you might want to take a look at #1440 |
@Aya-AlJafari any updates? |
@erogol The original issue (#3067) was people trying to use |
This reverts commit 041b4b6. Fixes coqui-ai#3143. The original issue (coqui-ai#3067) was people trying to use tts.tts_with_vc_to_file() with XTTS and was "fixed" in coqui-ai#3109. But XTTS has integrated VC and you can just do tts.tts_to_file(..., speaker_wav="..."), there is no point in passing it through FreeVC afterwards. So, reverting this commit because it breaks tts.tts_with_vc_to_file() for any model that doesn't have integrated VC, i.e. all models this method is meant for.
* Revert "fix for issue 3067" This reverts commit 041b4b6. Fixes #3143. The original issue (#3067) was people trying to use tts.tts_with_vc_to_file() with XTTS and was "fixed" in #3109. But XTTS has integrated VC and you can just do tts.tts_to_file(..., speaker_wav="..."), there is no point in passing it through FreeVC afterwards. So, reverting this commit because it breaks tts.tts_with_vc_to_file() for any model that doesn't have integrated VC, i.e. all models this method is meant for. * fix: support multi-speaker models in tts_with_vc/tts_with_vc_to_file * fix: only compute spk embeddings for models that support it Fixes #1440. Passing a `speaker_wav` argument to regular Vits models failed because they don't support voice cloning. Now that argument is simply ignored.
Describe the bug
Fix #3108 breaks
tts_with_vc_to_file
at least with VITS.See:
TTS/TTS/api.py
Line 463 in 6fef4f9
By changing the line from:
self.tts_to_file(text=text, speaker=None, language=language, file_path=fp.name,speaker_wav=speaker_wav)
To its pre-0.19.1 version:
self.tts_to_file(text=text, speaker=None, language=language, file_path=fp.name)
The issue is solved.
Please take a look at the script below for reproduction.
To Reproduce
Clone the Coqui TTS repository and install the dependencies as specified in the README file.
Then, run the following script from TTS's root directory, but replace
speaker_wav
with any audio file you have at hand:Expected behavior
The output audio file defined in
file_path
is generated, saying the sentence intext
with the voice cloned fromspeaker_wav
.Logs
Environment
- 🐸TTS Version: 0.19.1 - PyTorch Version: 2.1.0+cu121 - OS: Artix Linux Not using GPU. Installed everything through pip in a virtual environment created with pyenv.
Additional context
No response
The text was updated successfully, but these errors were encountered: