ParallelWaveGANOptions
Options & Configuration · AiDotNet.TextToSpeech.Vocoders
Options for Parallel WaveGAN (Yamamoto et al. 2020): a non-autoregressive WaveNet generator over Gaussian noise, trained with the multi-resolution STFT loss and an adversarial loss.
Inheritance: ModelOptions → TtsModelOptions → VocoderOptions → ParallelWaveGANOptions
For Beginners
These options configure the Parallel WaveGAN model. Default values follow the original paper settings.
How It Works
Defaults are the paper’s (§4.1): 24 kHz audio; 80 log-mel bands from 70 to 8000 Hz with 50 ms frames and a 12.5 ms shift (1200 / 300 samples), standardized; a generator of 30 dilated residual blocks in three cycles with 64 residual and skip channels and kernel 3; a discriminator of ten 64-channel convolutions; λ_adv = 4; STFT resolutions (1024, 600, 120), (2048, 1200, 240), (512, 240, 50); 400k steps with the discriminator fixed for the first 100k; RAdam (ε = 1e-6) at 1e-4 (generator) and 5e-5 (discriminator), halved every 200k steps; batch 8 of 1-second clips.
What the paper leaves open follows kan-bayashi/ParallelWaveGAN (parallel_wavegan.v1.yaml): a 2048-point
FFT for the features; a 128-channel gate; upsampling scales 4, 5, 3, 5 with an auxiliary context window of 2;
gradient-norm clipping at 10 (generator) and 1 (discriminator).
Constructors
| Constructor | Summary |
|---|---|
ParallelWaveGANOptions() |
Creates the paper’s configuration. |
ParallelWaveGANOptions(ParallelWaveGANOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double AdversarialWeight { get; set; } |
Gets or sets λ_adv (4). |
double DiscriminatorGradientClipNorm { get; set; } |
Gets or sets the discriminator’s gradient-norm clip (1). |
double DiscriminatorLearningRate { get; set; } |
Gets or sets the discriminator’s learning rate (5e-5). |
double Epsilon { get; set; } |
Gets or sets RAdam’s ε (1e-6). |
double GeneratorGradientClipNorm { get; set; } |
Gets or sets the generator’s gradient-norm clip (10). |
double MelMaxFrequency { get; set; } |
Gets or sets the highest mel frequency (8000 Hz). |
double MelMinFrequency { get; set; } |
Gets or sets the lowest mel frequency (70 Hz). |
double[] MelMean { get; set; } |
Gets or sets the per-band mean of the log-mel features over the training set, or null for none. |
double[] MelScale { get; set; } |
Gets or sets the per-band standard deviation of the log-mel features over the training set, or null for none. |
int AuxContextWindow { get; set; } |
Gets or sets the mel frames of context on each side of the input convolution (2). |
int DiscriminatorChannels { get; set; } |
Gets or sets the discriminator’s channels (64). |
int DiscriminatorLayers { get; set; } |
Gets or sets the discriminator’s convolutions (10). |
int GateChannels { get; set; } |
Gets or sets the gate channels (128). |
int HopSize { get; set; } |
The product of the actual learned conditioning upsampler’s scales (300 in the paper). |
int KernelSize { get; set; } |
Gets or sets the convolution kernel (3). |
int LearningRateHalvingSteps { get; set; } |
Gets or sets the steps between learning-rate halvings (200,000). |
int NumLayers { get; set; } |
Gets or sets the generator’s residual blocks (30). |
int NumStacks { get; set; } |
Gets or sets the dilation cycles (3). |
int ResidualChannels { get; set; } |
Gets or sets the residual channels (64). |
int SamplingSeed { get; set; } |
Gets or sets the seed of the training draws and of the synthesis noise. |
int SegmentSize { get; set; } |
Gets or sets the training segment in samples (24,000: one second). |
int SkipChannels { get; set; } |
Gets or sets the skip channels (64). |
int WindowSize { get; set; } |
Gets or sets the analysis window of the input features (1200: 50 ms). |
int[] StftFftSizes { get; set; } |
Gets or sets the STFT loss FFT sizes (1024, 2048, 512). |
int[] StftHopSizes { get; set; } |
Gets or sets the STFT loss hops (120, 240, 50). |
int[] StftWindowSizes { get; set; } |
Gets or sets the STFT loss windows (600, 1200, 240). |
long DiscriminatorStartStep { get; set; } |
Gets or sets the steps the discriminator stays fixed (100,000). |