uxoxo/eb2ab
๐ ebook2audiobook + LLM Processor
Two features in one unified app!
Use the tabs at the top to switch between:
๐๏ธ Tab 1: TTS Converter
CPU/GPU Converter from eBooks to audiobooks with chapters and metadata using XTTSv2, Bark, Vits, Fairseq, YourTTS, Tacotron and more. Supports voice cloning and +1110 languages!
๐ค Tab 2: LLM Processor
Transform ebooks with AI before converting to audio. Modernize language, simplify text, translate, or change tone using Claude, GPT, Llama, and more via OpenRouter.
How to access: Both features are available as tabs in the main interface!
[!IMPORTANT]
This tool is intended for use with non-DRM, legally acquired eBooks only. The authors are not responsible for any misuse of this software or any resulting legal consequences. Use this tool responsibly and in accordance with all applicable laws.
Features
- ๐ Splits eBook into chapters for organized audio
- ๐๏ธ High-quality text-to-speech with multiple TTS engines
- ๐ฃ๏ธ Optional voice cloning with your own voice file
- ๐ Supports +1110 languages (English by default)
- ๐ฅ๏ธ Designed to run on 4GB RAM
Supported eBook Formats
.epub,.pdf,.mobi,.txt,.html,.rtf,.chm,.lit,.pdb,.fb2,.odt,.cbr,.cbz,.prc,.lrf,.pml,.snb,.cbc,.rb,.tcr- Best results:
.epubor.mobifor automatic chapter detection
How to Use - TTS Converter
- Upload your eBook file
- Select your preferred TTS engine and language
- (Optional) Upload a voice sample for voice cloning
- Click "Convert" and wait for processing
- Download your audiobook with chapters and metadata
How to Use - LLM Processor
- Get OpenRouter API Key: Visit openrouter.ai/keys and create a key
- Set API Key: Add
OPENROUTER_API_KEYto Space secrets (see Settings) - Upload & Transform:
- Upload your ebook (EPUB, PDF, TXT, HTML)
- Choose transformation (modernize, translate, simplify, or custom)
- Select AI model (Claude, GPT, etc.)
- Click "โจ Transform My Ebook"
- Download Processed Text: Save your transformed text file
- Optional - Convert to Audiobook:
- Go to "Main Parameters" tab (TTS Converter)
- Upload your processed text file
- Select voice and format
- Generate audiobook!
Cost Examples (via OpenRouter):
- 200-page novel with Claude Haiku: ~$0.15-0.30
- 200-page novel with GPT-4o: ~$1.00-2.00
See OPENROUTER_SETUP.md for detailed setup instructions.
GitHub Repository
For local installation, Docker setup, and more details, visit: https://github.com/mrcn/eb2ab
Original project by Drew Thomasson: https://github.com/DrewThomasson/ebook2audiobook
License
Apache 2.0
Credits
- Coqui TTS: Coqui TTS GitHub
- Calibre: Calibre Website
- FFmpeg: FFmpeg Website
