Open-source text to speech: best tools to run locally (2026)
Our pick
Start with Kokoro-FastAPI if you want a local text-to-speech server that your other apps can call. It runs from one docker run command on a CPU, an NVIDIA GPU or, experimentally, an AMD GPU, and it offers an OpenAI-compatible speech endpoint. It is Apache-2.0 licensed. The table shows its last commit and latest release, and how the other tools compare.
Best for
- A speech API for your other apps
remsky/Kokoro-FastAPIA Docker wrapper around the Kokoro-82M model with OpenAI-compatible speech endpoints. Images with the model included run on CPU or NVIDIA GPU, and there is an optional web UI.
- A phone, a Raspberry Pi or an app with no internet
k2-fsa/sherpa-onnxRuns speech synthesis locally with onnxruntime and no internet connection. It covers Android, iOS, Raspberry Pi and desktop systems, with bindings for many programming languages.
- Trying many voice models from one web page
rsxdalv/TTS-WebUIOne Gradio and React web interface with extensions for models such as Bark, Tortoise, Kokoro and Piper. It has an installer download and a Docker setup.
- A Mac with Apple Silicon
Neywa-Labs/mlx-audioA text-to-speech, speech-to-text and speech-to-speech library built on Apple's MLX framework. Install it with pip install -U mlx-audio. It also runs an OpenAI-compatible REST API.
- Speech inside a web page or a small program
ayutaz/piper-plusA VITS-based, MIT-licensed multilingual TTS with packages for Python, npm (WebAssembly), Rust and C#, so it can run in the browser as well as on a server.
- Conversation-style speech with laughs and pauses
2noise/ChatTTSA model built for dialogue that can control laughter, pauses and interjections, in English and Chinese. Its released model is licensed CC BY-NC 4.0 for educational and research use.
The repos compared
Checked on Nov 27, 2026: the oldest day any repo in the table was last read from GitHub.
| Repo | Stars | Last commit | Latest release | Licence | Needs |
|---|---|---|---|---|---|
| remsky / Kokoro-FastAPI A Docker server with OpenAI-compatible endpoints for the Kokoro-82M text-to-speech model. | 5,751 GitHub (opens in new tab) | Active Nov 26, 2026 | v0.10.0, Nov 8, 2026 | Apache-2.0 | |
| k2-fsa / sherpa-onnx Offline speech recognition and speech synthesis for many platforms, using onnxruntime. | 16,372 GitHub (opens in new tab) | Active Dec 2, 2026 | v2.0.3, Nov 22, 2026 | Apache-2.0 | |
| rsxdalv / TTS-WebUI One web interface with extensions for many text-to-speech and audio models. | 3,320 GitHub (opens in new tab) | Active Nov 28, 2026 | v1.5.2, Aug 31, 2026 | MIT | |
| ayutaz / piper-plus A multilingual neural TTS system with libraries for Python, npm, Rust and C#. | 246 GitHub (opens in new tab) | Active Nov 14, 2026 | v2.1.0, Nov 13, 2026 | MIT | |
| Neywa-Labs / mlx-audio Text-to-speech, speech-to-text and speech-to-speech models for Apple Silicon, built on MLX. | 8,366 GitHub (opens in new tab) | Active Nov 30, 2026 | v0.6.9, Nov 30, 2026 | MIT | Python 3.11+; Apple Silicon Mac (M1/M2/M3/M4); MLX framework |
| QwenAudio / CosyVoice A multilingual speech generation model with inference, training and deployment code. | 24,593 GitHub (opens in new tab) | Inactive May 25, 2026 | - | Apache-2.0 | |
| snakers4 / silero-models Pre-trained text-to-speech models you load with pip or PyTorch Hub. | 6,242 GitHub (opens in new tab) | Active Oct 15, 2026 | v5.6, Jun 4, 2026 | Custom | |
| espeak-ng / espeak-ng A compact formant speech synthesizer that supports more than 100 languages and accents. | 7,077 GitHub (opens in new tab) | Active Nov 19, 2026 | 1.52.0, Dec 12, 2024 | GPL-3.0 | |
| 2noise / ChatTTS A text-to-speech model for dialogue, with control over laughter and pauses. | 40,053 GitHub (opens in new tab) | Inactive Apr 10, 2026 | v0.2.5, Apr 10, 2026 | AGPL-3.0 | |
| OHF-Voice / piper1-gpl A local neural text-to-speech engine that embeds espeak-ng. | 6,497 GitHub (opens in new tab) | Active Dec 1, 2026 | v1.8.0, Sep 4, 2026 | GPL-3.0 |
Install commands
Copied from each repo. Read its setup steps before you run anything.
remsky/Kokoro-FastAPI
docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:latest rsxdalv/TTS-WebUI
git clone https://github.com/rsxdalv/tts-webui.git
cd tts-webui Questions
What is the best open-source text-to-speech tool?
It depends on where it will run. Kokoro-FastAPI serves a model over an OpenAI-compatible API in Docker. sherpa-onnx runs offline on phones, boards and desktops. mlx-audio is built for Apple Silicon. TTS-WebUI puts many voice models behind one web page.
Can I run text to speech locally without internet?
Yes. sherpa-onnx runs speech synthesis with onnxruntime and no internet connection. The Kokoro-FastAPI Docker images come with the model included, so they run on your own machine once pulled.
Is open-source text to speech free for commercial use?
The code licences differ: Kokoro-FastAPI and CosyVoice are Apache-2.0, piper-plus and TTS-WebUI are MIT, and eSpeak NG is GPL-3.0. Models can carry their own licence. ChatTTS has AGPL-3.0 code, and its released model is CC BY-NC 4.0, meant for educational and research use. Check the model licence as well as the code.
Which open-source text-to-speech works on a Mac?
mlx-audio is built on Apple's MLX framework for Apple Silicon. Kokoro-FastAPI supports Apple Silicon through a start script that runs it directly, and its CPU Docker image also works.
Can open-source text to speech clone a voice?
Some can. CosyVoice supports zero-shot voice cloning across languages, and Kokoro-FastAPI can load custom voicepacks made with a separate tool. Tools built mainly around cloning a voice from a sample are covered on the voice cloning page.
