Doc no. SK-404DatasheetRev 2026.11Sheet 2.7 of 4
Kokoro Audiobook Studio
Turns textbooks and technical PDFs into chaptered .m4b audiobooks — entirely on-device, on the Apple Silicon GPU.
Shipped
Source on GitHub
$ audiobook-studio book.pdf -v bm_george
Block diagram
Characteristics
| Throughput | ~16× real-time — 55.5 h of audio from a 1,200+ page textbook in ~3.5 h |
|---|---|
| Model | Kokoro-82M on PyTorch MPS, one shared model across voices |
| PDF cleanup | Strips running headers, footers and page numbers by position and repetition; de-hyphenates; reads two-column layouts in order |
| Chapters | PDF outline first, then heading patterns, then word-budget chunks |
| Output | Real, skippable chapter markers via FFMETADATA1 + FFmpeg AAC; also keeps a clean EPUB3 |
| Interface | OpenAI-compatible /v1/audio/speech server that starts on demand and shuts down on exit, plus a live terminal dashboard and --doctor |
Overview & build notes
Built to make dense textbooks listenable offline without cloud TTS fees or per-character billing. After a one-time voice weight fetch, the entire pipeline stays local on your Mac's unified memory via PyTorch MPS.
Before touching synthesis, converter.py analyses each page's bounding boxes with PyMuPDF to strip running headers, footers and page numbers, glue broken hyphenations back together and sort two-column pages into true reading order.
Synthesis runs through Kokoro-82M served over an on-demand local FastAPI endpoint, muxed by FFmpeg with real chapter metadata into .m4b (or .mp3) alongside a cleaned .epub copy.
Measured performance
| Title | Pages | Audio | Synthesis | Speed |
|---|---|---|---|---|
| Astronomy 2e (OpenStax) | 1,200+ | 55.5 h | ~3.5 h | ~16× |
| Additive Manufacturing Technologies | 500 | 8.0 h | ~32 min | ~15× |
| Python Illustrated | 320 | 9.0 h | ~38 min | ~14× |
Files & artifacts
| Kind | File | Details | Size |
|---|---|---|---|
| Source | audiobook_studio/converter.py | PDF/EPUB extraction, layout cleanup, chapter split and FFmpeg muxer on GitHub | GitHub |
| Source | audiobook_studio/server.py | On-demand local Kokoro-82M PyTorch MPS /v1/audio/speech server | GitHub |
| Docs | docs/ARCHITECTURE.md | Pipeline stages, memory footprint and voice selection notes on GitHub | GitHub |
| Setup | install.sh | Guided macOS installer checking Python, FFmpeg and model weights | GitHub |