by eigenvalue · 3y ago · 0 comments
``` 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.
Overall I got pretty poor results in english and french, I guess it would require some fine-tuning
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))
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.)Usually, some hero releases a friendly install system within a few days, though.
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.
As a human, you need to read 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.