SK-404

Doc no. SK-404DatasheetRev 2026.11Sheet 2.7 of 4

A1

Kokoro Audiobook Studio

Turns textbooks and technical PDFs into chaptered .m4b audiobooks — entirely on-device, on the Apple Silicon GPU.

Shipped

01

Block diagram

PDF.pdf / .epub Cleanbbox · hyphens Chaptersoutline · regex Kokoro-82MPyTorch · MPS FFmpeg mux.m4b + chapter marks GPU → Apple Books / VLC
Fig. 1: PDF to audiobook signal path
02

Characteristics

Throughput~16× real-time — 55.5 h of audio from a 1,200+ page textbook in ~3.5 h
ModelKokoro-82M on PyTorch MPS, one shared model across voices
PDF cleanupStrips running headers, footers and page numbers by position and repetition; de-hyphenates; reads two-column layouts in order
ChaptersPDF outline first, then heading patterns, then word-budget chunks
OutputReal, skippable chapter markers via FFMETADATA1 + FFmpeg AAC; also keeps a clean EPUB3
InterfaceOpenAI-compatible /v1/audio/speech server that starts on demand and shuts down on exit, plus a live terminal dashboard and --doctor
  • Python
  • PyTorch
  • PyMuPDF
  • FastAPI
  • FFmpeg
  • Rich
03

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.

04

Measured performance

Apple Silicon M-series
TitlePagesAudioSynthesisSpeed
Astronomy 2e (OpenStax)1,200+55.5 h~3.5 h~16×
Additive Manufacturing Technologies5008.0 h~32 min~15×
Python Illustrated3209.0 h~38 min~14×
05

Files & artifacts

KindFileDetailsSize
Sourceaudiobook_studio/converter.pyPDF/EPUB extraction, layout cleanup, chapter split and FFmpeg muxer on GitHubGitHub
Sourceaudiobook_studio/server.pyOn-demand local Kokoro-82M PyTorch MPS /v1/audio/speech serverGitHub
Docsdocs/ARCHITECTURE.mdPipeline stages, memory footprint and voice selection notes on GitHubGitHub
Setupinstall.shGuided macOS installer checking Python, FFmpeg and model weightsGitHub

A5Odysseus Speech Tools