SkillAgentSearch skills...

Ebook2audiobook

Generate audiobooks from e-books, voice cloning & 1158+ languages!

Install / Use

npx skills add DrewThomasson/ebook2audiobook

Installs into whichever agent you are using.

README

📚 ebook2audiobook (E2A)

CPU/GPU Converter from E-Book to audiobook with chapters and metadata<br/> using advanced TTS engines and much more.<br/> Supports voice cloning and 1158 languages!

[!IMPORTANT] This tool is intended for use with non-DRM, legally acquired eBooks only. <br> The authors are not responsible for any misuse of this software or any resulting legal consequences. <br> Use this tool responsibly and in accordance with all applicable laws.

Discord

Thanks to support ebook2audiobook developers!

Ko-Fi

Run locally

Quick Start

Docker Build Download

<a href="https://github.com/DrewThomasson/ebook2audiobook"> <img src="https://img.shields.io/badge/Platform-mac%20|%20linux%20|%20windows-lightgrey" alt="Platform"> </a><a href="https://hub.docker.com/r/athomasson2/ebook2audiobook"> <img alt="Docker Pull Count" src="https://img.shields.io/docker/pulls/athomasson2/ebook2audiobook.svg"/> </a>

Run Remotely

Hugging Face Free Google Colab Kaggle

GUI Interface

demo_web_gui

<details> <summary>Click to see images of Web GUI</summary> <img width="1728" alt="GUI Screen 1" src="assets/gui_1.png"> <img width="1728" alt="GUI Screen 2" src="assets/gui_2.png"> <img width="1728" alt="GUI Screen 3" src="assets/gui_3.png"> </details>

Demos

New Default Voice Demo

https://github.com/user-attachments/assets/750035dc-e355-46f1-9286-05c1d9e88cea

<details> <summary>More Demos</summary>

ASMR Voice

https://github.com/user-attachments/assets/68eee9a1-6f71-4903-aacd-47397e47e422

Rainy Day Voice

https://github.com/user-attachments/assets/d25034d9-c77f-43a9-8f14-0d167172b080

Scarlett Voice

https://github.com/user-attachments/assets/b12009ee-ec0d-45ce-a1ef-b3a52b9f8693

David Attenborough Voice

https://github.com/user-attachments/assets/81c4baad-117e-4db5-ac86-efc2b7fea921

Example

Example

</details>

README.md

Table of Contents

Features

  • 🔧 TTS Engines supported: XTTSv2, Bark, Fairseq, VITS, Tacotron2, Tortoise, GlowTTS, YourTTS
  • 📚 Convert multiple file formats: .epub, .mobi, .azw3, .fb2, .lrf, .rb, .snb, .tcr, .pdf, .txt, .rtf, .doc, .docx, .html, .odt, .azw, .tiff, .tif, .png, .jpg, .jpeg, .bmp, .zip
  • 💻 TextArea to convert directly a short text in audio
  • 🔍 OCR scanning for files with text pages as images
  • 🔊 High-quality text-to-speech from near realtime to near real voice
  • 🗣️ Optional voice cloning using your own voice file
  • 🌐 Supports 1158 languages (supported languages list)
  • 💻 Low-resource friendly — runs on 2 GB RAM / 1 GB VRAM (minimum)
  • 🎵 Audiobook output formats: mono or stereo aac, flac, mp3, m4b, m4a, mp4, mov, ogg, wav, webm
  • 🧠 SML tags supported — fine-grained control of breaks, pauses, voice switching and more (see below)
  • 🧩 Optional custom model using your own trained model (XTTSv2, VITS, FAIRSEQ, PIPER, others on request)
  • 🎛️ Fine-tuned preset models trained by the E2A Team<br/> <i>(Contact us if you need additional fine-tuned models, or if you’d like to share yours to the official preset list)</i>

Hardware Requirements

  • 2GB RAM min, 8GB recommended.
  • 1GB VRAM min, 4GB recommended.
  • Virtualization enabled if running on windows (Docker only).
  • CPU, XPU (intel, AMD, ARM)*.
  • CUDA, ROCm, JETSON
  • MPS (Apple Silicon CPU)

