DEV.co
AI Frameworks · aedocw

epub2tts

epub2tts is a Python tool that converts EPUB or text files into audiobooks using multiple text-to-speech engines (Coqui TTS, OpenAI, Microsoft Edge, Kokoro). It supports voice cloning, automatic chapter detection, M4B output formatting, and parallel processing for faster generation.

Source: GitHub — github.com/aedocw/epub2tts
938
GitHub stars
74
Forks
Python
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryaedocw/epub2tts
Owneraedocw
Primary languagePython
LicenseApache-2.0 — OSI-approved
Stars938
Forks74
Open issues24
Latest releaseUnknown
Last updated2026-02-08
Sourcehttps://github.com/aedocw/epub2tts

What epub2tts is

Python-based EPUB/text-to-audiobook converter leveraging pluggable TTS engines (VITS, XTTS, Edge TTS cloud API, OpenAI API, Kokoro). Features include NCX-aware chapter parsing, deepspeed acceleration, multiprocessing with configurable thread pools, whisper-based transcript validation, and M4B metadata embedding.

Quickstart

Get the epub2tts source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/aedocw/epub2tts.gitcd epub2tts# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Self-published Author Audiobook Production

Authors without audiobook budgets can generate full-featured M4B audiobooks from DRM-free EPUBs with voice cloning or studio voices, including cover art and chapter metadata.

Accessible Content Distribution

Organizations converting technical documentation or literature to audio format for accessibility compliance, using MS Edge free TTS for cost-effective bulk processing.

Local/Private Audiobook Generation

Users needing privacy or offline capability can use Coqui VITS/Kokoro engines locally without cloud dependencies, with resumable processing for long documents.

Implementation considerations

  • Multiprocessing (--threads) behavior differs by engine: cloud APIs (Edge, OpenAI) can run threads equal to chapter count; local engines (VITS, XTTS) require experimentation to avoid OOM or excessive latency.
  • XTTS voice cloning requires 1–3 30-second audio samples of target speaker; quality and feasibility depend on audio clarity and speaker consistency.
  • Deepspeed is optional but recommended for GPU acceleration; requires NVIDIA GPU and proper CUDA/PyTorch setup; --no-deepspeed fallback available.
  • EPUB preprocessing is manual: extract with --export txt, edit to add chapter markers (# Chapter Name), remove front matter, and optionally tag speakers per chapter.
  • Kokoro engine speed parameter is acknowledged as broken ("will fix at some point"); verify actual output timing before depending on speed controls.

When to avoid it — and what to weigh

  • DRM-Protected Content — Tool explicitly requires DRM-free EPUB files. Will not work with commercially protected books or any format with encryption.
  • Production-Grade Audio Quality — While Kokoro and XTTS are noted as high-quality, README indicates VITS-based outputs are lower fidelity. Enterprise audiobook standards may require professional studios.
  • Non-Latin Languages at Scale — Only documented language support is English (default). Multi-language capability exists but is not clearly specified; testing required for non-English audiobooks.
  • Real-Time or Streaming Use Cases — Tool is batch-oriented with inference times ranging 0.4x–4.7x realtime depending on hardware. Not suitable for live TTS streaming applications.

License & commercial use

Licensed under Apache License 2.0 (Apache-2.0), a permissive open-source license allowing commercial use, modification, and distribution with minimal restrictions (requires license notice and liability disclaimer).

Apache-2.0 permits commercial use in audiobook services, SaaS platforms, or audiobook marketplaces. However, ensure underlying TTS engine licenses are compatible: Coqui TTS is open-source (verify license), Microsoft Edge TTS endpoint legality is ambiguous (undocumented use), OpenAI API requires separate commercial terms, Kokoro license not specified in excerpt. Recommend legal review before monetizing audiobooks.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

No security audit or CVE history mentioned. API key handling (OpenAI) relies on CLI argument or environment; no mention of secrets management best practices. MS Edge TTS endpoint is reverse-engineered (edge-tts library); ToS compliance unclear. Local XTTS model downloads from Hugging Face; verify model source integrity. Whisper model downloads from Hugging Face; no signature verification noted. No input validation details; malformed EPUB/text may cause crashes (debug mode recommended). DRM requirement mitigates piracy risk for input, but output M4B files have no copy protection.

Alternatives to consider

Google Text-to-Speech API

Cloud-based, high-quality neural voices, multi-language support, commercial SLA. Requires paid API account; no local/free option.

Audible Studio / ACX

Professional audiobook marketplace with human narrators and quality control. Proprietary, no open-source option, expensive per-book.

Eleven Labs TTS API

Specialized voice cloning and realistic synthesis; commercial SaaS. Better quality than local engines but requires API subscription.

Software development agency

Build on epub2tts with DEV.co software developers

epub2tts is a solid open-source foundation for audiobook automation. Let Devco architect a production-grade TTS pipeline, secure API integrations, and scalable deployment for your use case.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

epub2tts FAQ

Can I use epub2tts commercially (e.g., to sell audiobooks)?
Apache-2.0 license permits commercial use of the tool itself. However, verify TTS engine licenses (Coqui, Kokoro, Edge TTS legality, OpenAI commercial terms) before monetizing audiobooks. Recommend legal review.
What's the difference between the main epub2tts and the variants (chatterbox, vibevoice, edge, kokoro)?
Main tool supports multiple engines. Variants are engine-specific optimizations: chatterbox uses Coqui for better emotion/quality (slow, GPU-required); vibevoice uses Microsoft VibeVoice for long-text handling; edge is lightweight MS Edge-only; kokoro is lightweight Kokoro-only. README recommends chatterbox/vibevoice as improvements.
Do I need a GPU?
No for VITS (default) or MS Edge (cloud). Recommended for XTTS and Kokoro; without GPU, inference is 2–4.7x realtime. CPU-only feasible for short documents.
Why is my audiobook choppy or missing chapters?
Common causes: EPUB preprocessing incomplete (missing # chapter markers), text-to-speech engine crash (use --debug --minratio 0), or multiprocessing threads set too high causing OOM. README recommends manual EPUB inspection and --scan to preview chapter structure.

Software developers & web developers for hire

DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If epub2tts is part of your ai frameworks roadmap, our team can implement, customize, migrate, and maintain it.

Ready to Build AI Audio Experiences?

epub2tts is a solid open-source foundation for audiobook automation. Let Devco architect a production-grade TTS pipeline, secure API integrations, and scalable deployment for your use case.