4 ms·
I just wanted to test out the TTS locally on a powerful Ubuntu 22.04 machine, but the process for setting it up seems pretty broken and poorly documented. After
by eigenvalue 3y ago
I just wanted to test out the TTS locally on a powerful Ubuntu 22.04 machine, but the process for setting it up seems pretty broken and poorly documented. After 20 minutes of trying I finally gave up since I couldn't get the VITS dependency to build (despite having a fully updated machine with all required compilers). It seems like they never really bother to see if the stuff works on a fresh machine starting from scratch. Somehow for my own projects I'm always able to start from a fresh git clone and then directly install everything using this block of code:
```
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install wheel
pip install -r requirements.txt
```
But whenever I try using these complicated ML models, it's usually an exercise in futility and endless mucking around with conda and other nonsense. It ends up not being worth it and I just move on. But it does feel like it doesn't need to be like this.
- ElectricalUnion 3y agoThis thing uses pytorch, the bane of everything that attempts to make pypi installs sane. As a human, you need to read https://pytorch.org/get-started/locally/ https://pytorch.org/get-started/locally/ and install the correct version, depending on your pytorch-version/os/packaging-system/hardware-platform combo. It's bad. It's several conflicting index-urls messing with your requirements. It also doesn't work if you pick the wrong thing. Or we need something like a "setup.py" that is turing-complete, to dynamically pick up the correct dependency for you. `pip install -r requirements.txt` is not enough.
- PufPufPuf 3y agoResearch projects are notorious for this. The people behind them aren't very experienced in distributing software (many never heard of docker), the usual language of choice is Python which has poor packaging, native dependencies complicate things, and everything is on the bleeding edge by definition. Usually, it needs a brave soul to reverse engineer what exact versions of dependencies are needed and make a Colab or Dockerfile that puts it all together.
- evilhackerdude 3y agoI've created this environment.yml: name: fairseq channels: - conda-forge - pytorch dependencies: - python=3.9 - Cython==0.29.21 - librosa==0.8.0 - matplotlib=3.3 - numpy=1.19 - scipy==1.5.2 - tensorboard==2.3.0 - pytorch=1 - torchvision=0 - Unidecode==1.1.1 - pip: - phonemizer==2.2.1 You can install it with micromamba (or conda): conda create -f environment.yml conda activate fairseq You'll need to do this: cd path/to/vits/monotonic_align mkdir monotonic_align python setup.py build_ext --inplace Then back to fairseq: cd path/to/fairseq PYTHONPATH=$PYTHONPATH:path/to/vits python examples/mms/tts/infer.py --model-dir checkpoints/eng --wav outputs/eng.wav --txt "As easy as pie" (Note: On MacOS, I had to comment out several .cuda() calls in infer.py to make it work. But then it generates high-quality speech very efficiently. I'm impressed.)
- dragonwriter 3y agoYeah, a lot of the releases from researcg groups are woefully poorly documented. Usually, some hero releases a friendly install system within a few days, though.
- lairv 3y agoI wrote a colab to run TTS, it takes some time to install dependencies : https://colab.research.google.com/drive/11tZ1c7kQJ5uKImm9t-C9ab13FJQrlS84?usp=sharing https://colab.research.google.com/drive/11tZ1c7kQJ5uKImm9t-C... Overall I got pretty poor results in english and french, I guess it would require some fine-tuning
- deadmutex 3y agoThanks for this! Out of curiosity, how does vits play into this? I know nothing about the repo. Also, I used the following to play the sound after it is generated: from IPython.display import Audio, display display(Audio(output_file, autoplay=True))
- lairv 3y agoI think vits is just a repo that implements the TTS model