sk.
←All work

Project 03

Kitten TTS Reader

A Chrome extension backed by a local FastAPI server running the open-source Kitten TTS model. No API keys, no cloud, no text leaving your device.

Stack
Chrome Extension · FastAPI · Python · ONNX · Transformers.js

At a glance

  • Neural text-to-speech for any web page, with eight voices to choose from.
  • All inference runs locally, giving sub-50ms latency on modern hardware and no API costs.
  • Works offline after the first model download.

The problem

Cloud text-to-speech means API costs, rate limits, network latency, and sending everything you read to a third party. Built-in browser voices avoid that but sound robotic. The goal was neural-quality voices with none of the cloud trade-offs.

What I built

Chrome extension
A service worker (background.js) for command routing and lifecycle, a content script (content.js) for DOM traversal, text extraction, and playback, and a popup for voice selection and controls.
Local inference server
An async FastAPI service (main.py) that runs the Kitten TTS model on-device and streams audio back to the extension, with eight voices.

How it works

  1. 01The content script extracts readable text from the current page.
  2. 02Text is sent to the local FastAPI server.
  3. 03The server tokenizes it and runs a forward pass through the neural model.
  4. 04The resulting audio buffer is streamed back to the browser.
  5. 05The extension plays it with user controls for voice and speed.

Key decisions

Local inference over a cloud API
Running the model on-device removes API costs, rate limits, and network latency, and means no text ever leaves the machine.
Split extension and server
The extension stays lightweight and handles the page; the Python service owns the model. Each side can be changed independently.

Outcome

  • Zero API costs and no rate limits.
  • Sub-50ms latency on modern hardware.
  • Useful for accessibility, listening to long articles and papers, and language learning.

Next project

Aero Linux

A custom Arch-based Linux distribution tuned for performance and security research out of the box.

→