Skip to content
HUIAHUB

RoundupAudio & speech

Open source text to speech you can run yourself: Piper, Kokoro and more

Compare open source text to speech engines Piper, Kokoro, Coqui TTS and Chatterbox by licence, languages and hardware, then pick one you can ship.

Edited by Published 7 min read16 sources

For open source text to speech that runs on your own hardware, Piper and Kokoro are the two projects to try first. Piper is a fast engine with voices in dozens of languages and runs on a CPU. Kokoro is an 82-million-parameter model with Apache-licensed weights. The licence, of both the code and each voice or model file, decides which one you can put in a commercial product.

What to check before you pick a TTS project

A TTS project has two parts with separate licences: the code that runs inference and the trained weights (the "voice" or "model"). A permissive code licence does not make the weights permissive. Coqui's XTTS-v2 is the clearest case: the library is MPL-2.0, while the model is non-commercial only.

Use this checklist on any project you are considering. It is a template; fill in the answers from the project's own README and model card.

CheckWhere to find itWhy it matters
Code licenceLICENSE file in the repositoryCopyleft (GPL) terms apply when you distribute software that includes the code
Weights or voice licenceModel card on Hugging Face, or a per-voice MODEL_CARDCan forbid commercial use even when the code allows it
Training data licenceModel cardSome voices inherit terms from the dataset they were trained on
LanguagesModel card or voice listLanguage codes often differ from the language names people search for
RuntimeREADME install sectionONNX Runtime and PyTorch have very different install sizes and GPU needs
Python versionsPyPI page (requires_python)Several TTS packages pin an upper Python version
MaintenanceLast commit date, archived flag, README noticesAn unmaintained package can stop installing on newer Python
Output markingREADMESome models watermark every file they produce

Piper: fast local TTS on a CPU

Piper describes itself as a fast, local neural TTS engine that embeds espeak-ng for phonemization. Development moved from the original rhasspy/piper repository, now archived, to OHF-Voice/piper1-gpl (opens in a new tab) under the Open Home Foundation. The project README says the foundation is looking for maintainers.

The move changed the licence. The archived repository was MIT. The current repository and the piper-tts package on PyPI (version 1.8.0, Python 3.9 or newer) are GPL-3.0.

Install Piper and download a voice

pip install piper-tts
python3 -m piper.download_voices
python3 -m piper.download_voices en_US-lessac-medium

The first download_voices call lists the available voices. The second downloads one into the current directory. Each voice is two files: an .onnx model and an .onnx.json config.

Generate speech from the command line

python3 -m piper -m en_US-lessac-medium -f test.wav -- 'This is a test.'

The Piper CLI docs warn that this is slow for repeated use, because the voice model loads on every call. For an app, the docs recommend the web server instead:

python3 -m pip install "piper-tts[http]"
python3 -m piper.http_server -m en_US-lessac-medium
curl -X POST -H 'Content-Type: application/json' -d '{ "text": "This is a test." }' -o test.wav localhost:5000/synthesize

The server listens on port 5000 by default. The Python API has PiperVoice.load(), synthesize_wav() for a file and synthesize() for streaming chunks.

Piper hardware and languages

Piper voices are VITS models exported to ONNX Runtime, so Piper runs on a CPU. GPU acceleration is optional: pass --cuda on the CLI or use_cuda=True in Python, which needs the onnxruntime-gpu package. Older binary releases from the archived repository include builds for 64-bit Raspberry Pi 4 and 32-bit Raspberry Pi 3/4.

The voice list covers 44 language and region entries, from Arabic (Jordan) to Chinese, including Welsh, Swahili, Nepali and Telugu. Voices come in quality levels; en_US-lessac-medium is a 22,050 Hz voice.

Kokoro: a small open-weight model

Kokoro-82M (opens in a new tab) is an open-weight TTS model with 82 million parameters, built on the StyleTTS 2 architecture with an ISTFTNet decoder. Version 1.0 was published on 27 January 2025 and has 8 languages and 54 voices. Its weights are Apache 2.0, and the model card says it has been deployed in commercial APIs.

The model card says Kokoro was trained only on permissive or non-copyrighted audio: public domain audio, audio under licences such as Apache and MIT, and synthetic audio from closed TTS models. It lists two CC BY datasets used in training. The total was a few hundred hours of audio, and training cost about $1,000 for 1,000 A100 80GB GPU hours.

