Convert EPUB books to audiobooks using Microsoft Edge TTS. Free, no API key required.
Designed for Russian-language books but works with any language supported by Edge TTS.
brew install python ffmpeg
git clone https://github.com/firedev/epub2audiobook.git
cd epub2audiobook
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtsudo apt install python3 python3-venv ffmpeg
git clone https://github.com/firedev/epub2audiobook.git
cd epub2audiobook
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt# Russian male voice (default)
python epub2audio.py book.epub
# Russian female voice
python epub2audio.py book.epub --voice ru-RU-SvetlanaNeural
# Custom output directory
python epub2audio.py book.epub --output ./my_audiobook
# Faster speech
python epub2audio.py book.epub --rate "+15%"
# Chapter files only, no combined file
python epub2audio.py book.epub --no-merge| Flag | Default | Description |
|---|---|---|
epub_file |
required | Path to .epub file |
--voice |
ru-RU-DmitryNeural |
Edge TTS voice ID |
--output |
./output |
Output directory |
--no-merge |
false | Keep individual chapter files only, don't concatenate into one MP3 |
--rate |
+0% |
Speech rate (+10%, -5%, etc.) |
Chapters are split using the EPUB's NCX table of contents, which provides anchor-level granularity. A single HTML file containing multiple chapters (common in FB2-converted EPUBs) is split at each TOC anchor point. Section titles from the TOC (story names, part headings) are preserved as separate short chapters. Falls back to spine-based splitting when no TOC is present.
output/
book-name/
01_Chapter_One.mp3
02_Chapter_Two.mp3
...
book-name_complete.mp3 # all chapters merged
Re-running is safe — existing chapters and chunks are skipped (0-byte files from failed runs are re-generated). If a network error interrupts conversion, re-run the same command and it picks up from the last successful chunk.
Russian voices:
ru-RU-DmitryNeural— male, clear, neutralru-RU-SvetlanaNeural— female, clear, neutral
List all available voices:
edge-tts --list-voices | grep ru-RUWorks with any Edge TTS voice. For English: en-US-GuyNeural, en-US-JennyNeural, etc.
- Python 3.10+
- ffmpeg (for concatenating chapter MP3s)
MIT