PriorGradOptions
Options & Configuration · AiDotNet.TextToSpeech.Vocoders
Options for the PriorGrad vocoder (Lee et al. 2022): DiffWave with a data-dependent diagonal Gaussian prior whose standard deviation follows the mel spectrogram’s frame energy.
Inheritance: ModelOptions → TtsModelOptions → VocoderOptions → DiffWaveOptions → PriorGradOptions
Known derived types: FreGradOptions
For Beginners
These options configure the PriorGrad model. Default values follow the original paper settings.
How It Works
Defaults are the paper’s vocoder (§4): the DiffWave BASE network and schedules it builds on (30 residual layers of 64 channels, T = 50 with β linear from 1e-4 to 0.05, the six-step fast schedule 1e-4, 1e-3, 0.01, 0.05, 0.2, 0.5); 22.05 kHz audio, 80 log-mel bands from a 1024-point FFT with hop 256 between 80 Hz and 7.6 kHz; the prior’s standard deviation the frame energy √Σ exp(mel) normalized to (0, 1] and clipped below at 0.1; Adam at 2e-4.
What the paper leaves open follows microsoft/NeuralSpeech PriorGrad-vocoder: the HiFi-GAN feature pipeline
(reflect padding, a 1024-sample Hann window, magnitude, librosa’s Slaney bands, ln(max(x, 1e-5))); the energy
normalized by training-set extremes with the maximum overridden to 4; batch 16; 62-frame crops; no gradient
clipping; each sampling step clamped to [−1, 1]. Without fitted statistics (EnergyMin null) the
minimum is the energy of silence, √(mel bands · 1e-5).
Constructors
| Constructor | Summary |
|---|---|
PriorGradOptions() |
Creates the paper’s PriorGrad vocoder configuration. |
PriorGradOptions(PriorGradOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double EnergyMax { get; set; } |
Gets or sets the frame energy that maps to a standard deviation of 1; higher energies are clipped to it (4, the reference’s override of the training-set maximum). |
double MelMaxFrequency { get; set; } |
Gets or sets the highest mel frequency (7.6 kHz). |
double MinStd { get; set; } |
Gets or sets the prior’s minimum standard deviation (0.1). |
double? EnergyMin { get; set; } |
Gets or sets the training set’s lowest frame energy, or null for the energy of silence. |
int HiddenDim { get; set; } |
The width of the published residual denoiser (64 channels in the base model). |
int HopSize { get; set; } |
The waveform hop, given by the actual mel upsampler’s even transposed-convolution strides. |