Audiobook PDF Reader

June 29, 2026

A client-side app that turns any PDF into an audiobook—no server, no API key, no account.

Live: audiobook.vedgupta.in · Source: github.com/innovatorved/audiobook

162ea787-86f9-4bc1-8d7e-3edfb3f01572.png

What it does

  • Upload PDFs and keep them in a local library
  • Listen with an offline neural TTS voice (Kokoro via ONNX Runtime Web)
  • Follow word-by-word highlighting synced to playback
  • Click any sentence to seek to that point
  • Resume where you left off

Everything runs in the browser. PDFs never leave your device.

Word-level sync

This was the most interesting part to build.

  1. pdfjs-dist extracts text with character positions per page
  2. sentence-splitter chunks the text into TTS-sized pieces
  3. Each chunk is synthesized ahead of playback; the model returns audio + character-to-millisecond timing data
  4. A requestAnimationFrame loop compares the current audio time against the timing map and updates the active word pointer
  5. Clicking a word resolves its sentence, seeks the audio to that timestamp, and resumes instantly

Stack

React 19 · TypeScript · pdfjs-dist · kitten-tts-js (ONNX Runtime Web) · Tesseract.js · Zustand · Dexie (IndexedDB) · TanStack Virtual · Vite · Bun

Open audiobook.vedgupta.in , upload a PDF, and press play.

Ved Gupta

Loading Mascot