Closed aedocw closed 6 months ago
Hi there, Not sure how useful this is as I had a lot of this setup already, although the path I would follow is below: For ease of use I would suggest the windows package manager chocolatey, as it will ensure things are on path etc.
These instructions worked for me yesterday, though when I had tried them a few days earlier I got an error when pip was installing TTS. Seems like it was just a transient problem with a dependency, because I had no issues later. That problem was what made me think this was a more complicated process than I had expected, but seems like it's pretty straightforward.
This is helpful and gives me enough to go from, hopefully I will get to writing them this week.
I'm just fumbling blindly trying to learn to use awesome code and projects like this.. So a step by step like this is really helpful! It worked for me. Tho I was stuck on using CPU. Tried lots of things, but in the end i saw that requirements.txt was torch without CUDA. I did: "pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121" within .venv. So now i am happily converting my first epub to an audiobook!
Troubleshooting Windows installation
Thank you @danielw97 and @michwad for the instructions, and of course @aedocw for the fantastic work that you've done!
I've managed to install it on Windows, but encountered some roadblocks along the way, so I thought I'd list a couple of the issues I encountered with solutions which might be helpful for others trying to install.
At step 10 in @danielw97 's instructions (when running "pip install ."), the following errors may appear:
1. Microsoft C++ Build Tools not installed
ERROR: Could not build wheels for TTS, which is required to install pyproject.toml-based projects
This error appears if you haven't installed Microsoft C++ Build Tools. If you haven't installed, you should download the installer from: https://visualstudio.microsoft.com/visual-cpp-build-tools/ run the vs_BuildTools.exe and select the "C++ Buld tools" checkbox leaving all options at their default value. Note: This will require about 7 GB of space on C drive.
2. Cannot install lxml automatically
× Encountered error while trying to install package. ╰─> lxml
Run pip install lxml
to install the latest version manually then re-run pip install .
At step 11, (when calling epub2tts), the following errors may appear:
3. ffmpeg not found
Rerun the command choco install ffmpeg
, making sure you are in an elevated powershell session, outside of the virtual environment.
4. NLTK: punkt not found
Resource punkt not found. Please use the NLTK Downloader to obtain the resource:
Run the following to install it:
python -c "import nltk"
python -m nltk.downloader punkt
5. Enabling CUDA
Torch not compiled with CUDA enabled
As per @michwad 's solution, within .venv, run:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
Note: this will require about 2.5 GB of space.
After that, you may get yet another error, stating that the graphics card drivers are out of date. You should update them to proceed.
souns very complicated. usually I am under Linux but my desktop has to be windows, as I want CUDA there is only teh way over cuda enabled WSL2
Once that is installed (there are many easy guides for that) your Linux install instructions work 1:1 inside the WSL with CUDA working right away.
Just note that Ubutnu 20.04 has dependency issues ond WSL2-ubuntunu22.04 everything worked right away as described
Thank you @winfran for these detailed steps! I think I'll have time to update the docs tomorrow and include this stuff, it is super helpful - really appreciate it!
One thing to note is that installing deepspeed
on Windows doesn't work. Potential workaround with a precompiled .whl (I haven't tried it): https://github.com/microsoft/DeepSpeed/issues/2588#issuecomment-1502628005
README now has improved windows installation instructions.
Right now there are no instructions to run this under Windows, other than one line for how to run it under docker.
There should be a section specifically for doing a windows install, with as many helpful links as possible.
If anyone has gone through a windows install and would like to include their steps here, it would be much appreciated. I can validate them and update the README. I took a quick first pass last night and was surprised as the level of hassle, but maybe it's easier than I realize and I just did not follow a good path.