DrewThomasson / ebook2audiobook

Generates an audiobook with chapters and ebook metadata using Calibre and Xtts from Coqui tts, and with optional voice cloning, and supports multiple languages
MIT License
795 stars 78 forks source link

Error during Windows Installation #10

Closed doctorase closed 1 month ago

doctorase commented 1 month ago

Hi, when I'm trying to install with powershell with command "pip install tts==0.21.3 pydub nltk beautifulsoup4 ebooklib tqdm" it can't install the package correctly. I've pasted in this link the last part of the response. It says something about last vesion of Microsoft Visual C++, but i've installed the last version. Anyone knows how to solve it? Thanks

https://pastebin.com/ntabHYeU

DrewThomasson commented 1 month ago

Found others with your issue

Found people on the coqui tts github with the same issue: not sure if they have a fix but yeah hope that helps point you in the right direction.

https://github.com/coqui-ai/TTS/discussions/2100

I would use the docker install tho, it's easier.

🚀 Running the Docker Container

To run the Docker container and start the Gradio interface, use the following command:

-Run with CPU only

docker run -it --rm -p 7860:7860 athomasson2/ebook2audiobookxtts:latest

-Run with GPU Speedup (Nvida graphics cards only)

docker run -it --rm --gpus all -p 7860:7860 athomasson2/ebook2audiobookxtts:latest

This command will start the Gradio interface on port 7860.(localhost:7860)

doctorase commented 1 month ago

Finally used docker method, thanks for the fast reply!

DrewThomasson commented 1 month ago

No probs! Glad to hear it worked! 😄

doctorase commented 1 month ago

One question. I can't see the GUI with localhost:7860, but i can with public url. I need to do something to enable GUI with localhost url?

Another question. Can I stop the conversion and follow it another day? It needs a lot of time.

Thanks for your work, is awesome!

DrewThomasson commented 1 month ago

oh, yeah, I Never figured out how to make the local host work for docker images, But the public url worked so I just left it at that.

For pausing......... I don't have an implementation in it for pausing butttt you might be able to pause the docker image itself and resume it,

To pause and resume the Ebook2AudiobookXtts Docker image. Use these commands:

Info about pausing and unpausing Docker image **Summary of Commands for Running and Pausing the Docker Image** --- ### **Launching the Docker Image (You have to use these modified launch command instead if you want to pause or unpause it.)** #### **Without GPU Support** ```bash docker run -it -p 7860:7860 athomasson2/ebook2audiobookxtts:latest ``` #### **With GPU Support** ```bash docker run --gpus all -it -p 7860:7860 athomasson2/ebook2audiobookxtts:latest ``` **Explanation:** - **Removed `--rm` Flag:** By omitting the `--rm` flag, the container won't be automatically removed when stopped or paused. This allows you to pause and unpause the container without losing its state or output. - **GPU Support:** The `--gpus all` flag enables GPU acceleration if you have NVIDIA GPUs and the necessary drivers (`nvidia-docker2` or Docker's native GPU support) installed. --- ### **Pausing and Unpausing the Docker Container** #### **On Linux and macOS** - **Pause Command:** ```bash docker ps -q --filter "ancestor=athomasson2/ebook2audiobookxtts:latest" | xargs docker pause ``` - **Unpause Command:** ```bash docker ps -q --filter "ancestor=athomasson2/ebook2audiobookxtts:latest" | xargs docker unpause ``` #### **On Windows (PowerShell)** - **Pause Command:** ```powershell docker pause $(docker ps -q --filter "ancestor=athomasson2/ebook2audiobookxtts:latest") ``` - **Unpause Command:** ```powershell docker unpause $(docker ps -q --filter "ancestor=athomasson2/ebook2audiobookxtts:latest") ``` **Explanation:** - These commands locate the running container based on the image name `athomasson2/ebook2audiobookxtts:latest` and apply the pause or unpause action. - **For Linux and macOS:** - Uses `xargs` to pass the container ID to `docker pause` or `docker unpause`. - **For Windows PowerShell:** - Uses `$()` to execute the inner command and pass its output to `docker pause` or `docker unpause`. --- **Additional Notes:** - **Monitoring the Terminal Output:** Since we're using the `-it` flags (`-i` for interactive, `-t` for a pseudo-TTY), you'll continue to see the terminal output of the Docker container, which is useful for monitoring its activity. - **Preserving Container State:** Pausing the container preserves its current state and data in memory. When you unpause it, the container resumes execution exactly where it left off.
doctorase commented 1 month ago

Thanks for the info!

doctorase commented 1 month ago

Do you know why each time i stop the container, docker removes the container and I need to pull another time?

DrewThomasson commented 1 month ago

Hm, it shouldn't if your making sure to exclude the command --rm from the command you initially use to start the docker image when your using the docker run command?

Is it doing that with that command omitted?

doctorase commented 1 month ago

It works removing --rm. Incredible tool. Thanks!

DrewThomasson commented 1 month ago

Once again no problem! It's really nice seeing people using my side projects! 😄

doctorase commented 1 month ago

Do you know if using a target voice file needs a lot of more time for the conversion? The target voice file size influence in this time?

I'm using now a target voice file and is needing a lot more time than without it for the same book. The file size is 60 sec mp3.

DrewThomasson commented 1 month ago

That shouldn't effect the speed

Because --->

Also Info on people talking about voice cloning output quality WITH XTTS. -->

Will Extremely Long Audio Improve Coqui_TTS-Based Voices?-reddit

DrewThomasson commented 1 month ago

Oh BTW I just activated discussions on this GitHub repo!

:)