AI-native audiobook system · daily driver
Narrate
Converts any document into a narrated audiobook — voice personality per book, AI cover art, adaptive streaming, and lock-screen captions. Built for daily personal use. Designed for anyone who prefers listening — and for people facing barriers to reading through vision, literacy, language, or attention.
The product
Library
Book detail
Player
Lock screen
The problem
Reading backlogs never shrink. PDFs, whitepapers, and long-form documents sit unopened because sustained reading requires uninterrupted attention that modern life rarely provides — and audiobook platforms only serve commercially published content. But the gap runs deeper: the same document-first information sources that overload a time-poor professional are completely inaccessible to anyone who cannot read — due to visual impairment, low literacy, or language. Government notices, public health circulars, official contracts. A voice layer that understands document structure, adapts to genre, and works on any file format would change that.
How it works
- Narrate-Ready preprocessing pipeline: any uploaded file — PDF, TXT, Markdown — runs through a 9-rule spec: document type classification (fiction, business, technical, academic, transcript), language detection, running header and footer stripping, bullet-to-ordinal conversion, heading normalisation, table-to-prose, abbreviation expansion, code block handling, and chat/transcript cleaning. The result is a structured NarrateReadyDocument with clean chapter boundaries. The spec is published as NARRATE_READY_GUIDE.md — a canonical standard designed to be implementation-independent.
- Three-layer narration quality pipeline. Layer 1: deterministic preprocessing (lib/narrate.ts) — markdown to natural speech, no API call, ~0ms. Layer 2: voice personality — one GPT-4o-mini call at upload extracts genre, tone, and audience and writes voice_instructions injected into every TTS call for that book. A strategy whitepaper gets "measured authority, pause after data points"; a memoir gets "warm, conversational pace, light emphasis on emotional moments". Layer 3: Narrate-Ready structural preprocessing, applied first for complex documents.
- Adaptive buffered conversion — the same model as YouTube's progressive video loading. Narrate converts 25% of chapters at a time, clamped 10–40 per batch, with a 5-chapter buffer threshold that auto-triggers the next batch as you listen. A 200-chapter book has chapter 1 ready in under 30 seconds. GlobalConversion is mounted at layout level — conversion survives all navigation and never pauses because the user tapped back to the library.
- AI cover art (DALL-E 3, style-aware prompt from BookContext) stored in Cloudflare R2, displayed in the book detail hero, full player, mini-player, and iOS lock screen via MediaSession. Intro and outro TTS bookends — GPT-4o-mini writes the scripts, TTS generates the clips — frame every book as a proper listening experience. For returning listeners, a "Where you are" context card shows SO FAR and NEXT UP, generated from the last three chapter excerpts and cached per chapter. AI chapter titling generates readable headings for documents with no natural chapter structure. A narrated brief — a condensed audio summary of the entire book — is generated per book for listeners who want the argument before committing to the full read.
- Three-mode lock-screen captions via MediaSession API: off (standard title and chapter), phrases (5-word clusters updating as narration progresses), or full sentence (80-char truncated). A single GlobalAudio element at layout level maintains audio context across all navigation — required for MediaSession and seamless chapter auto-advance. PWA with safe-area-aware layout for all iPhone models.
- No database: Cloudflare R2 is the entire data layer — book metadata, voice context, segment JSON, audio MP3s, cover art, intro/outro clips, summary audio, and chapter data under a deterministic key hierarchy. No migrations, no ORM. Free egress means audio streaming costs essentially nothing at personal scale.
The journey
A personal tool built to production standard — preprocessing pipeline, adaptive streaming, lock-screen integration, AI cover art, and a narrated brief for every book. The same architecture a universal audio accessibility layer would use.
Any document, classified and restructured before narration begins
Upload a PDF, Markdown file, or plain text. The Narrate-Ready pipeline classifies the document type — fiction, business, technical, academic, transcript — strips PDF artefacts (running headers, TOC dot-leaders, watermarks), converts bullets to natural ordinals, normalises headings, and detects chapter boundaries. A 250-page whitepaper and a chat transcript are handled by the same pipeline, each classified and restructured appropriately. The result is a structured document with clean chapter titles, previewed before any audio is generated — so you can see what Narrate understood before you commit.
Voice personality extracted from the document — and a cover generated to match
One GPT-4o-mini call at upload reads the content and generates voice_instructions specific to this book. A strategy whitepaper gets "measured authority, pause after data points"; a memoir gets "warm, conversational pace, light emphasis on emotional moments". These instructions are injected into every TTS call for every chapter. DALL-E 3 generates a style-aware cover from the same context. Both are stored once in R2 and applied throughout — so the voice and the cover are consistent across 200 chapters without any per-chapter LLM overhead.
Your library — a personal shelf with AI covers, progress, and a Continue Listening strip
Every book shows its AI-generated cover, author, chapter count, and conversion progress. A "Continue Listening" strip at the top resurfaces the most recent book exactly where you stopped. Six voices, five speeds, search by title. A mini-player persists across all navigation — mounted at layout level alongside GlobalConversion — so conversion never pauses and audio never cuts when you move between pages.
Returning listeners get context: where they stopped, what comes next, and a narrated brief
On any book with saved progress, the book detail page shows a "Where You Are" card — SO FAR (a sentence summarising what has been covered) and NEXT UP (a sentence on the chapter ahead), generated by GPT-4o-mini from the last three chapter excerpts and cached per chapter in localStorage. An intro bookend frames the start of every session; an outro closes it. A narrated brief — a condensed full-book audio summary — is generated per book and available on the detail page for listeners who want the argument before committing to the full read.
The lock screen shows what is being spoken — in three modes
MediaSession API keeps the iOS lock screen and notification shade in sync: cover art, chapter title, playback controls. The padlock button in the player utility bar cycles through three caption modes — off, phrases (5-word clusters updating as narration progresses), or full sentence (80-char truncated). A single GlobalAudio element at layout level means audio context never breaks: lock-screen controls work, chapter auto-advance is seamless, and the mini-player reflects the correct state everywhere in the app.
Highlights
- Narrate-Ready pipeline — 9-rule preprocessing for any document type, published as a canonical spec
- Three-layer narration quality — deterministic + voice personality + structural Narrate-Ready
- AI cover art (DALL-E 3) · intro/outro bookends · "Where you are" · narrated brief · AI chapter titling
- Adaptive conversion — 200-chapter book starts in <30s · GlobalConversion survives all navigation
- Lock screen — 3-mode captions (off · phrases · sentence) via MediaSession API · PWA
- No database — Cloudflare R2 as complete data layer · 6 voices · 5 speeds · used daily
Stack
Signature features
Narrate-Ready preprocessing
9-rule pipeline: document type classification, language detection, noise stripping, bullet-to-ordinal conversion, table-to-prose, and abbreviation expansion — codified as a publishable spec.
Voice personality per book
One GPT-4o-mini call at upload writes voice instructions injected into every TTS chapter call. A whitepaper and a memoir sound noticeably different.
AI-generated cover art
DALL-E 3, style-aware prompt from BookContext. Displayed in the player, mini-player, book detail hero, and iOS lock screen via MediaSession.
Narrated brief
A condensed full-book audio summary — generated per book and available on the detail page for listeners who want the argument before the full read.
"Where you are" context
SO FAR / NEXT UP for returning listeners — generated by GPT-4o-mini from the last three chapter excerpts, cached per chapter in localStorage.
3-mode lock-screen captions
Off, phrases (5-word clusters), or sentence (80-char) — set via the padlock button, updated live via MediaSession as narration progresses.
By the numbers
8+
books narrated
125
chapters in longest book
<30s
start time, 200-chapter book
3
lock-screen caption modes
0
databases — R2 only
daily
personal use
Why it matters
Narrate proves product craft in a different way: it is not only architecturally complex, it is useful enough to become a daily habit. Eight books narrated, including a 125-chapter academic text on AI strategy. Every architectural decision reflects a deliberate trade-off: deterministic preprocessing over API calls where rules are predictable; one voice-personality call per book at upload rather than per chapter; DALL-E 3 cover art because MediaSession artwork on the lock screen makes it feel like a real audiobook, not a TTS tool. The Narrate-Ready spec is a publishable standard for document-to-audio preprocessing — designed to be implementation-independent. The same architecture extends naturally into universal audio accessibility: a QR code on a public notice board, a short link, a multilingual narration on the user's phone.