Piper: local text-to-speech when you do not want a monthly character pool

Install piper-tts, speak one line that contains a name and a number, and read that voice’s model card before the wav leaves the machine.

audio · Published 2026-11-17 · Website · Translation: VI

Piper writes a wav from text on the computer that is running it. The current repository is OHF-Voice/piper1-gpl. The older rhasspy/piper repository is archived, and its README says development moved. The program embeds espeak-ng to turn letters into phonemes, then a VITS voice exported to ONNX speaks those phonemes. The package on PyPI is piper-tts. On 17 November 2026 the newest release listed there was 1.8.0, uploaded on 4 September 2026, licensed GPL-3.0-or-later, for Python 3.9 or newer.

A hosted voice charges by characters, or it stops when the free allowance hits zero. That choice is the free voice board. Piper does not bill by the character. The sentence stays in the command you run. The wav can still be the wrong file to publish, because each voice has its own model card.

When the local engine is the right job

Use a hosted voice when the script may leave the machine and you need a voice the vendor names for that language, with a written allowance. Once you are paying to direct a tutorial take, and a glossary already exists, use the ElevenLabs note. Script, timing, and a person who listens are the Vietnamese voiceover guide. Piper is the job when the text should stay here: a draft you have not cleared, a name you do not want in a vendor log, or a batch that would spend a monthly character pool.

Three jobs: a hosted voice when the script may leave, a paid voice tool when you are directing a take, and Piper when the sentence stays on this machine.

Downloading a voice uses the network once. The synthesize command does not send the sentence to a speech API.

The CLI page still links Linux tarballs from the archived project, release v1.2.0, for amd64, arm64, and armv7. The current README’s install line is the package below, not those tarballs.

One sentence, then your ear

The CLI does not download a voice for you. If the model file is missing, src/piper/__main__.py raises Unable to find voice and tells you to use piper.download_voices.

python3 -m pip install piper-tts
python3 -m piper.download_voices vi_VN-vais1000-medium
python3 -m piper -m vi_VN-vais1000-medium -f line.wav -- 'Hà Nội, ngày 18.'

download_voices writes the current directory unless you pass --data-dir. The voice is two files, vi_VN-vais1000-medium.onnx and vi_VN-vais1000-medium.onnx.json. The command shape is the one in the CLI doc. Swap the voice id. That doc’s example is en_US-lessac-medium and an English sentence. That pair will speak. It will not tell you whether a Vietnamese line survived.

Play line.wav before a paragraph. The pass is one place name and one number you typed. A smooth reading of a different number is a failed file. Pass -f so the file has a name you can replay. The CLI doc says to omit -f when ffplay is installed and you want the speakers. In __main__.py, a missing ffplay with no -f logs a warning and writes output.wav instead.

--sentence-silence defaults to 0.0. The same file inserts that many seconds between sentences inside a line, as 16-bit silence. Leave it at zero until a real paragraph runs its sentences together. --cuda needs the onnxruntime-gpu package. A finished CPU run is a complete install.

The vais1000 medium config sets espeak’s voice to vi, one speaker, and a sample rate of 22,050 Hz. Its inference defaults are length_scale 1, noise_scale 0.667, and noise_w 0.8. The first line does not need those flags.

You can inject raw espeak-ng phonemes inside [[ ]]. The documented example is English: espeak-ng -v en-us --ipa=3. That block is not a pronunciation list for Vietnamese names. If a name comes out wrong, change a spelling you can check by ear, or pick another voice, and run the same sentence again. The spellings you are allowed to keep are the pronunciation list.

Listen loop: the typed sentence sits above the voice id and a playback step. The gate asks whether you heard the name and the number. Changing the voice id returns to the first step.

A wrong number on this line will still be wrong in a longer script.

The CLI doc says this form is slow, because the model loads on every run. That cost is acceptable for one line. A folder of lines belongs on the server, after this line passes.

Read the card before the wav leaves

