WaveNetOptions
Options & Configuration · AiDotNet.TextToSpeech.Vocoders
Options for the WaveNet vocoder (van den Oord et al. 2016): an autoregressive stack of dilated causal convolutions predicting a softmax over μ-law classes, locally conditioned on the mel spectrogram.
Inheritance: ModelOptions → TtsModelOptions → VocoderOptions → WaveNetOptions
For Beginners
These options configure the WaveNet model. Default values follow the original paper settings.
How It Works
The paper fixes the model’s form (§2): 256 μ-law classes and a softmax; dilated causal convolutions whose dilation doubles to 512 and repeats, with filter width 2 (each 1, 2, …, 512 block has a receptive field of 1024); gated tanh × sigmoid units; residual and parameterized skip connections; ReLU → 1×1 → ReLU → 1×1 → softmax at the output; local conditioning upsampled by a transposed convolutional network and added in every gate through 1×1 convolutions.
What it leaves open follows r9y9/wavenet_vocoder’s μ-law preset (mulaw256_wavenet.json): 30 layers in
3 dilation cycles, 128 residual, 256 gate (128 per half) and 128 skip channels; upsampling by 4 × 4 × 4 × 4 = 256;
22.05 kHz audio with 80-band log10 mel spectrograms (librosa, 1024-point FFT, hop 256, 125 Hz–7.6 kHz); Adam at
1e-3 halved every 200k steps, batch 8, 10,240-sample segments, no gradient clipping.
Constructors
| Constructor | Summary |
|---|---|
WaveNetOptions() |
Creates the configuration described in the remarks. |
WaveNetOptions(WaveNetOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double MelMaxFrequency { get; set; } |
Gets or sets the highest mel frequency (7.6 kHz). |
double MelMinFrequency { get; set; } |
Gets or sets the lowest mel frequency (125 Hz). |
int DilationCycle { get; set; } |
Gets or sets the layers per dilation cycle (10: dilations 1 … 512). |
int GateChannels { get; set; } |
Gets or sets the channels of each half of the gated unit (128). |
int HiddenDim { get; set; } |
The channels in the actual residual stream. |
int HopSize { get; set; } |
The product of the actual local-conditioning upsampling factors. |
int KernelSize { get; set; } |
Gets or sets the causal convolutions’ filter width (2). |
int LearningRateHalvingSteps { get; set; } |
Gets or sets the steps after which the learning rate halves (200,000). |
int MuLawLevels { get; set; } |
Gets or sets the μ-law classes (256). |
int NumDilatedLayers { get; set; } |
Gets or sets the dilated causal convolution layers (30). |
int ResidualChannels { get; set; } |
Gets or sets the residual channels (128). |
int SamplingSeed { get; set; } |
Gets or sets the seed of the synthesis draws. |
int SegmentSamples { get; set; } |
Gets or sets the samples of a training segment (10,240; rounded down to whole frames). |
int SkipChannels { get; set; } |
Gets or sets the skip channels (128). |
int WindowSize { get; set; } |
Gets or sets the analysis window of the input features (1024). |
int[] UpsampleScales { get; set; } |
Gets or sets the transposed convolutions’ upsampling factors (4, 4, 4, 4; their product is the hop). |