This program uses Calibre for converting eBooks into chapters and StyleTTS2 to transform these chapters into an audiobook.
It features text-to-speech technology with an optional voice cloning capability if a voice file is provided.
.epub, .pdf, .mobi, .txt, .html, .rtf, .chm, .lit, .pdb, .fb2, .odt, .cbr, .cbz, .prc, .lrf, .pml, .snb, .cbc, .rb, and .tcr, (Best results are from using epub or mobi for auto chapter detection)

ebook-convert tool.StyleTTS2 for converting each chapter into an audio file.To quickly get started with this eBook to Audiobook converter, simply run the following Docker command:
To run the Docker container and start the Gradio interface, use the following command:
To run with a gpu
docker run -it --rm --gpus all -p 7860:7860 athomasson2/ebook2audiobookstyletts2:latestTo run without a gpu
docker run -it --rm -p 7860:7860 athomasson2/ebook2audiobookstyletts2:latestThis will start the Gradio interface on port 7860. You can access it by navigating to http://localhost:7860 in your web browser.
styletts2 Python packagesudo apt-get install -y calibrebrew install calibrechoco install calibresudo apt-get install -y ffmpegbrew install ffmpegchoco install ffmpegpip install styletts2 pydub nltk beautifulsoup4 ebooklib tqdmNavigate to the script's directory in the terminal and use one of the following commands:
python styletts_to_ebook.py <path_to_ebook_file>Replace <path_to_ebook_file> with the path to your eBook file.
python styletts_to_ebook.py <path_to_ebook_file> <path_to_voice_file>Replace <path_to_ebook_file> with the path to your eBook file.
Replace <path_to_voice_file> with the path to the voice file for cloning.