coqui-ai / TTS

🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production
http://coqui.ai
Mozilla Public License 2.0
33.99k stars 4.13k forks source link

[Bug] Install bug Failed to download the model file to tts_models--multilingual--multi-dataset--xtts_v2 #3665

Closed tigerzhanglaihu closed 3 months ago

tigerzhanglaihu commented 5 months ago

Describe the bug

Failed to download the model file to C:\Users\coman\AppData\Local\tts\tts_models--multilingual--multi-dataset--xtts_v2 Traceback (most recent call last): File "C:\Users\coman\AppData\Roaming\Python\Python311\site-packages\urllib3\connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\coman\AppData\Roaming\Python\Python311\site-packages\urllib3\util\connection.py", line 85, in create_connection raise err File "C:\Users\coman\AppData\Roaming\Python\Python311\site-packages\urllib3\util\connection.py", line 73, in create_connection sock.connect(sa)

To Reproduce

  1. Run the following command '...'
  2. use this code import torch from TTS.api import TTS

Get device

device = "cuda" if torch.cuda.is_available() else "cpu"

List available 🐸TTS models

print(TTS().list_models())

Init TTS

tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)

Run TTS

❗ Since this model is multi-lingual voice cloning model, we must set the target speaker_wav and language

Text to speech list of amplitude values as output

wav = tts.tts(text="Hello world!", speaker_wav="audio.wav", language="en")

Text to speech to a file

tts.tts_to_file(text="Hello world!", speaker_wav="audio.wav", language="en", file_path="output.wav") 3, > Failed to download the model file to C:\Users\coman\AppData\Local\tts\tts_models--multilingual--multi-dataset--xtts_v2 Traceback (most recent call last): File "C:\Users\coman\AppData\Roaming\Python\Python311\site-packages\urllib3\connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\coman\AppData\Roaming\Python\Python311\site-packages\urllib3\util\connection.py", line 85, in create_connection raise err File "C:\Users\coman\AppData\Roaming\Python\Python311\site-packages\urllib3\util\connection.py", line 73, in create_connection sock.connect(sa)

Expected behavior

Can an external link be provided to download the relevant model? There is no relevant information in the log either. I tried print url but there wasn't a real url either. To easy install.

Logs

No response

Environment

{
    "CUDA": {
        "GPU": [],
        "available": false,
        "version": null
    },
    "Packages": {
        "PyTorch_debug": false,
        "PyTorch_version": "2.2.2+cpu",
        "TTS": "0.22.0",
        "numpy": "1.26.4"
    },
    "System": {
        "OS": "Windows",
        "architecture": [
            "64bit",
            "WindowsPE"
        ],
        "processor": "Intel64 Family 6 Model 151 Stepping 5, GenuineIntel",
        "python": "3.11.8",
        "version": "10.0.19045"
    }
}

Additional context

No response

stale[bot] commented 4 months ago

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.