StyleTtsWaveformOptions

Options & Configuration · AiDotNet.TextToSpeech.StyleEmotion

The options StyleTTS 2 (Li et al. 2023) and StyleTTS-ZS (Li et al. 2024) share on top of StyleTTS’s: the waveform decoder’s generator, PL-BERT, the frozen WavLM, and the data loader’s segmenting. The defaults are StyleTTS 2’s released LibriTTS configuration (yl4579/StyleTTS2 Configs/config_libritts.yml), which StyleTTS-ZS keeps for the modules it reuses.

Inheritance: ModelOptions → StyleTtsBaseOptions → StyleTtsWaveformOptions

Known derived types: StyleTTS2Options, StyleTTSZSOptions

Properties

Property Summary
StyleTts2DecoderType DecoderType { get; set; } The waveform generator (HiFi-GAN for LibriTTS, iSTFTNet for LJSpeech).
int BertEmbedding { get; set; } PL-BERT’s factorized embedding width (128).
int BertHeads { get; set; } PL-BERT’s attention heads (12).
int BertHidden { get; set; } PL-BERT’s width (768).
int BertIntermediate { get; set; } PL-BERT’s feed-forward width (2048).
int BertLayers { get; set; } PL-BERT’s layer passes (12).
int BertMaxPositions { get; set; } PL-BERT’s position table length (512).
int DecoderBottleneck { get; set; } Width of the decoder’s AdaIN residual blocks (1024 in the released code).
int DiscriminatorWidthDivisor { get; set; } Divisor for the wave period discriminators’ channel widths.
int IstftFftSize { get; set; } iSTFTNet’s FFT size (20).
int IstftHopSize { get; set; } iSTFTNet’s hop (5).
int MaxTrainingFrames { get; set; } Mel frames of the longest training segment (max_len: 300 for LibriTTS, 400 for LJSpeech).
int SlmConvChannels { get; set; } Channels of WavLM’s seven-layer convolutional feature encoder (512).
int SlmHeads { get; set; } WavLM’s attention heads (12).
int SlmHidden { get; set; } Width of the speech language model’s hidden states (WavLM-base-plus: 768).
int SlmIntermediate { get; set; } WavLM’s feed-forward width (3072).
int SlmLayers { get; set; } Hidden states the SLM discriminator stacks (13: the convolutional features’ projection and 12 layers).
int SlmPositionalConvGroups { get; set; } WavLM’s convolutional position embedding groups (16).
int SlmPositionalConvKernel { get; set; } WavLM’s convolutional position embedding kernel (128).
int SlmRelativePositionBuckets { get; set; } Buckets of WavLM’s gated relative position bias (320).
int SlmSampleRate { get; set; } The SLM’s sample rate (16 kHz); waveforms are resampled to it.
int UpsampleInitialChannels { get; set; } Channels entering the generator; each upsampling halves them.
int WavePadding { get; set; } Zero samples the reference’s data loader adds on each side of every recording (5000).
int[] ResBlockKernels { get; set; } Kernel sizes of the generator’s parallel residual blocks.
int[] UpsampleKernels { get; set; } Kernel sizes of the upsampling transposed convolutions.
int[] UpsampleRates { get; set; } The generator’s upsampling factors; their product (times IstftHopSize for iSTFTNet) is the mel hop (HopSize, 300).
int[][] ResBlockDilations { get; set; } Dilations of each of those residual blocks.