AmplitudePhaseVocoderOptions
Options & Configuration · AiDotNet.TextToSpeech.Vocoders
Options APNet and APNet2 share (Ai and Ling 2023; Du et al. 2023): the analysis, the multilevel loss weights, the discriminators’ shared settings, the training segment and the optimizer schedule.
Inheritance: ModelOptions → TtsModelOptions → VocoderOptions → AmplitudePhaseVocoderOptions
Known derived types: APNet2Options, APNetOptions
For Beginners
These options configure the amplitude-and-phase vocoders.
How It Works
The loss weights are the papers’ (APNet §IV; APNet2 keeps them): λ_A = λ_Mel = 45, λ_P = 100, λ_S = 20, λ_RI = 2.25. Both train with AdamW (β = 0.8, 0.99, weight decay 0.01) at 2e-4, decayed by 0.999 per epoch, batch 16.
Properties
| Property | Summary |
|---|---|
double AmplitudeLossWeight { get; set; } |
Gets or sets λ_A of the amplitude loss (45). |
double LearningRateDecay { get; set; } |
Gets or sets the per-epoch learning-rate decay (0.999). |
double MelLossWeight { get; set; } |
Gets or sets λ_Mel of the mel spectrogram loss (45). |
double MelMaxFrequency { get; set; } |
Gets or sets the highest mel frequency (8 kHz). |
double PhaseLossWeight { get; set; } |
Gets or sets λ_P of the phase losses (100). |
double RealImaginaryLossWeight { get; set; } |
Gets or sets λ_RI of the real and imaginary part losses within the STFT losses (2.25). |
double StftLossWeight { get; set; } |
Gets or sets λ_S of the reconstructed STFT spectrum losses (20). |
int DiscriminatorWidthDivisor { get; set; } |
Gets or sets a divisor of the discriminators’ widths (1: the papers’). |
int InputKernelSize { get; set; } |
Gets or sets the input convolutions’ kernel (7). |
int OutputKernelSize { get; set; } |
Gets or sets the output convolutions’ kernel (7). |
int SamplingSeed { get; set; } |
Gets or sets the seed of the training draws. |
int SegmentSize { get; set; } |
Gets or sets the training segment in samples. |
int UpdatesPerEpoch { get; set; } |
Gets or sets the optimizer steps per epoch over which the learning rate decays once. |
int WindowSize { get; set; } |
Gets or sets the analysis window in samples. |
int[] DiscriminatorPeriods { get; set; } |
Gets or sets the multi-period discriminator’s periods (2, 3, 5, 7, 11). |