WaveRNNOptions
Options & Configuration · AiDotNet.TextToSpeech.Vocoders
Options for WaveRNN (Kalchbrenner et al. 2018): a single-layer recurrent vocoder with a dual softmax over the coarse and fine bytes of 16-bit samples, optionally sparsified by magnitude pruning.
Inheritance: ModelOptions → TtsModelOptions → VocoderOptions → WaveRNNOptions
For Beginners
These options configure the WaveRNN model. Default values follow the original paper settings.
How It Works
Defaults are the paper’s WaveRNN-896 (§2, §5): a state of 896 units split into coarse and fine halves; 24 kHz
16-bit audio; training on 960-sample sequences with full back-propagation through time. Weight pruning (§3) is off
(SparsityTarget 0); when on, the recurrent matrices are pruned by magnitude every 500 steps from
step 1,000 over 200,000 steps along z = Z(1 − (1 − (t − t₀)/S)³), optionally in 16×1 or 4×4 blocks.
What the paper leaves open: it conditions on linguistic features and pitch without saying how, so the mel spectrogram (Tacotron 2’s 80 bands, 50 ms window, 12.5 ms hop, 125 Hz–7.6 kHz) is upsampled by a transposed convolutional network as in WaveNet and projected into the gates; the optimizer follows fatchord/WaveRNN (Adam at 1e-4, batch 32, gradient norm clipped to 4).
Constructors
| Constructor | Summary |
|---|---|
WaveRNNOptions() |
Creates the paper’s WaveRNN-896 configuration. |
WaveRNNOptions(WaveRNNOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double MaxGradientNorm { get; set; } |
Gets or sets the global gradient-norm clip (4). |
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). |
double SparsityTarget { get; set; } |
Gets or sets the final fraction Z of pruned recurrent weights (0: the dense WaveRNN). |
int HiddenDim { get; set; } |
The actual recurrent state width, split into equal coarse and fine halves. |
int HopSize { get; set; } |
The product of the actual conditioning upsampling factors. |
int PruneBlockColumns { get; set; } |
Gets or sets the columns of a pruning block (1; 4 for the 4×4 structure). |
int PruneBlockRows { get; set; } |
Gets or sets the rows of a pruning block (1; 16 for the 16×1 structure, 4 for 4×4). |
int PruningInterval { get; set; } |
Gets or sets the steps between mask updates (500). |
int PruningStartStep { get; set; } |
Gets or sets the step t₀ at which pruning begins (1,000). |
int PruningSteps { get; set; } |
Gets or sets the pruning steps S over which sparsity reaches the target (200,000). |
int RnnDim { get; set; } |
Gets or sets the state size (896), split into coarse and fine halves. |
int SamplingSeed { get; set; } |
Gets or sets the seed of the synthesis draws. |
int SequenceSamples { get; set; } |
Gets or sets the exact samples of a training sequence (960; full back-propagation through time). |
int WindowSize { get; set; } |
Gets or sets the analysis window of the input features (1200: 50 ms). |
int[] UpsampleScales { get; set; } |
Gets or sets the conditioning upsampler’s factors (5, 5, 4, 3; their product is the hop). |