TTS: [Bug] Unable to download models
Describe the bug
When I run the example the model is unable to download.
when I try to manually download the model from
https://coqui.gateway.scarf.sh/v0.10.1_models/tts_models--multilingual--multi-dataset--your_tts.zip
I get redirected to
https://huggingface.co/erogol/v0.10.1_models/resolve/main/tts_models--multilingual--multi-dataset--your_tts.zip
which says βRepository not foundβ
To Reproduce
Run the basic example for python
code:
from TTS.api import TTS
# Running a multi-speaker and multi-lingual model
# List available πΈTTS models and choose the first one
model_name = TTS.list_models()[0]
# Init TTS
tts = TTS(model_name)
# Run TTS
# β Since this model is multi-speaker and multi-lingual, we must set the target speaker and the language
# Text to speech with a numpy output
wav = tts.tts("This is a test! This is also a test!!", speaker=tts.speakers[0], language=tts.languages[0])
output:
zipfile.BadZipFile: File is not a zip file
### Expected behavior
Being able to download the pretrained models
### Logs
```shell
> Downloading model to /home/mb/.local/share/tts/tts_models--multilingual--multi-dataset--your_tts
0%| | 0.00/29.0 [00:00<?, ?iB/s] > Error: Bad zip file - https://coqui.gateway.scarf.sh/v0.10.1_models/tts_models--multilingual--multi-dataset--your_tts.zip
Traceback (most recent call last):
File "/home/mb/Documents/ai/TTS/TTS/utils/manage.py", line 434, in _download_zip_file
with zipfile.ZipFile(temp_zip_name) as z:
File "/usr/lib/python3.10/zipfile.py", line 1267, in __init__
self._RealGetContents()
File "/usr/lib/python3.10/zipfile.py", line 1334, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mb/Documents/ai/tts/main.py", line 8, in <module>
tts = TTS(model_name)
File "/home/mb/Documents/ai/TTS/TTS/api.py", line 289, in __init__
self.load_tts_model_by_name(model_name, gpu)
File "/home/mb/Documents/ai/TTS/TTS/api.py", line 385, in load_tts_model_by_name
model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name(
File "/home/mb/Documents/ai/TTS/TTS/api.py", line 348, in download_model_by_name
model_path, config_path, model_item = self.manager.download_model(model_name)
File "/home/mb/Documents/ai/TTS/TTS/utils/manage.py", line 303, in download_model
self._download_zip_file(model_item["github_rls_url"], output_path, self.progress_bar)
File "/home/mb/Documents/ai/TTS/TTS/utils/manage.py", line 439, in _download_zip_file
raise zipfile.BadZipFile # pylint: disable=raise-missing-from
zipfile.BadZipFile
100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 29.0/29.0 [00:00<00:00, 185iB/s]
Environment
{
"CUDA": {
"GPU": [],
"available": false,
"version": "11.7"
},
"Packages": {
"PyTorch_debug": false,
"PyTorch_version": "2.0.1+cu117",
"TTS": "0.14.3",
"numpy": "1.23.5"
},
"System": {
"OS": "Linux",
"architecture": [
"64bit",
"ELF"
],
"processor": "x86_64",
"python": "3.10.6",
"version": "#202303130630~1685473338~22.04~995127e SMP PREEMPT_DYNAMIC Tue M"
}
}
Additional context
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 19 (1 by maintainers)
Same error
Here is my workaround for the docker usage. Seems their proxy urls in
.model.json
are broken.If youβve attempted to download any broken model links you probably need to clear them from
/root/.local/share/tts/
Replace the proxy urlβs with github release links:
Curious of the need to retarget these model downloads away from github.
Sorry, guys, we had a problem with our proxy. Now all is good.
If you manually download the zip you need to unpack it to the
~/.local/share/tts/{model name}
directory or you could try the automatic download again.Since the link for the model download is back I got it to work again by simply deleting the directory containing the corrupted zip files. In my case:
rm -rf ~/.local/share/tts/tts_models--en--ljspeech--tacotron2-DDC
in the TTS/models.json file in the repo the model links work fine (you can download them). but even if i download them manually i canβt get it to work. anyone try this ?