Generate audiobook from ebook files with espeak
606
Convert eBooks to audiobooks effortlessly using a Docker container. This project leverages Calibre for eBook conversion and eSpeak-ng for text-to-speech, all wrapped in a Gradio interface.
https://github.com/user-attachments/assets/4decbfc3-b934-498a-935e-180336ecadc4
To quickly get started with this eBook to Audiobook converter, simply run the following Docker command:
docker run -it --rm -p 7860:7860 athomasson2/ebook2audiobookespeak:latest
This will start the Gradio interface on port 7860. You can access it by navigating to http://localhost:7860 in your web browser.
In the Gradio interface, you can customize the following settings for your audiobook conversion:
If you prefer to build the Docker image yourself, use the following Dockerfile:
# Use an official Python 3.10 image
FROM python:3.10-slim-buster
# Set non-interactive installation to avoid timezone and other prompts
ENV DEBIAN_FRONTEND=noninteractive
# Install necessary packages
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
calibre \
espeak \
espeak-ng \
ffmpeg \
wget \
tk \
mecab \
libmecab-dev \
mecab-ipadic-utf8 \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /ebook2audiobookXTTS
# Clone the repository and install dependencies
RUN git clone https://github.com/DrewThomasson/ebook2audiobookEspeak.git .
# Install Python dependencies
RUN pip install --upgrade pip && \
pip install bs4 pydub nltk beautifulsoup4 ebooklib tqdm gradio
# Download the punkt package for nltk
RUN python -m nltk.downloader punkt
# Verify the script exists and has correct permissions
RUN ls -la /ebook2audiobookXTTS/ && \
if [ ! -f /ebook2audiobookXTTS/gradio_launch.py ]; then echo "Script not found."; exit 1; fi
# Set the command to run your application
CMD ["python", "/ebook2audiobookXTTS/gradio_launch.py"]
To build the image, run:
docker build -t athomasson2/ebook2audiobookespeak:latest .
Explore the full power of this converter by running your Docker container. Customize the settings in the Gradio interface to suit your needs.
For more details and updates, visit the GitHub repository.
Content type
Image
Digest
sha256:0853454a9…
Size
671.7 MB
Last updated
over 1 year ago
docker pull athomasson2/ebook2audiobookespeak