Install Kokoro and generate audio

The kokoro inference library (opens in a new tab) is also Apache 2.0. The kokoro package (0.9.4 on PyPI) needs Python 3.10 to 3.12. Install it with espeak-ng, which Kokoro uses as an English fallback and for some other languages:

pip install "kokoro>=0.9.4" soundfile
sudo apt-get install espeak-ng

On Windows, the README points to the .msi installer from the espeak-ng releases page.

from kokoro import KPipeline
import soundfile as sf

pipeline = KPipeline(lang_code='a')  # 'a' is American English
generator = pipeline("Kokoro runs on your own machine.", voice='af_heart')
for i, (gs, ps, audio) in enumerate(generator):
    sf.write(f'{i}.wav', audio, 24000)

Kokoro outputs 24 kHz audio. The lang_code must match the voice. The documented codes are a (American English), b (British English), e (Spanish), f (French), h (Hindi), i (Italian), j (Japanese, needs misaki[ja]), p (Brazilian Portuguese) and z (Mandarin Chinese, needs misaki[zh]).

Kokoro runs on PyTorch. On Apple Silicon Macs, the README says to set PYTORCH_ENABLE_MPS_FALLBACK=1 to use the GPU.

Other active open-source TTS projects

Coqui TTS and the idiap fork

The original coqui-ai/TTS (opens in a new tab) repository last received a push in August 2024, and its TTS package on PyPI (0.22.0) requires Python older than 3.12. The Idiap Research Institute maintains a fork, idiap/coqui-ai-TTS, which calls the original unmaintained and publishes a new package, coqui-tts (0.27.5, Python 3.10 to 3.14).

The library code is MPL-2.0. It includes many model architectures (VITS, Tacotron 2, Glow-TTS, XTTS, Bark, Tortoise) and can use Fairseq models covering about 1,100 languages. From coqui-tts 0.27.4, you install PyTorch yourself first, choosing the CPU, CUDA or ROCm build.

XTTS-v2, the best-known Coqui model, supports 17 languages and clones a voice from a 6-second clip. Its weights are under the Coqui Public Model License 1.0.0, which allows only non-commercial use of the model and its outputs.

Chatterbox from Resemble AI

Chatterbox (opens in a new tab) is a family of TTS models from Resemble AI, with the code and the main weights under MIT. The family includes Chatterbox-Turbo (350M parameters, English), Chatterbox-Nano (110M parameters, English) and Chatterbox Multilingual V3 (500M parameters, 23 listed languages). Resemble AI states that Nano runs 3x faster than real time on 8 CPU cores.

Install it with pip install chatterbox-tts. The README says it was developed and tested on Python 3.11. Every file Chatterbox generates carries Resemble AI's Perth watermark, which is imperceptible and can be detected with the perth library. The Turbo example in the README generates speech from a reference clip you supply for voice cloning.

Licence differences that matter for commercial use

Three cases decide most commercial questions.

Copyleft code. Piper's current code is GPL-3.0. GPL obligations attach when you distribute software that includes the code, for example inside a desktop app or device firmware. Calling a Piper server you run yourself is a different arrangement. Read the licence text, or ask a lawyer, before you bundle it.

Non-commercial weights are the second case. XTTS-v2 under the CPML cannot be used for revenue-generating work, and the restriction covers its audio output. The CPML also says that using the model to train other models for commercial use is not a non-commercial purpose.

Per-voice terms are the third. Piper's voice docs say each voice's MODEL_CARD holds its licensing information and that some voices may have restrictive licences. The en_US-lessac-medium card, for example, links to the licence of the Blizzard 2013 Lessac dataset it was trained on. Piper's docs also describe the project as intended for personal use and TTS research.

Kokoro (Apache 2.0 code and weights) and Chatterbox (MIT code and weights) have the simplest terms of the four, though Chatterbox output is always watermarked.

Open source text to speech comparison table

All values come from each project's README, model card or PyPI page as of October 2026. "Unknown" means the source does not say.

