PiperOptions

Options & Configuration · AiDotNet.TextToSpeech.EndToEnd

Options for Piper (Rhasspy): VITS trained with Piper’s recipe, at one of its three model sizes.

Inheritance: ModelOptions → TtsModelOptions → EndToEndTtsOptions → VitsModelOptions → VITSOptions → PiperOptions

For Beginners

These options configure the Piper model. Default values follow Piper’s medium voices.

How It Works

Piper has no paper; its definition is its training code (rhasspy/piper piper_train). Its network is VITS unchanged (vits/models.py) with the stochastic duration predictor; what Piper sets differently is the model size (__main__.py, vits/config.py) and the phoneme-id framing of piper-phonemize (pad 0 after every id, beginning-of-sentence 1 and end-of-sentence 2):

A multi-speaker Piper voice has a 512-wide speaker table. Training uses AdamW (β = 0.8, 0.99, ε = 1e-9, PyTorch’s default weight decay 0.01) at 2e-4 decayed 0.999875 per epoch, batch 32 (TRAINING.md).

Constructors

Constructor Summary
PiperOptions() Creates Piper’s medium configuration.
PiperOptions(PiperOptions other) Initializes a new instance by copying from another instance.

Properties

Property Summary
bool AddBlank { get; set; } Whether Piper’s native framing inserts PadId after the sentence start and every phoneme.
bool InterspersePad { get; set; } Gets or sets whether the padding id follows every id (true).
int BosId { get; set; } Gets or sets the beginning-of-sentence id (1, ^).
int EosId { get; set; } Gets or sets the end-of-sentence id (2, $).
int PadId { get; set; } Gets or sets the padding id placed after every id (0, _).

Methods

Method Summary
PiperOptions High() Piper’s high configuration: VITS’s HiFi-GAN V1 decoder.
PiperOptions Medium() Piper’s medium configuration (the default).
PiperOptions XLow() Piper’s x-low configuration: 96-wide encoder and latent, 384-wide filter.