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
35.07k stars 4.27k forks source link

[Bug] Training code's dependency on pyworld breaks TTS Windows pip installation #1779

Closed collvey closed 2 years ago

collvey commented 2 years ago

Describe the bug

Environment: OS Name Microsoft Windows 10 Pro Version 10.0.19044 Build 19044 Python 3.9.13

Running pip install TTS in Windows triggers a known build error for one of its dependencies:

The pyworld build error is fixable by installing correct MSVC toolset (Microsoft Visual C++ 14.0 or greater is required.) in https://visualstudio.microsoft.com/visual-cpp-build-tools/ but will lead to another link error possibly related to Cython version (similar issue: https://github.com/wxWidgets/Phoenix/pull/2017)

A cleaner way is to remove dependency on pyworld for TTS pip installation. The pip installation option is for people who are only interested in synthesizing speech with the released 🐸TTS models, not for training the model. Correct me if wrong, there is no need to depend on pyworld which is, as I understand, only for training the model.

To Reproduce

  1. Run the following command 'pip install TTS' in Windows
  2. See error

Expected behavior

No response

Logs

No response

Environment

{
    "CUDA": {
        "GPU": [],
        "available": false,
        "version": "11.3"
    },
    "Packages": {
        "PyTorch_debug": false,
        "PyTorch_version": "1.11.0+cu113",
        "TTS": "0.7.1",
        "numpy": "1.21.6"
    },
    "System": {
        "OS": "Windows",
        "architecture": [
            "64bit",
            "WindowsPE"
        ],
        "processor": "Intel64 Family 6 Model 140 Stepping 1, GenuineIntel",
        "python": "3.9.13",
        "version": "10.0.19044"
    }
}

Additional context

No response

collvey commented 2 years ago

Actually the compute_f0() is still being used in https://github.com/coqui-ai/TTS/blob/f237e4ccd9f2fd2b0cb5e136dfe0e20cc32bf898/TTS/tts/datasets/dataset.py#L716 . Will close to find other solutions.

collvey commented 2 years ago

Reopen with updated description. Proposes to remove requirement of pyworld for TTS pip installation.

WickedSmoke commented 2 years ago

This is a problem on other platforms as well. In Fedora and Debian the "pip install -e .[all,dev,notebooks]" method fails.

This was fixed in Fedora 33 by running "sudo dnf install python3-devel". On Debian 11, even though python3-dev was installed the pyworld module failed to build.

erogol commented 2 years ago

@WeberJulian is investigating an alternative to pyworld. Unfortunately, until we find one, this issue remains to stay.

erogol commented 2 years ago

To get rid of this we can switch to pyin. It is slower but it works :).

Would you deal with that @Edresson?

Edresson commented 2 years ago

This issue was solved with PR #1946 where we replaced the Pyworld with Librosa Pyin.