Native messaging bridge for the Kokoro Web browser extension
Project description
[!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-ttsinstall and model files
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:debugging → This Firefox → Load Temporary Add-on… → select manifest.json inside the extracted folder.
Chromium: open chrome://extensions → enable Developer mode → Load 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 firefoxChrome uv run kokoro-web-setup chromeChromium uv run kokoro-web-setup chromiumEdge uv run kokoro-web-setup edgeBrave uv run kokoro-web-setup braveTo 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 Settings → Advanced 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 Settings → Advanced paths and set the full path to your
kokoro-ttsbinary - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kokoro_web-0.1.0.tar.gz.
File metadata
- Download URL: kokoro_web-0.1.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a30c8e1b16a5b6c60ce914850cc63d9c73c46212ddb258dfac470ca36c4e3ca
|
|
| MD5 |
18011121898ea28d8488fe41171ac094
|
|
| BLAKE2b-256 |
a0dd6d6aa1777d4113848858b42ac93c99f83b850c1dd6d438a042d124b47bd0
|
Provenance
The following attestation bundles were made for kokoro_web-0.1.0.tar.gz:
Publisher:
release.yml on atb00ker/kokoro-web-addon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kokoro_web-0.1.0.tar.gz -
Subject digest:
3a30c8e1b16a5b6c60ce914850cc63d9c73c46212ddb258dfac470ca36c4e3ca - Sigstore transparency entry: 2071953489
- Sigstore integration time:
-
Permalink:
atb00ker/kokoro-web-addon@e01fe2bbfc5c3977260461aeba60958b08bae331 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/atb00ker
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e01fe2bbfc5c3977260461aeba60958b08bae331 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file kokoro_web-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kokoro_web-0.1.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c2861a38f14dc9d2586b93fd1828b79787d2cb893d6ae564bb8520495da7de1
|
|
| MD5 |
775132ccf6a1378efac2ee6ea6ca15c4
|
|
| BLAKE2b-256 |
b46eda97829d21389a63e1a09d43822b090a40ab5cce883f15e883d9473688e1
|
Provenance
The following attestation bundles were made for kokoro_web-0.1.0-py3-none-any.whl:
Publisher:
release.yml on atb00ker/kokoro-web-addon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kokoro_web-0.1.0-py3-none-any.whl -
Subject digest:
8c2861a38f14dc9d2586b93fd1828b79787d2cb893d6ae564bb8520495da7de1 - Sigstore transparency entry: 2071953563
- Sigstore integration time:
-
Permalink:
atb00ker/kokoro-web-addon@e01fe2bbfc5c3977260461aeba60958b08bae331 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/atb00ker
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e01fe2bbfc5c3977260461aeba60958b08bae331 -
Trigger Event:
workflow_dispatch
-
Statement type: