Skip to content
,

Piper TTS Guide (2026): Free Offline Text-to-Speech on PC and Raspberry Pi

7–11 minutes
Surprised woman in a green hoodie in a server room holding a card reading PIPER, with the text Free Offline Text to Speech

Piper is a small, fast, free text-to-speech engine that runs completely offline. It turns text into natural-sounding speech in a fraction of a second, even on a Raspberry Pi. That is why it powers the voice in Home Assistant, the NVDA screen reader and many hobby voice assistants.

It will not match the most expressive AI voices. In return it is tiny, needs no GPU and covers more than 40 languages, including Hindi, Telugu and Malayalam.

This guide shows how to install Piper and pick a voice. It covers the command line, the built-in web server and Python, plus speed and tone settings, licensing for commercial use, and common errors.

Everything is checked against the current Piper project (now maintained by the Open Home Foundation as piper1-gpl) and the piper-tts 1.8.0 package on PyPI, November 2026.

TL;DR

  • Install: pip install piper-tts (Python 3.9+).
  • Get a voice: python3 -m piper.download_voices en_US-lessac-medium (run without a name to list voices).
  • Speak: python3 -m piper -m en_US-lessac-medium -f test.wav -- 'Hello world'
  • Web UI and API: pip install "piper-tts[http]" then python3 -m piper.http_server -m en_US-lessac-medium and open http://localhost:5000.
  • Speed: length_scale above 1 is slower, below 1 is faster. GPU is optional (--cuda with onnxruntime-gpu).
  • Licence: the engine is GPL-3.0. Each voice has its own licence in its MODEL_CARD; lessac-based voices are not for commercial use.

What Is Piper TTS?

Piper is a neural text-to-speech engine. Its voices are trained with VITS and exported to ONNX, and it uses espeak-ng to turn text into phonemes. In practice that means:

  • Offline: after downloading a voice, nothing goes to the internet.
  • Light: runs on ordinary CPUs and small boards like the Raspberry Pi 4 and 5.
  • Fast: short sentences are ready almost instantly once the voice is loaded.
  • Many languages: 40+ languages and regional variants, each with one or more voices.

The original rhasspy/piper repository has moved. Development continues at OHF-Voice/piper1-gpl under the Open Home Foundation, and the Python package is piper-tts. Older tutorials that use a piper binary with --model and --output_file flags refer to the previous version.

Piper vs Other Local TTS

Engine Strength Hardware Best for
Piper Very fast, tiny, many languages CPU, Raspberry Pi Voice assistants, screen readers, notifications, bulk narration
Kokoro More natural English voices, still small CPU or GPU Narration, videos, audiobooks
Zonos and other large models Expressive, emotional speech GPU recommended Character voices, high-quality content

Choose Piper when speed, low resources or language coverage matter more than studio-level expression.

How to Install Piper

  1. Install Python 3.9 or newer. Check with python3 --version (or python --version on Windows).
  2. Create a virtual environment so Piper stays separate:
    python3 -m venv piper-env then activate it (piper-env\Scripts\activate on Windows, source piper-env/bin/activate on Mac and Linux).
  3. Install Piper: pip install piper-tts
  4. Optional web server: pip install "piper-tts[http]"
  5. Optional GPU: pip install onnxruntime-gpu for NVIDIA cards. Piper is fast on CPU, so most people can skip this.

Piper bundles espeak-ng, so you do not need to install it separately for normal use. On Windows, use python instead of python3 in the commands below.

Choose and Download Voices

Voice names follow the pattern language_REGION-name-quality, for example en_US-lessac-medium or en_GB-alan-low. Quality is usually x_low, low, medium or high; higher quality sounds better but runs a little slower.

  1. Listen first on the official samples page (rhasspy.github.io/piper-samples) to pick a voice you like.
  2. List all voices: python3 -m piper.download_voices
  3. Download one: python3 -m piper.download_voices en_US-lessac-medium
  4. Choose a folder with --data-dir voices to keep voices tidy (the default is the current folder).

Each voice is two files: a .onnx model and a matching .onnx.json config. Keep them together. Voices are also listed on Hugging Face at rhasspy/piper-voices.

Supported languages (selection)

Region Languages with Piper voices
India and South Asia Hindi (hi_IN), Telugu (te_IN), Malayalam (ml_IN), Nepali (ne_NP)
English US (en_US) and UK (en_GB)
Europe German, French, Spanish, Italian, Dutch, Polish, Portuguese, Russian, Ukrainian, Swedish and more
Other Arabic, Chinese, Farsi, Turkish, Vietnamese, Indonesian, Swahili, Kazakh and more

Use Piper From the Command Line

# write a WAV file
python3 -m piper -m en_US-lessac-medium -f hello.wav -- 'This is a test of Piper.'

# voices in another folder
python3 -m piper --data-dir voices -m en_US-lessac-medium -f hello.wav -- 'Hello!'

# read text from a file
python3 -m piper -m en_US-lessac-medium --input-file story.txt -f story.wav

# play straight to speakers (needs ffplay from FFmpeg)
python3 -m piper -m en_US-lessac-medium -- 'This will play on your speakers.'

Useful options from the Piper docs:

Option What it does
--cuda Use the NVIDIA GPU (needs onnxruntime-gpu)
--input-file Read text from one or more files
--sentence-silence Add seconds of silence between sentences
--volume Volume multiplier (default 1.0)
--no-normalize Turn off automatic volume normalisation
--output-raw Stream raw audio (see --help)

The command line reloads the voice every time, so it is slower for many short phrases. For repeated use, run the web server.

Run the Piper Web Server and API

  1. Install the extra: pip install "piper-tts[http]"
  2. Start the server: python3 -m piper.http_server -m en_US-lessac-medium (add --data-dir, --host or --port if needed; the default port is 5000).
  3. Open the web UI at http://localhost:5000, type text and click Speak. Under Settings you can change length, noise and noise W scales and pick a speaker for multi-speaker voices.
  4. Call the API from any app:
curl -X POST -H 'Content-Type: application/json' \
  -d '{ "text": "This is a test." }' \
  -o test.wav localhost:5000/synthesize

curl localhost:5000/voices   # list voices
curl localhost:5000/info     # voice details and defaults

JSON fields for /synthesize: text (required), plus optional voice, speaker, speaker_id, length_scale, noise_scale and noise_w_scale. Keep the server on localhost unless you add your own protection.

This makes Piper an easy voice for local chatbots. For example, pair it with a local model from our Ollama guide and speech input from our Whisper local guide for a fully offline voice assistant.

Use Piper in Python

import wave
from piper import PiperVoice, SynthesisConfig

voice = PiperVoice.load("voices/en_US-lessac-medium.onnx")

with wave.open("welcome.wav", "wb") as wav_file:
    voice.synthesize_wav("Welcome to the world of speech synthesis!", wav_file)

# slower, calmer speech
cfg = SynthesisConfig(length_scale=1.3, noise_scale=0.6, volume=0.9)
with wave.open("slow.wav", "wb") as wav_file:
    voice.synthesize_wav("Take a deep breath and relax.", wav_file, syn_config=cfg)

Load the voice once and reuse it; that is where Piper’s speed comes from. For GPU use PiperVoice.load(path, use_cuda=True) with onnxruntime-gpu installed. For streaming, loop over voice.synthesize(text), which yields audio chunks with sample rate, width and channel info.

Tune Speed, Pauses and Pronunciation

Setting Effect Try
length_scale Speaking speed (higher is slower) 0.85 fast, 1.0 normal, 1.2 slow
noise_scale Variation in the audio Lower for steadier, flatter speech
noise_w_scale Variation in phoneme timing Lower for more even rhythm
volume Loudness multiplier 0.5 half volume
--sentence-silence Pause between sentences 0.3 to 0.6 seconds for narration

