TransformerTTSOptions
Options & Configuration · AiDotNet.TextToSpeech.Classic
Options for Transformer TTS (Li et al. 2019).
Inheritance: ModelOptions → TtsModelOptions → AcousticModelOptions → TransformerTTSOptions
For Beginners
These options configure the TransformerTTS model. Default values follow the original paper settings.
How It Works
Defaults are the paper’s where it states them (Li et al. 2019, §3–4): 512-wide phoneme embeddings and encoder pre-net (Tacotron 2’s three 5-wide convolutions with batch normalization, ReLU and dropout, then a linear projection); a decoder pre-net of two 256-unit fully connected layers with ReLU, then a linear projection; 6 encoder and 6 decoder layers with 8 heads; mel and stop linear projections and Tacotron 2’s 5-layer post-net; a positive stop-token weight in 5.0–8.0; 16 kHz audio at 80 frames per second (hop 200). Where the paper defers to the works it builds on, their values are used: the Transformer base model’s d_model 512, d_ff 2048 and dropout 0.1 (Vaswani et al. 2017), and Tacotron 2’s dropout 0.5 in the pre-nets and post-net, its 5-layer 512-channel post-net (PostnetLayers, PostnetDim) and 1024-point FFT with a 50 ms window (Shen et al. 2018).
Constructors
| Constructor | Summary |
|---|---|
TransformerTTSOptions() |
Creates the paper’s configuration. |
TransformerTTSOptions(TransformerTTSOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double PostnetDropout { get; set; } |
Gets or sets the post-net’s dropout (0.5). |
double PrenetDropout { get; set; } |
Gets or sets the pre-nets’ dropout (0.5). |
double StopTokenPositiveWeight { get; set; } |
Gets or sets the positive weight of the final “stop” frame in the stop-token loss (the paper uses 5.0–8.0). |
int DecoderDim { get; set; } |
Decoder output width: the mel projection (§3.7), independent of the transformer hidden width. |
int EncoderPrenetChannels { get; set; } |
Gets or sets the encoder pre-net’s channels (512). |
int EncoderPrenetLayers { get; set; } |
Gets or sets the encoder pre-net’s convolutions (3). |
int FeedForwardDim { get; set; } |
Gets or sets the inner width d_ff of the feed-forward networks (2048, the Transformer base model). |
int MaxDecoderSteps { get; set; } |
Gets or sets the most decoder steps synthesis runs before the stop token fires. |
int PostnetKernelSize { get; set; } |
Gets or sets the post-net’s kernel (5). |
int PrenetKernelSize { get; set; } |
Gets or sets the encoder pre-net’s kernel (5). |
int[] DecoderPrenetSizes { get; set; } |
Gets or sets the decoder pre-net’s fully connected widths (256, 256). |