Open Source / Audiobooks

OpenNarrator

An open-source audiobook factory. Drop in an ebook, get back a chaptered M4B audiobook. No API keys, no cloud services, no vendor lock-in. Just open-source TTS and ffmpeg running on your own machine.

terminal
# Install (macOS)
$ brew tap sleuthy-sloth/tap
$ brew install opennarrator

# Try it (60 seconds)
$ opennarrator convert --demo
# Convert your own ebook
$ opennarrator convert book.epub --voice af_bella

# Or launch the web UI
$ on → http://localhost:8080

Overview

Why I Built It

Audiobooks are expensive. A single title on Audible costs $15-30, and that’s after a subscription. Services like ElevenLabs can generate audiobooks from text, but they charge per-character and hold your data on their servers. I wanted a tool that runs entirely on my own machine, uses open-source models, and produces professional-grade chaptered M4B files that work in Apple Books, Plex, or any audiobook player.

OpenNarrator is the result. It takes an ebook (EPUB, TXT, or DOCX), extracts the text and chapter structure, feeds each chapter through the Kokoro TTS engine (82M parameters, Apache 2.0 licensed), and packages the result into a properly chaptered M4B file. The whole pipeline runs locally using the Kokoro model, which sounds remarkably natural for its size and is completely free.

The project ships with 16 voices across American and British English, a web UI for voice preview and drag-and-drop conversion, a CLI for scripting and batch processing, and a GitHub Actions template repo that lets you convert ebooks for free on GitHub’s cloud runners. Install via Homebrew, pip, or the Codespaces devcontainer. No API keys needed.

Capabilities

Features

  • Convert EPUB, TXT, and DOCX ebooks to chaptered M4B audiobooks
  • 16 Kokoro TTS voices: American/British English, male/female
  • Web UI at localhost:8080 — drag-and-drop conversion with voice preview and speed slider
  • CLI mode for scripting and batch processing
  • --demo flag: test the full pipeline with a built-in passage, no ebook required
  • Resume support: pick up where you left off if interrupted
  • No API keys, no cloud services, no vendor lock-in
  • Homebrew install for macOS, pip for Linux
  • GitHub Codespaces devcontainer for one-click cloud conversion
  • GitHub Actions template repo for automated ebook-to-M4B pipelines

Under the Hood

Tech Stack

Python 3.11+Kokoro TTS (82M parameter, Apache 2.0)FastAPI + uvicornTyper CLIebooklib / PyMuPDF / python-docxffmpegsoundfile / numpypytest (85 tests)GitHub Actions CIHomebrew tap