StyleTTSOptions

Options & Configuration · AiDotNet.TextToSpeech.StyleEmotion

Options for StyleTTS (Li et al. 2022, “StyleTTS: A Style-Based Generative Model for Natural and Diverse Text-to-Speech Synthesis”).

Inheritance: ModelOptions → StyleTtsBaseOptions → StyleTTSOptions

For Beginners

These options set the sizes of StyleTTS’s networks, its audio features and how it is trained. The defaults reproduce the paper.

How It Works

The defaults are the paper’s (§III, Appendix D) with the released code’s configuration where the paper is silent (yl4579/StyleTTS Configs/config.yml): 24 kHz audio, 80-bin mel spectrograms from a 2048-point FFT with a 1200-sample window and 300-sample hop, normalized as (log(1e-5 + mel) + 4) / 4; 178 phoneme symbols; a 512-wide text encoder of three convolutions and a BiLSTM; 128-dimensional styles from a style encoder whose first width is 64; a decoder of seven residual blocks with 64-wide residual features; a three-layer prosody predictor with dropout 0.2; a text aligner pre-trained for ASR (256 wide, 512-dimensional token embeddings) and a JDC pitch extractor. Both stages train with AdamW (β = 0, 0.99, weight decay 1e-4, learning rate 1e-4).

Constructors

Constructor Summary
StyleTTSOptions() Creates the paper’s options.
StyleTTSOptions(StyleTTSOptions other) Creates a copy of other.

Properties

Property Summary
StyleTtsObjective Objective { get; set; } The loss weighting (the paper’s).
double DropoutRate { get; set; } Native prosody-predictor dropout probability.
double MaxStretch { get; set; } The largest relative time stretch of the prosody stage’s augmentation (0.25: scales from 0.75 to 1.25, §III-B).
double R1Weight { get; set; } Weight of the discriminator’s R1 penalty on real spectrograms (1, the released code’s; the paper does not mention it).
int HiddenDim { get; set; } Native text and prosody hidden width.
int MaxConvDim { get; set; } Maximum width of the native style encoder and spectrogram discriminator.
int StyleEncoderDim { get; set; } Initial width of the native style encoder and spectrogram discriminator.
int TextKernel { get; set; } Text convolution kernel.
int TextLayers { get; set; } Text convolution and duration encoder layers.