This tool converts EPUB ebooks into per-chapter MP3 files using cloud or local TTS engines, formatted for Audiobookshelf. It offers a CLI and a Gradio WebUI.
Overview
The EPUB to Audiobook converter reads ebook chapters and synthesizes speech through selectable text-to-speech backends. Supported providers include Microsoft Azure Speech, OpenAI Speech, Edge TTS without an API key, Piper local TTS, and Kokoro-related setups described in the docs.
Each chapter becomes its own MP3 with title metadata extracted from HTML when possible, which matches how Audiobookshelf expects multi-file audiobooks. Preview mode summarizes chapter lengths without generating audio, and optional search-and-replace rule files fix pronunciations or abbreviations before synthesis.
A Gradio-based WebUI exposes the same options as the command line, including file upload, provider tabs, voice settings, logs, and limited chapter previews. Docker images and a compose file can run the WebUI with mounted volumes for input EPUBs and output folders.
Operation requires Python 3.10 or newer unless using Docker. Cloud providers need API keys via environment variables, while Edge TTS needs no key. Documentation warns the WebUI is intended for localhost and should not be exposed to the open internet without authentication.
Key features
- EPUB split into chapter MP3 outputs
- Azure, OpenAI, Edge, and Piper TTS options
- Audiobookshelf-oriented chapter metadata
- Gradio WebUI with drag-and-drop upload
- Docker image and compose WebUI setup
- Preview and search-replace preprocessing
- Configurable voices, speed, and formats
- Chapter range and logging controls
Use cases
- Building personal audiobooks from EPUB ebooks
- Importing generated files into Audiobookshelf
- Trying TTS voices before full book conversion
- Batch conversion via Docker on a home server