Skip to main content

Native messaging bridge for the Kokoro Web browser extension

Project description

Kokoro Web

Kokoro Web

Read text aloud in your browser — powered by local kokoro-tts.

Install for Chrome Install for Firefox

Python TypeScript Developer guide Privacy Policy Upstream: kokoro-tts License: MIT

[!NOTE] This project stands on the shoulders of the Kokoro TTS team. Kokoro Web is only a browser extension and native messaging bridge — the model, voices, and synthesis engine are entirely their work. Thank you to everyone who built and maintains kokoro-tts for doing the difficult part that makes this add-on possible. This project is not affiliated with the Kokoro TTS team.

[!CAUTION] This project does not provide TTS services. It is a browser extension and native messaging bridge only. You must install kokoro-tts and the Kokoro model files on your system — your machine runs the actual text-to-speech engine. This setup is more involved than click-and-install.

This codebase has been tested on Linux (Debian) with Chromium and Firefox only. If you encounter issues with other browsers or operating systems, please open an issue and I'll try to help.

Features

  • Local and private — synthesis runs on your machine; nothing is sent to the cloud
  • Popup — paste text, pick voice and speed, play/pause/stop
  • Read anywhere — select text on any page → right-click → Read with Kokoro
  • Read page — read the main page content from the context menu, popup, or read-along sidebar
  • Read-along sidebar — follow along while text is spoken (Firefox sidebar / Chrome side panel)
  • Flexible setup — works with your existing kokoro-tts install and model files

Read with Kokoro in the context menu and the read-along sidebar on a Wikipedia page

Select text → Read with Kokoro, or open the read-along sidebar to read the full page.

See our Privacy Policy — no cloud, no analytics, no data sent to the developer.

Installation

Browser Store

Install from Firefox Add-ons or the Chrome release (use the badges at the top), restart your browser, and open the extension.

Direct Install

Prefer not to use a browser store? Download the extension zip from GitHub Releases (kokoro-web-*-firefox.zip or kokoro-web-*-chrome.zip), extract it, and load it manually.

Firefox: open about:debuggingThis FirefoxLoad Temporary Add-on… → select manifest.json inside the extracted folder.

Chromium: open chrome://extensions → enable Developer modeLoad unpacked → select the extracted folder.

If you have not run setup yet, register the native host once (covers Firefox and Chrome):

kokoro-web-setup

Restart the browser, open the extension, and click Test connection.

Quick start

Step 1 — Install kokoro-tts and model files

uv tool install kokoro-tts

mkdir -p ~/.kokoro && cd ~/.kokoro
wget https://github.com/nazdridoy/kokoro-tts/releases/download/v1.0.0/voices-v1.0.bin
wget https://github.com/nazdridoy/kokoro-tts/releases/download/v1.0.0/kokoro-v1.0.onnx

Step 2 — Install the browser bridge

uv run pip install kokoro-web
uv run kokoro-web-setup

The setup command registers the native host for browsers it detects (Firefox, Chrome, Chromium, Edge, Brave). To install for a specific browser, use the corresponding command below:

Browser Command
Firefox uv run kokoro-web-setup firefox
Chrome uv run kokoro-web-setup chrome
Chromium uv run kokoro-web-setup chromium
Edge uv run kokoro-web-setup edge
Brave uv run kokoro-web-setup brave

To register the native host for all supported browsers, use: uv run kokoro-web-setup --all

Step 3 — Install the extension

Install from Firefox Add-ons or the Chrome release (use the badges at the top), restart your browser, and open the extension.

The first time you open it, click Test connection. If setup succeeded, you can paste text and press Play.

Usage

Where What you can do
Popup Paste text, choose voice/speed, play/pause/stop, Read page
Context menu Select text → Read with Kokoro, or Read page with Kokoro
Read-along sidebar Read page aloud, play/pause/stop, search and follow along in text

Advanced paths

Open extension SettingsAdvanced paths if kokoro-tts is not on your PATH or models live somewhere other than ~/.kokoro. The bridge auto-detects common locations when possible.

Why is a bridge required?

Browsers cannot run local programs directly from an extension (security). The kokoro-web pip package registers a tiny native messaging host that forwards requests to your installed kokoro-tts and streams audio back to the browser.

flowchart LR
  Extension["Browser extension"] -->|"native messaging"| Host["kokoro-web host"]
  Host --> CLI["kokoro-tts CLI"]
  CLI --> Audio["Audio stream"]
  Audio --> Extension

Firefox and Chrome use the same Python host script. They only differ in where the registration JSON file is stored.

Troubleshooting

Setup command not run

If the extension shows "One-time setup required", run:

pip install kokoro-web && kokoro-web-setup

By default, setup registers only browsers it detects on your system. To force a specific browser:

kokoro-web-setup edge

To register every supported browser:

kokoro-web-setup --all

Restart the browser, then click Test connection.

Verify native host registration

Firefox (Linux):

cat ~/.mozilla/native-messaging-hosts/com.kokoro.web.json

Firefox (macOS):

cat ~/Library/Application\ Support/Mozilla/NativeMessagingHosts/com.kokoro.web.json

Chrome or Chromium (Linux):

cat ~/.config/google-chrome/NativeMessagingHosts/com.kokoro.web.json

Chrome (macOS):

cat ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.kokoro.web.json

Chrome (Windows):

reg query "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.kokoro.web"

If you upgraded from an older release, you can remove the legacy Firefox manifest:

rm -f ~/.mozilla/native-messaging-hosts/com.kokoro.web_addon.json
kokoro-tts works in terminal but not the extension
  • Confirm model files are in the configured model directory
  • Open SettingsAdvanced paths and set the full path to your kokoro-tts binary
  • Click Test connection again

Developers

Want to run the extension from source, change the bridge, or contribute?
See developer guide for prerequisites, setup, and the local development workflow. Pull requests are welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kokoro_web-0.1.1.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kokoro_web-0.1.1-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file kokoro_web-0.1.1.tar.gz.

File metadata

  • Download URL: kokoro_web-0.1.1.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kokoro_web-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c5ed891bcecda04b645f3a595d67914ae9ac6802ff6f66fdb8714d696d077345
MD5 bcf55064675bb52213e83aa0848bcb00
BLAKE2b-256 fce80102a409bb941d3b2da9900715286661221e82934a3183b0b031de0f9648

See more details on using hashes here.

Provenance

The following attestation bundles were made for kokoro_web-0.1.1.tar.gz:

Publisher: publish.yml on atb00ker/kokoro-web-addon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kokoro_web-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kokoro_web-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kokoro_web-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 efa6dd20bc8b451cf73cfaa7243018bc05c122fff5735bb9b45dd9e872c25ae2
MD5 13c265a5ca46cc9bb9abd6f19f17f199
BLAKE2b-256 2d1c26ae4a94b82fb5092f897c88bce90a69cfce35843ec1c65c18d4d1f97ba2

See more details on using hashes here.

Provenance

The following attestation bundles were made for kokoro_web-0.1.1-py3-none-any.whl:

Publisher: publish.yml on atb00ker/kokoro-web-addon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page