Skip to content

ys-pro-duction/TtsReader

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published