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

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.
pdfjs-distextracts text with character positions per pagesentence-splitterchunks the text into TTS-sized pieces- Each chunk is synthesized ahead of playback; the model returns audio + character-to-millisecond timing data
- A
requestAnimationFrameloop compares the current audio time against the timing map and updates the active word pointer - 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.
