Featured projects#Open source

ebook2audiobook: A Local Ebook-to-Audiobook Converter

An open-source tool that converts ebooks into audiobooks entirely on your own machine, with multiple built-in TTS engines, voice cloning, and support for 1,158 languages, producing an m4b with chapters and metadata — no cloud service needed, and it runs on as little as 2GB of RAM.

Project facts

GitHub Ecosystem
Repositorygithub.com/DrewThomasson/ebook2audiobook
License
Apache-2.0
Language
Python
Stars
20,221
Data checked
2026-09-25

Snapshot figures reflect the check date and may change over time.

ebook2audiobook does the whole ebook-to-audiobook conversion locally: it calls on several open-source text-to-speech engines to turn common ebook formats like epub, mobi, and pdf into audiobooks complete with chapters and metadata, with no dependency on the cloud and no API key required. The problem it solves is a plain one — the ebooks already on your drive are static text, and listening to them needs a low-cost path to synthesized speech. GitHubDaily recommended the project in January 2025.

Core features

  • Multiple engines to choose from: synthesis engines include XTTSv2, Bark, VITS, Fairseq, and others, switchable by language; on CPU-only machines, lighter options like YourTTS or Tacotron2 are recommended instead.
  • Voice cloning: pass in a recording of your own voice with --voice to have the entire book read in that voice.
  • Broad language coverage: supports 1,158 languages and dialects, including Chinese, Japanese, and French; language tags can use the three-letter ISO-639-3 code or a simpler two-letter code.
  • Solid format support both ways: input covers more than twenty ebook formats including epub, mobi, txt, and pdf, with OCR for scanned image pages; output defaults to m4b with chapters and metadata preserved, with mp3, wav, and other formats also available.
  • Runs on modest hardware: officially rated for as little as 2GB of RAM and 1GB of VRAM (8GB RAM recommended), supporting CPU, CUDA, ROCm, and Apple Silicon.
  • Both web UI and command line: you can spin up a local web interface or run headless batch conversions from the command line, and it integrates directly with Audiobookshelf.

Typical use cases

  • Batch-converting a backlog of epub and mobi ebooks into m4b files with chapter information preserved, then importing them into a self-hosted Audiobookshelf library.
  • Creating a personal-style audiobook narrated in your own cloned voice.
  • Converting offline on an older machine without a discrete GPU, or on a Mac, without handing book content over to a third-party service.

Quick start

After cloning the repo, run the appropriate script on Linux/macOS, then open http://localhost:7860 in a browser to use the web interface:

git clone https://github.com/DrewThomasson/ebook2audiobook.git
cd ebook2audiobook
./ebook2audiobook.command

For batch conversion, use headless mode:

./ebook2audiobook.command --headless --ebook <path-to-ebook> --voice <voice-file> --language <language-code>

Windows provides ebook2audiobook.cmd, and its Docker mode requires virtualization to be enabled.

Summary

This suits individual readers who want to turn their book collection into audiobooks, hobbyists running a self-hosted audiobook library, and developers who need offline speech synthesis or voice cloning. The feature set is thorough and its constraints are clearly documented, though synthesis quality and speed depend on the engine and hardware you choose — it’s worth test-listening to a small batch before converting in bulk. The project is Apache-2.0 licensed and intended only for ebooks you’ve legally obtained without DRM; newer, larger TTS models will be slow on CPU alone, so lighter engines are recommended for modest hardware; and EPUB has no standard chapter structure, so you’ll need to clean up content you don’t want read aloud before converting. Note also that the “1,107 languages” and “4GB of RAM” figures from the original recommendation tweet are outdated — this piece has been updated to the project’s current documented figures of 1,158 languages and a 2GB RAM minimum.