EB

Ebook2audiobook

Convert ebooks into narrated audiobooks locally

E-books & Media Library ★ 20.2k stars Medium setup Apache-2.0

Ebook2audiobook is a self-hosted tool that converts EPUB and other ebook formats into narrated audiobooks using local text-to-speech engines. It chapters output and adds metadata automatically.

Key features

  • Ebook to audiobook conversion
  • Local text-to-speech
  • Automatic chaptering
  • Metadata tagging

Pros & cons

Strengths

  • Free audiobook generation
  • Voice cloning support
  • Automatic chaptering

Trade-offs

  • Slow without GPU
  • Large model downloads

Ebook2audiobook replaces

Last reviewed Aug 26, 2026 · 795 words

The only number that matters before you install Ebook2audiobook is whether the machine has an NVIDIA GPU. With one, a full-length novel becomes a narrated, chaptered M4B in a matter of hours. On CPU alone the same conversion runs slower than real time, so a 12-hour audiobook takes longer than 12 hours to make, and often much longer. The output quality is the same either way and it is genuinely good, which is why the project has 20,000-plus stars a couple of years after its first release. Just plan it as a batch job, not a service that sits waiting.

The pipeline: Calibre in, a neural voice out, M4B with chapters

Under the hood the tool leans on Calibre's ebook-convert to normalise whatever you feed it (EPUB, MOBI, AZW3, PDF, plain text and more) into clean text split by chapter, then hands sentences to a local text-to-speech engine. The default engine is Coqui's XTTS, which is what gives it the natural cadence, and the project has added other backends over time, including lighter ones that trade a little expressiveness for speed. The result is stitched into an M4B with chapter markers, title, author and cover pulled from the ebook's metadata, so it lands in an audiobook player looking like something you bought. It also emits plain MP3 if you prefer.

All of this is local. No text leaves the machine, no per-character billing, and the offline-first label is literal: after the models download you can pull the network cable.

Docker with GPU passthrough is the sane deployment

The project ships a Docker image and a Gradio web interface on port 7860 where you upload a book, pick a language and voice, and watch progress. A compose file for a machine with the NVIDIA container toolkit installed:

services:
  ebook2audiobook:
    image: athomasson2/ebook2audiobook:latest
    ports:
      - "7860:7860"
    volumes:
      - ./models:/app/models
      - ./audiobooks:/app/audiobooks
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    restart: unless-stopped

Mount the models directory. The XTTS weights alone are well over 1 GB and other engines add more; without a persistent volume every image update re-downloads them. The 2 GB RAM figure is the floor for the app itself; the GPU needs a few GB of VRAM for XTTS, and CPU-only runs use system RAM in its place, so 8 GB on the host is a more comfortable number.

Voice cloning works, and so do the ethics questions

Give it a short clean recording (a spoken sample of 10 to 30 seconds is the sweet spot for XTTS-style cloning) and it narrates the whole book in that voice. Cloning your own voice, or a voice you have permission to use, is a lovely way to record a bedtime book for a child without reading it aloud 40 times. Cloning a professional narrator off a commercial audiobook is not, and the same applies to the books: this works on DRM-free files. It will not, and should not, open a locked purchase.

Feed the output to Audiobookshelf, not a folder

An M4B in a directory is fine; an M4B in Audiobookshelf gives you progress sync across phone and desktop, playback speed, and chapter navigation, which is where the automatic chaptering pays off. Point the compose volume at a folder Audiobookshelf watches and new books appear on their own. If your source library lives in Calibre-Web, the workflow is download EPUB, drop into the converter, collect the M4B, with the rest of your reading stack unchanged. The ebooks category has the other pieces.

Speed expectations, honestly

Rough estimates, not benchmarks: a mid-range consumer GPU converts a typical 90,000-word novel in something like 2 to 4 hours with XTTS; a modern 8-core CPU takes a day or more for the same book, and a small ARM board is not a serious option. Running a lighter engine roughly halves the GPU time at some cost to naturalness. Queue several books overnight rather than converting one interactively, and expect the first run to be slow while models download.

What I'd do

Run it on the desktop or the one box with a GPU, as a container you start when there is a queue and stop when it empties. Persist the models volume, output straight into an Audiobookshelf library, and clone your own voice once for the personal-library effect. If you have no GPU anywhere, try one short book on CPU first before committing the household's electricity; it may still be worth it for a book nobody will ever narrate commercially, and that is the real niche here compared with an Audible subscription.

Compare Ebook2audiobook

4 head-to-head comparisons.

Similar e-books & media library apps