The catalog linked from the voices page is rhasspy/piper-voices on Hugging Face. Under vi/vi_VN that tree has three voices. The facts below are the MODEL_CARD next to each one.

Voice id Quality on the card Sample rate Speakers Dataset line Training line
vi_VN-vais1000-medium medium 22,050 Hz 1 VAIS-1000, CC BY 4.0 Fine-tuned from U.S. English lessac (medium)
vi_VN-vivos-x_low x_low 16,000 Hz 65 VIVOS, CC BY-NC-SA 4.0 Trained from scratch
vi_VN-25hours_single-low low 16,000 Hz 1 License: Unknown Fine-tuned from U.S. English Ryan (low)

Hear vi_VN-vais1000-medium first. It is the only medium Vietnamese voice in that tree. The VAIS-1000 page describes 1,000 studio lines, one speaker, northern Vietnamese. A northern reading will not become a southern voice because you preferred one. The other two cards are lower quality labels, not alternate accents you can switch with a flag.

The project’s licensing note says the engine is GPL-3.0-or-later, and that Piper grants no license of its own over the voice models. The License line on a card names that voice’s own dataset, not the dataset of a voice it was fine-tuned from. The same page says a large share of voices descend from lessac, and that the Lessac Blizzard 2013 license limits use to research and exploration of speech technologies and excludes commercial use of the resulting synthesis. Piper holds no permission from Lessac Technologies or CSTR.

The commercial-use list names voices whose whole training chain uses recordings that permit commercial use. It says to read the card of the copy you have, because a retrain can keep the old file name. Read on 17 November 2026, that list had no vi_VN voice. Lessac-derived voices, Ryan-derived voices, non-commercial datasets, and datasets with no documented license are all in its “not on this list” section. Those four buckets cover the three Vietnamese cards.

This note is not legal advice. The licensing page says that about itself. For a client video or a monetized channel, the missing vi_VN row is the reason to use a hosted voice whose terms you can read, on the free voice board or a plan you pay for. For English, the docs’ example en_US-lessac-medium is the lessac base, so it is not the voice that page tells you to ship. Voices that page does list include en_US-ljspeech-medium (public domain, trained from scratch) and en_US-joe-medium (CC0, fine-tuned from the rdh base). Confirm the Training line on the file you actually downloaded.

The .onnx.json file carries no license text. If you pass a voice on to someone else, keep the MODEL_CARD beside it. That is the only provenance file in the folder.

Repeated lines use the HTTP server, which loads the model once.

python3 -m pip install 'piper-tts[http]'
python3 -m piper.http_server -m vi_VN-vais1000-medium --host 127.0.0.1 --port 5000

In src/piper/http_server.py on the main branch, --host defaults to 0.0.0.0 and --port defaults to 5000. The documented launch does not pass --host, so an unchanged process listens on every interface. /synthesize accepts a POST with {"text": "..."} and no token. Bind 127.0.0.1, then try the line you already trust:

curl -X POST -H 'Content-Type: application/json' \
  -d '{ "text": "Hà Nội, ngày 18." }' \
  -o from-server.wav \
  http://127.0.0.1:5000/synthesize

/info reports the loaded voice name, the espeak language, and the speaker count. If that name is still en_US-lessac-medium, the server is the docs’ example, not the file you meant to test. Startup does not download a missing voice. It raises the same “use piper.download_voices” error as the CLI. The /download route can fetch a voice onto the machine, which is another reason not to publish port 5000.

--output-raw is the case for staying on the CLI: raw samples on stdout instead of a wav. __main__.py treats that silence padding as 16-bit PCM. The rate is sample_rate in the voice’s .onnx.json: 22,050 for vais1000 medium, 16,000 for vivos and for 25hours. Playing a vivos raw stream at 22,050 makes the voice fast and high. Read the number from the file you downloaded.

Four traps that still produce audio: the archived repository, the English demo voice on a Vietnamese line, the server’s default open host, and a model card left unread.

A file that plays has passed the first check. The card decides whether it can leave the machine.

Share

X Facebook LinkedIn