TtsReader πŸ—£οΈ | Smart Offline Text-to-Speech Reader

TtsReader is a cross-platform, offline TTS app built with Kotlin Multiplatform and Jetpack Compose, using the Kokoro TTS model through sherpa-onnx via JNI. It offers intelligent sentence-by-sentence speech with real-time highlighting β€” no internet or cloud required.


TtsReader UI   Chrome Extension Context Menu

---

✨ Key Features

  • πŸ–₯️ Kotlin Multiplatform Desktop App (Jetpack Compose UI)
  • 🎀 Offline TTS using Kokoro + sherpa-onnx + JNI
  • πŸ“– Smart Sentence Playback: one sentence at a time with buffering
  • πŸ”¦ Live Highlighting: currently spoken sentence is highlighted
  • 🌐 Chrome Extension Support:
    • Right-click selected text β†’ β€œPlay with TtsReader”

πŸš€ Getting Started

πŸ“¦ Windows Installer

Download the prebuilt .msi:


πŸ”§ Requirements

  • JDK 17+
  • Git
  • Chrome (for browser extension)

πŸ›  Run from Source

git clone https://github.com/ys-pro-duction/TtsReader.git
cd TtsReader
./gradlew run

🌐 Browser Extension

(Optional) browser extension for sending selected text to the desktop app.

Chrome extention

  1. Download: chrome-extension.zip
  2. Extract it
  3. Open Chrome β†’ chrome://extensions
  4. Enable Developer Mode
  5. Click β€œLoad unpacked” β†’ select extracted folder
  6. Select text on any webpage β†’ right-click β†’ β€œPlay with TtsReader”

Firefox addon

https://addons.mozilla.org/en-US/firefox/addon/ttsreader-text-to-speech/

TtsReader desktop app must be running in the background.


πŸŽ™οΈ How It Works

  • Text is broken into sentences using punctuation

  • The app:

    • Plays 1 sentence at a time
    • Buffers the next 2 sentences for seamless delivery
    • Highlights the active sentence in the UI
  • Playback uses native Kokoro ONNX models via JNI


πŸ“¦ Models

First launch will download required models to:

~/.TtsReader/
β”œβ”€β”€ model.onnx
β”œβ”€β”€ tokens.txt
β”œβ”€β”€ config.json

TtsReader β€” Read your text aloud, smoothly and intelligently, all offline.