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
34.7k stars 4.21k forks source link

[Bug] compute_embeddings.py fails to run on Windows #2428

Closed thoraxe closed 1 year ago

thoraxe commented 1 year ago

Describe the bug

Trying to run https://github.com/coqui-ai/TTS/blob/dev/TTS/bin/compute_embeddings.py results in "permission denied" errors on Windows.

To Reproduce

  1. create a dataset
  2. install TTS
  3. download the compute_embeddings.py
  4. run:
    (tts) C:\voice-cloning> python ./compute_embeddings.py --model_path=tts_models--multilingual--multi-dataset--your_tts/model_se.pth --config_path=tts_models--multilingual--multi-dataset--your_tts/config_se.json --formatter_name=ljspeech --dataset_name=stewart --dataset_path="C:/voice-cloning/stewart/"

Expected behavior

embeddings are computed

Logs

Traceback (most recent call last):
  File "C:\voice-cloning\compute_embeddings.py", line 161, in <module>
    compute_embeddings(
  File "C:\voice-cloning\compute_embeddings.py", line 43, in compute_embeddings
    meta_data_train, meta_data_eval = load_tts_samples(c_dataset, eval_split=not no_eval)
  File "C:\Users\erikm\Documents\voice-cloning\tts\lib\site-packages\TTS\tts\datasets\__init__.py", line 120, in load_tts_samples
    meta_data_train = formatter(root_path, meta_file_train, ignored_speakers=ignored_speakers)
  File "C:\Users\erikm\Documents\voice-cloning\tts\lib\site-packages\TTS\tts\datasets\formatters.py", line 158, in ljspeech
    with open(txt_file, "r", encoding="utf-8") as ttf:
PermissionError: [Errno 13] Permission denied: 'C:/voice-cloning/stewart/'

Environment

{
    "CUDA": {
        "GPU": [
            "NVIDIA GeForce RTX 3080"
        ],
        "available": true,
        "version": "11.8"
    },
    "Packages": {
        "PyTorch_debug": false,
        "PyTorch_version": "2.0.0+cu118",
        "TTS": "0.12.0",
        "numpy": "1.21.6"
    },
    "System": {
        "OS": "Windows",
        "architecture": [
            "64bit",
            "WindowsPE"
        ],
        "processor": "Intel64 Family 6 Model 151 Stepping 2, GenuineIntel",
        "python": "3.9.12",
        "version": "10.0.22000"
    }
}

Additional context

No response

p0p4k commented 1 year ago

try to run it in admin enabled cmd.

thoraxe commented 1 year ago

It produces the same error in terminals run as Administrator.

p0p4k commented 1 year ago

Try to run the compute_embeddings function in a jupyter notebook by giving the arguments to the function.

stale[bot] commented 1 year 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.