The default narrator: Piper, a free, open-source TTS that runs locally on macOS and Linux, so it needs no API key and works in CI.
Install it once with mix phx_demo.piper.setup. That creates a private
Python virtualenv in the user cache directory and downloads the default
voice. A piper already on your PATH is used if present.
Options:
:voice: a Piper voice name (default"en_US-lessac-medium"). See https://huggingface.co/rhasspy/piper-voices. Downloaded on first use.:model: path to an.onnxvoice file instead of:voice:executable: path to thepiperbinary:length_scale: speaking pace; above 1.0 is slower (default 1.0)
Summary
Functions
Downloads a voice (model and its config) into voices_dir/0.
Path to the voice model, downloading it if needed.
The piper executable: the :executable option, the private virtualenv, or PATH.
Directory of the private virtualenv created by mix phx_demo.piper.setup.
Download URL for a voice name.
Directory where voices are downloaded.
Functions
Downloads a voice (model and its config) into voices_dir/0.
Path to the voice model, downloading it if needed.
The piper executable: the :executable option, the private virtualenv, or PATH.
Directory of the private virtualenv created by mix phx_demo.piper.setup.
Download URL for a voice name.
iex> PhxDemo.TTS.Piper.voice_url("en_US-lessac-medium")
"https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx"
Directory where voices are downloaded.