Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

ebook2audiobook

> DevOps
Open source

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

19.6K stars0 likes0 views
WebsiteGitHub

About

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

📚 ebook2audiobook (E2A)

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

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

Thanks to support ebook2audiobook developers!

Run locally

Run Remotely

GUI Interface

Click to see images of Web GUI

Demos

New Default Voice Demo

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

More Demos

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

README.md

Table of Contents

  • ebook2audiobook

  • Features

  • GUI Interface

  • Demos

  • Supported Languages

  • Minimum Requirements

  • Usage

    • Run Locally
      • Launching Gradio Web Interface
      • Basic Headless Usage
      • Headless Custom XTTS Model Usage
      • Help command output
    • Run Remotely
    • Docker
      • Steps to Run
  • Cloned Voices

  • Fine Tuned TTS models

    • Collection of Fine-Tuned TTS Models
    • Train XTTSv2
  • Supported eBook Formats

  • Output Formats

  • Revert to older Version

  • Common Issues

  • Special Thanks

  • 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
    (Contact us if you need additional fine-tuned models, or if you’d like to share yours to the official preset list)

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)

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

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)
  • +1130 languages and dialects here

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
to be sure your issue does not exist already.

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

Instructions

  1. Clone repo

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

    • Linux/MacOS

      bash
      ./ebook2audiobook.command

      Note for MacOS users: homebrew is installed to install missing programs.

    • Mac Launcher
      Double click Mac Ebook2Audiobook Launcher.command

    • Windows

      bash
      ebook2audiobook.cmd

      or Double click ebook2audiobook.cmd

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

  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
to let the web page reconnect to the new connection socket.

Basic Usage

  • Linux/MacOS:

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

    bash
    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...).
    Default language is eng and --language is optional for default language set in ./lib/lang.py.
    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 ref.wav)

  • Linux/MacOS

    bash
    ./ebook2audiobook.command --headless --ebook <ebook_file_path> --language <language> --custom_model <custom_model_path>
  • Windows

    bash
    ebook2audiobook.cmd --headless --ebook <ebook_file_path> --language <language> --custom_model <custom_model_path>

    Note: the ref.wav of your custom model is always the voice selected for the conversion

  • <custom_model_path>: Path to model_name.zip file, which must contain (according to the tts engine) all the mandatory files
    (see ./lib/models.py).

For Detailed Guide with list of all Parameters to use

  • Linux/MacOS
    bash
    ./ebook2audiobook.command --help
  • Windows
    bash
    ebook2audiobook.cmd --help
  • Or for all OS python app.py --help

…

NOTE: in gradio/gui mode, to cancel a running conversion, just click on the [X] from the ebook upload component. TIP: if it needs some more pause, add '[pause:3]' for 3 sec. etc.

Docker

  1. Clone the Repository:
bash
   git clone https://github.com/DrewThomasson/ebook2audiobook.git
   cd ebook2audiobook
  1. Build the container
…
  1. Run the Container:
…
  • NOTE: MPS is not exposed in docker so CPU must be used

Cloned Voices

You can upload any voice audio in any of the supported audio formats, the ideal duration is around 1 to 5 mn. It doesn't matter if the recording has a noisy background or music playing over it — E2A will clean up the voice for you.

The built-in cloned voices list is mainly in English. If you need voices in other languages to be officially added to the list, please contact us and we'll add them after review.

Fine Tuned TTS models

Fine Tune your own XTTSv2 model

Universal_TTS_Finetune

De-noise training data

Fine Tuned TTS Collection

For an XTTSv2 custom model a ref audio clip of the voice reference is mandatory:

Your own Ebook2Audiobook customization

You are free to modify libs/conf.py to add or remove the settings you wish. If you plan to do it just make a copy of the original conf.py so on each ebook2audiobook update you will backup your modified conf.py and put back the original one. You must plan the same process for models.py. If you wish to make your own custom model as an official ebook2audiobook fine tuned model so please contact us and we'll add it to the presets list.

Reverting to older Versions

Releases can be found -> here

bash
git checkout tags/VERSION_NUM # Locally/Compose -> Example: git checkout tags/v25.7.7

Common Issues:

  • My NVIDIA/ROCm/XPU/MPS GPU isn't being detected?? -> GPU ISSUES Wiki Page
  • CPU is slow (better on server smp CPU) while GPU can have almost real time conversion. Discussion about this (It doesn't have zero-shot voice cloning though, and is Siri quality voices, but it is much faste

Issues· 2 open

View all issuesOpen on GitHub
  • #2126

    recognize footnote numbers as such and skip them

    Updated Oct 1, 2026
  • #2093

    _generate_ffmpeg_metadata() Error: Unable to process >4GB files

    BugUpdated Sep 18, 2026
  • #2087

    PyTorch and TorchAudio CUDA version mismatch

    BugDockerUpdated Sep 14, 2026
  • #2055

    Docker Compose XPU profile builds CUDA PyTorch (+cu130) instead of XPU PyTorch on Intel Arc

    BugFixed and mergedUpdated Sep 9, 2026
  • #2074

    Unraid with last torch issue

    BugUnraidUpdated Sep 9, 2026

> Tags

Pythonaudiobookaudiobookschinesecolab-notebook

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理