Giter Club home page Giter Club logo

Comments (8)

danielw97 avatar danielw97 commented on June 11, 2024 2

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.

  1. install espeak-ng from https://github.com/espeak-ng/espeak-ng/releases/latest
  2. install ffmpeg with the command choco install ffmpeg, make sure you are in an elevated powershell session.
  3. install python 3.11 with the command choco install python311
  4. Install git with the command choco install git.
  5. Decide where you want your epub2tts project to live, documents is a common place.
  6. Once you've found a directory you're happy with, clone the project with git clone https://github.com/aedocw/epub2tts and cd epub2tts so you're now in your working directory.
  7. There are probably a few different ways you can go here, I personally opted for a venv to keep everything organized.
  8. create a venv with the command python -m venv .venv
  9. Activate the venv, on windows the command is slightly different as you issue .venv\scripts\activate
  10. install epub2tts along with the requirements with the command pip install .
  11. If all goes well, you should be able to call epub2tts from within your venv and update it going forward.
    Not sure how useful these quick notes are, as you may have a preferred way of doing things.
    For sake of time at this stage I've skipped over installing chocolatey etc, as their docs are easily accessible.
    This could also all be done manually of course, although for end users I don't know how comfortable I am instructing them to edit their path environment variables etc.
    Hth a bit, and let me know if there's any testing/refining of this that would be useful for you.
    I'm mostly on linux now, although my primary reason for running this on windows is due to the fact that's where my slightly better gpu is.
    Can spin up a vm and test a fresh install, let me know what your thoughts are though.

from epub2tts.

michwad avatar michwad commented on June 11, 2024 2

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!

from epub2tts.

aedocw avatar aedocw commented on June 11, 2024 1

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.

from epub2tts.

winfran avatar winfran commented on June 11, 2024 1

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.

  • Install errors

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 .

  • Run errors

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.

from epub2tts.

rejuce avatar rejuce commented on June 11, 2024

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

from epub2tts.

aedocw avatar aedocw commented on June 11, 2024

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!

from epub2tts.

bretthysuik avatar bretthysuik commented on June 11, 2024

One thing to note is that installing deepspeed on Windows doesn't work. Potential workaround with a precompiled .whl (I haven't tried it): microsoft/DeepSpeed#2588 (comment)

from epub2tts.

aedocw avatar aedocw commented on June 11, 2024

README now has improved windows installation instructions.

from epub2tts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.