LinuxCommandLibrary

piper

TLDR

Synthesize speech

$ echo "Hello world" | piper --model [en_US-lessac-medium] --output_file [output.wav]
copy
List models
$ piper --list-models
copy
Use specific model
$ piper -m [model.onnx] -c [model.json] < [input.txt] > [output.wav]
copy
Set speaker
$ piper --model [model.onnx] --speaker [0] < [input.txt]
copy
Adjust speaking rate
$ piper --model [model.onnx] --length_scale [1.5] < [input.txt]
copy
JSON input mode
$ echo '{"text": "Hello"}' | piper --model [model.onnx] --json-input
copy

SYNOPSIS

piper [--model file] [--outputfile file] [options_]

DESCRIPTION

piper is a fast, local neural text-to-speech system. It generates natural-sounding speech from text.
Models are language and voice specific. Many voices available for common languages.
Processing is local and fast. No internet connection required after model download.
Multi-speaker models support different voices. Speaker ID selects voice variant.
Rate and variation parameters tune output. Length scale adjusts speaking speed.

PARAMETERS

-m, --model FILE

ONNX model file.
-c, --config FILE
JSON config file.
--output_file FILE
Output WAV file.
--output_dir DIR
Output directory.
--speaker ID
Speaker ID for multi-speaker.
--length_scale FLOAT
Speaking rate (higher=slower).
--noise_scale FLOAT
Variation in speech.
--json-input
JSON input format.
--list-models
Show available models.

CAVEATS

Requires model download. Quality varies by model. GPU acceleration optional.

HISTORY

Piper was created by Michael Hansen (rhasspy) for offline voice assistants. It provides fast, high-quality TTS suitable for embedded and edge devices.

SEE ALSO

espeak(1), festival(1), mimic(1), say(1)

Copied to clipboard