An open API service indexing awesome lists of open source software.

https://github.com/pinguy/kokoro-tts-addon


https://github.com/pinguy/kokoro-tts-addon

Last synced: 5 months ago
JSON representation

Awesome Lists containing this project

README

          

# Kokoro TTS Add-on

> ๐Ÿง  Local Neural Text-to-Speech for Firefox โ€” fast, private, offline.

> **Tested on a Xeon E3-1265L v3 (2013)** โ€” Ran multiple TTS jobs in parallel with barely perceptible lag.
> If it works on this, it'll fly on your machine.

---

## ๐Ÿ” What is This?

Kokoro TTS is a browser extension that lets you convert selected or pasted text into natural-sounding speech โ€” without needing an internet connection.
It uses a lightweight Flask server and the Kokoro model running locally on your system.

- โœ… No accounts or logins
- โœ… No cloud APIs or telemetry
- โœ… No GPU required but helps a lot, if no usable GPU falls to using the CPU.

---

## ๐Ÿš€ Features

- ๐ŸŽ™๏ธ Neural TTS with multiple voice options
- ๐Ÿ”’ Offline-first & privacy-respecting
- ๐ŸงŠ Lightweight: Small 82M parameters
- ๐Ÿฅ” Works on low-end CPUs
- ๐ŸŒ Linux, macOS, and Windows support

---

## โš™๏ธ Installation

### 1. Download from Releases

Head to the [Releases Page](https://github.com/pinguy/kokoro-tts-addon/releases) and grab:

- `latest kokoro-tts-addon.xpi`
- `server.py`

### 2. Install the Add-on in Firefox

- Go to `about:addons`
- Click the gear icon โ†’ `Install Add-on From File...`
- Select the `.xpi` you downloaded

### 3. Start the Local Server

#### macOS / Linux:
```bash
nohup python3 /path/to/server.py &
```

#### Windows:
Create a `.bat` file like this:
```bat
cd C:\path\to\server
start python server.py
```
Drop a shortcut to it in the Startup folder (`Win + R โ†’ shell:startup`).

To install espeak-ng on Windows:
1. Go to [espeak-ng releases](https://github.com/espeak-ng/espeak-ng/releases)
2. Click on **Latest release**
3. Download the appropriate `*.msi` file (e.g. **espeak-ng-20191129-b702b03-x64.msi**)
4. Run the downloaded installer

For advanced configuration and usage on Windows, see the [official espeak-ng Windows guide](https://github.com/espeak-ng/espeak-ng/blob/master/docs/guide.md)

---

## ๐Ÿงช How to Test

1. Visit `http://localhost:8000/health`
2. You should see a simple โ€œhealthyโ€ JSON response
3. Use the extension: paste text, pick a voice, click โ€œGenerate Speechโ€ ๐ŸŽ‰

---

## ๐Ÿ“Œ Notes

- First-time run will download the model
- Make sure Python 3.8+ is installed and in PATH
- All processing is local โ€” nothing leaves your machine

---

## ๐Ÿงฉ Dependencies

Youโ€™ll need Python 3.8+ and `pip` installed. Most systems already have them.
To install all required Python packages (including some optional extras for extended model usage), run:

```bash
python3 -m pip install --upgrade pip
pip install --upgrade pip setuptools
cat requirements.txt | xargs -n 1 pip3 install
pip3 install -U flask-cors
```

---

## ๐Ÿ“„ License

Licensed under the [Apache License 2.0](LICENSE)

---

## โค๏ธ Credits

Powered by the Kokoro TTS model

---

| Feature | Preview |
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| **Popup UI**: Select text, and this pops up. | [![UI Preview](https://i.imgur.com/zXvETFV.png)](https://i.imgur.com/zXvETFV.png) |
| **Playback in Action**: After clicking "Generate Speech" | [![Playback Preview](https://i.imgur.com/STeXJ78.png)](https://i.imgur.com/STeXJ78.png) |
| **System Notifications**: Get notified when playback starts | *(not pictured)* |
| **Settings Panel**: configuration options | [![Settings](https://i.imgur.com/wNOgrnZ.png)](https://i.imgur.com/wNOgrnZ.png) |
| **Voice List**: Browse the models available | [![Voices](https://i.imgur.com/3fTutUR.png)](https://i.imgur.com/3fTutUR.png) |
| **Accents Supported**: ๐Ÿ‡บ๐Ÿ‡ธ American English, ๐Ÿ‡ฌ๐Ÿ‡ง British English, ๐Ÿ‡ช๐Ÿ‡ธ Spanish, ๐Ÿ‡ซ๐Ÿ‡ท French, ๐Ÿ‡ฎ๐Ÿ‡น Italian, ๐Ÿ‡ง๐Ÿ‡ท Portuguese (BR), ๐Ÿ‡ฎ๐Ÿ‡ณ Hindi, ๐Ÿ‡ฏ๐Ÿ‡ต Japanese, ๐Ÿ‡จ๐Ÿ‡ณ Mandarin Chines | [![Accents](https://i.imgur.com/lc7qgYN.png)](https://i.imgur.com/lc7qgYN.png) |

---

# Video - Kokoro Text-to-Speech - Local on a Potato Vs Hugging Face

[![Watch the video](https://img.youtube.com/vi/6AVZFwWllgU/hqdefault.jpg)](https://www.youtube.com/watch?v=6AVZFwWllgU)

*Comparison of offline using MKLDNN vs online generation using WASM/WebGPU.*

---