*<i> Modern TTS engines are very slow on CPU, so use lower quality TTS like YourTTS, Tacotron2 etc..</i>

Supported Languages

| Arabic (ar) | Chinese (zh) | English (en) | Spanish (es) | |:------------------:|:------------------:|:------------------:|:------------------:| | French (fr) | German (de) | Italian (it) | Portuguese (pt) | | Polish (pl) | Turkish (tr) | Russian (ru) | Dutch (nl) | | Czech (cs) | Japanese (ja) | Hindi (hi) | Bengali (bn) | | Hungarian (hu) | Korean (ko) | Vietnamese (vi)| Swedish (sv) | | Persian (fa) | Yoruba (yo) | Swahili (sw) | Indonesian (id)| | Slovak (sk) | Croatian (hr) | Tamil (ta) | Danish (da) |

Supported eBook Formats

  • .epub, .pdf, .mobi, .txt, .html, .rtf, .chm, .lit, .pdb, .fb2, .odt, .cbr, .cbz, .prc, .lrf, .pml, .snb, .cbc, .rb, .tcr
  • Best results: .epub or .mobi for automatic chapter detection

Output and process Formats

  • .m4b, .m4a, .mp4, .webm, .mov, .mp3, .flac, .wav, .ogg, .aac
  • Process format can be changed in lib/conf.py

SML tags available

  • [break] — silence (random range 0.3–0.6 sec.)
  • [pause] — silence (random range 1.0–1.6 sec.)
  • [pause:N] — fixed pause (N sec.)
  • [voice:/path/to/voice/file]...[/voice] — switch voice from default or selected voice from GUI/CLI

Check our other repo dedicated to add SML automatically in your ebook -> E2A-SML

[!IMPORTANT] Before to post an install or bug issue search carefully to the opened and closed issues TAB<br> to be sure your issue does not exist already.

[!NOTE] EPUB format lacks any standard structure like what is a chapter, paragraph, preface etc.<br> So you should first remove manually any text you don't want to be converted in audio.

Instructions

  1. Clone repo

    git clone https://github.com/DrewThomasson/ebook2audiobook.git
    cd ebook2audiobook
    
  2. Install / Run ebook2audiobook:

    • Linux/MacOS

      ./ebook2audiobook.command
      

      <i>Note for MacOS users: homebrew is installed to install missing programs.</i>

    • Mac Launcher
      Double click Mac Ebook2Audiobook Launcher.command

    • Windows

      ebook2audiobook.cmd
      

      or Double click ebook2audiobook.cmd

      <i>Note for Windows users: scoop is installed to install missing programs without administrator privileges.</i>

  3. Open the Web App: Click the URL provided in the terminal to access the web app and convert eBooks. http://localhost:7860/

  4. For Public Link: ./ebook2audiobook.command --share (Linux/MacOS) ebook2audiobook.cmd --share (Windows) python app.py --share (all OS)

[!IMPORTANT] If the script is stopped and run again, you need to refresh your gradio GUI interface<br> to let the web page reconnect to the new connection socket.

Basic Usage

  • Linux/MacOS:

    ./ebook2audiobook.command --headless --ebook <path_to_ebook_file> --voice <path_to_voice_file> --language <language_code>
    
  • Windows

    ebook2audiobook.cmd --headless --ebook <path_to_ebook_file> --voice <path_to_voice_file> --language <language_code>
    
  • [--ebook]: Path to your eBook file

  • [--voice]: Voice cloning file path (optional)

  • [--language]: Language code in ISO-639-3 (i.e.: ita for italian, eng for english, deu for german...).<br> Default language is eng and --language is optional for default language set in ./lib/lang.py.<br> The ISO-639-1 2 letters codes are also supported.

Example of Custom Model Zip Upload

(must be a .zip file containing the mandatory model files. Example for XTTSv2: config.json, model.pth, vocab.json and

Related Skills

View on GitHub
GitHub Stars19.6k
CategoryDevelopment
Updated23m ago
Forks1.7k

Languages

Python

Security Score

100/100

Audited on Aug 8, 2026

No findings