Fix a mispronounced word

Inject espeak-ng phonemes inside [[ ]], for example I am the [[ bˈætmæn ]]. Get phonemes for a word with espeak-ng -v en-us --ipa=3 -q batman (this needs the separate espeak-ng tool). Writing numbers, abbreviations and brand names out in words also helps.

Piper With Home Assistant and Raspberry Pi

  • Home Assistant: Piper is Home Assistant’s built-in local voice. Add it from the add-ons (or as a Wyoming service in Docker), choose a voice, and select it in your voice assistant pipeline. Your announcements then never leave the house.
  • Raspberry Pi: install with pip on Raspberry Pi OS (64-bit) and use low or medium voices for the snappiest response. The project also lists older prebuilt binaries for arm64 and armv7. For running a language model on the same board, see our Raspberry Pi LLM guide.
  • Screen readers: NVDA users can use Piper voices for offline reading.

Licensing and Commercial Use

This is the part most tutorials skip, and it matters if you publish audio or ship Piper in a product.

  • The engine is GPL-3.0-or-later.
  • Voices have no licence grant from the Piper project. Each voice ships a MODEL_CARD whose License line covers that voice’s own training data only.
  • Check the chain. Most voices are fine-tuned from another voice. Read the Training line, open that voice’s card, and repeat until you reach “Trained from scratch”.
  • Lessac warning: en_US-lessac-medium and many voices fine-tuned from it come from a corpus licensed for research only, which excludes commercial use of the speech.
  • Safer bases: new and retrained voices use nl_BE-rdh-medium (CC0) or en_US-hifi_tts_92-medium (CC BY 4.0, attribution needed). The project’s COMMERCIAL_USE page lists voices whose whole chain is permissive.
  • Redistributing voices (shipping .onnx files to users) means you should include each MODEL_CARD, because the .onnx.json files carry no licence information.

The Piper project says this is not legal advice and recommends checking commercial plans with a lawyer. Never use any TTS to imitate a real person’s voice without permission.

Troubleshooting

Problem Cause Fix
“Unable to find voice” Voice not in the current folder Run from the voice folder or add --data-dir
Missing .onnx.json error Only the model file was downloaded Download both files, or use piper.download_voices
No sound when omitting -f ffplay not installed Install FFmpeg, or write to a WAV with -f
Old commands like --output_file fail Tutorial for the legacy Piper binary Use python3 -m piper ... -f file.wav
--cuda does nothing or errors onnxruntime-gpu missing or CUDA mismatch Install onnxruntime-gpu matching your CUDA, or just use CPU
Robotic or rushed speech Low-quality voice or speed too fast Use a medium/high voice and raise length_scale
Wrong language accent Voice does not match the text language Use a voice for that language (for example hi_IN for Hindi)
Slow for many short lines CLI reloads the voice each time Use the HTTP server or the Python API

FAQ

Is Piper TTS free?

Yes. The engine is open source (GPL-3.0) and free. Individual voices have their own licences, so check them for commercial use.

Does Piper need a GPU?

No. It is designed to run fast on CPUs, including a Raspberry Pi. A GPU is optional.

Does Piper support Hindi?

Yes. There are hi_IN voices, plus Telugu, Malayalam and Nepali. List them with python3 -m piper.download_voices.

Can Piper clone my voice?

Not out of the box. You can train a new voice from your own recordings using the project’s training guide, but that takes data and GPU time.

Where did rhasspy/piper go?

Development moved to OHF-Voice/piper1-gpl under the Open Home Foundation. Install the current version with pip install piper-tts.

Can I use Piper audio in YouTube videos?

Only with a voice whose licence chain allows commercial use. Avoid lessac-based voices for monetised content.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Surprised woman in a green hoodie in a server room holding a card reading PIPER, with the text Free Offline Text to Speech