ProjectCode licenceWeights licenceLanguagesRuntime and hardwarePython
Piper (piper-tts 1.8.0)GPL-3.0Per voice, see each MODEL_CARD44 language and region entriesONNX Runtime on CPU; optional CUDA via onnxruntime-gpu3.9+
Kokoro-82M (kokoro 0.9.4)Apache 2.0Apache 2.08 (9 language codes)PyTorch; MPS fallback on Apple Silicon3.10 to 3.12
Coqui TTS (coqui-tts 0.27.5)MPL-2.0XTTS-v2: CPML (non-commercial); other models not listed in the READMEXTTS-v2: 17; Fairseq models: about 1,100PyTorch 2.2+ on CPU, CUDA or ROCm3.10 to 3.14
Chatterbox (chatterbox-tts 0.1.7)MITMITMultilingual V3: 23; Turbo and Nano: EnglishPyTorch on CUDA, CPU or MPS; Nano targets CPUTested on 3.11
Original Coqui (TTS 0.22.0)MPL-2.0XTTS-v2: CPML (non-commercial); others not listedUnknown overallPyTorch3.9 to 3.11

Frequently asked questions

Can I use Piper in a closed-source commercial app?

Piper's current code is GPL-3.0, so bundling it into software you distribute brings GPL obligations, including sharing source under the same terms. Each voice also has its own licence in its MODEL_CARD, which can add limits. Check both the code licence and the voice's dataset licence, and have a lawyer confirm how they apply to your product.

Does Kokoro support voice cloning?

The Kokoro model card and README do not describe a voice cloning feature. Kokoro ships 54 preset voices in version 1.0, and the README shows loading a voice tensor from a `.pt` file. If you need cloning from a reference clip, Chatterbox and XTTS-v2 document it, under very different licences.

Which of these engines run without a GPU?

Piper runs on a CPU by default through ONNX Runtime, and GPU support is an optional add-on. Chatterbox-Nano targets CPU inference according to Resemble AI. Kokoro and Coqui run on PyTorch, which has CPU builds, but their docs do not give CPU speed figures.

Is the original Coqui TTS package still safe to install?

The `TTS` package on PyPI is at 0.22.0, requires Python older than 3.12, and the original repository has not had a push since August 2024. The Idiap fork publishes `coqui-tts`, which supports Python up to 3.14. New projects are better served by the fork.

Are the audio files these models produce marked in any way?

Chatterbox embeds Resemble AI's Perth watermark in every file, and the README includes code to detect it. The Piper, Kokoro and Coqui docs reviewed for this article do not mention watermarking.

Sources

  1. 1.GitHub - OHF-Voice/piper1-gpl: Fast and local neural text-to-speech engine · GitHubRepositoryPrimarygithub.com
  2. 2.GitHub - hexgrad/kokoro: https://hf.co/hexgrad/Kokoro-82M · GitHubRepositoryPrimarygithub.com
  3. 3.hexgrad/Kokoro-82M · Hugging FaceOfficial docsPrimaryhuggingface.co
  4. 4.GitHub - coqui-ai/TTS: 🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production · GitHubRepositoryPrimarygithub.com
  5. 5.github.com/rhasspy/piperRepositoryPrimary
  6. 6.pypi.org/project/piper-ttsWeb
  7. 7.github.com/OHF-Voice/piper1-gpl/blob/main/docs/CLI.mdRepositoryPrimary
  8. 8.github.com/OHF-Voice/piper1-gpl/blob/main/docs/API_HTTP.mdRepositoryPrimary
  9. 9.pypi.org/project/kokoroWeb
  10. 10.github.com/idiap/coqui-ai-TTSRepositoryPrimary
  11. 11.pypi.org/project/coqui-ttsWeb
  12. 12.huggingface.co/coqui/XTTS-v2RepositoryPrimary
  13. 13.huggingface.co/coqui/XTTS-v2/blob/main/LICENSE.txtRepositoryPrimary
  14. 14.github.com/resemble-ai/chatterboxRepositoryPrimary
  15. 15.huggingface.co/ResembleAI/chatterboxRepositoryPrimary
  16. 16.pypi.org/project/chatterbox-ttsWeb

Spotted an error? See our corrections policy.

Enjoyed this? Get the weekly brief.

New guides, Project & Tool of the Week and the AI developments that matter. One email, no spam.

Read next