VoiceFlowOptions
Options & Configuration · AiDotNet.TextToSpeech.FlowDiffusion
Options for VoiceFlow (Guo et al. 2024): Grad-TTS’s encoder with ground-truth durations and a rectified flow-matching U-Net decoder.
Inheritance: ModelOptions → TtsModelOptions → EndToEndTtsOptions → VoiceFlowOptions
For Beginners
These options configure the VoiceFlow model. Default values follow the original paper settings.
How It Works
Defaults are the paper’s (§3–4.1) with the values it leaves to its reference implementation
(X-LANCE/VoiceFlow-TTS, configs/lj_16k_gt_dur.yaml, model/cfm.py): Grad-TTS’s encoder (width
192, 6 relative-position layers, 2 heads, window 4, filter 768, kernel 3, dropout 0.1, pre-net of 3 kernel-5
convolutions; output projected to the mel width) and duration predictor (filter 256); Grad-TTS’s U-Net (base width
128, multipliers 1, 2, 4, time embedding scale 1000) conditioned on the duplicated encoder output; σ = 0.1; t clamped
to [1e-5, 1 − 1e-5]; 2-second segments (160 frames); Adam at 5e-5 with encoder and decoder gradients each clipped
to norm 1; 16 kHz, 12.5 ms hop (200), 50 ms window (800), 80 mel bins; Euler sampling.
Constructors
| Constructor | Summary |
|---|---|
VoiceFlowOptions() |
Creates the paper’s configuration. |
VoiceFlowOptions(VoiceFlowOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double LengthScale { get; set; } |
Gets or sets the duration multiplier at inference (1). |
double PrenetDropout { get; set; } |
Gets or sets the pre-net’s dropout (0.5). |
double Sigma { get; set; } |
Gets or sets σ, the width of the conditional probability path (0.1, Eq. |
double TimePositionScale { get; set; } |
Gets or sets the scale of t in the U-Net’s sinusoidal time embedding (1000). |
int DecoderDim { get; set; } |
The vector-field U-Net’s base width, independent of the text encoder’s width. |
int DurationPredictorFilterChannels { get; set; } |
Gets or sets the duration predictor’s filter (256). |
int EncoderKernelSize { get; set; } |
Gets or sets the encoder feed-forward and duration predictor kernel (3). |
int FlowDim { get; set; } |
Gets or sets the U-Net’s base width (128). |
int PrenetKernelSize { get; set; } |
Gets or sets the pre-net’s kernel (5). |
int PrenetLayers { get; set; } |
Gets or sets the pre-net’s convolutions (3). |
int RelativeWindow { get; set; } |
Gets or sets the encoder attention’s maximum relative position (4). |
int SamplingSeed { get; set; } |
Gets or sets the seed of the training draws and the inference noise, for repeatable runs. |
int SegmentFrames { get; set; } |
Gets or sets the training segment length in frames (2 seconds at 16 kHz / 200 = 160). |
int[] DecoderDimMultipliers { get; set; } |
Gets or sets the U-Net’s width multipliers per resolution (1, 2, 4). |