F5TTSOptions
Options & Configuration · AiDotNet.TextToSpeech.FlowDiffusion
Options for F5-TTS (Chen et al. 2024): a DiT with ConvNeXt V2 text refinement trained by text-guided speech-infilling flow matching.
Inheritance: ModelOptions → TtsModelOptions → F5TTSOptions
For Beginners
These options configure the F5TTS model. Default values follow the original paper settings.
How It Works
Defaults are F5-TTS Base (§4, App. B; reference SWivid/F5-TTS configs/F5TTS_Base.yaml, model/cfm.py):
22 DiT layers, 16 heads of 64, width 1024, feed-forward 2048 (×2), dropout 0.1, rotary embedding on the first head;
text embedding 512 with 4 ConvNeXt V2 blocks (FFN 1024); a vocabulary of 2545 characters plus the filler;
24 kHz, 1024-point STFT, hop 256, 100 mel bins; infilling spans of 70–100 %, audio-condition drop 0.3, joint drop 0.2;
AdamW at 7.5e-5 warmed up linearly over 20K updates then decayed linearly, gradient clip 1; inference with 32 NFE,
sway coefficient −1 and CFG strength 2.
Constructors
| Constructor | Summary |
|---|---|
F5TTSOptions() |
Creates F5-TTS Base. |
F5TTSOptions(F5TTSOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
double AudioDropProbability { get; set; } |
Gets or sets the probability of dropping the audio condition (0.3). |
double CfgStrength { get; set; } |
Gets or sets the classifier-free guidance strength α (2). |
double ConditionDropProbability { get; set; } |
Gets or sets the probability of dropping audio and text together (0.2). |
double FramesPerCharacter { get; set; } |
Gets or sets the frames per character when synthesizing without a prompt, whose speaking rate the paper otherwise uses (6, about 15 characters per second at 93.75 frames per second). |
double MaskFractionMax { get; set; } |
Gets or sets the largest masked fraction of a training utterance (1.0). |
double MaskFractionMin { get; set; } |
Gets or sets the smallest masked fraction of a training utterance (0.7). |
double MaxGradientNorm { get; set; } |
Gets or sets the gradient-norm clip (1). |
double Speed { get; set; } |
Gets or sets the speaking-rate multiplier at synthesis (1). |
double SwayCoefficient { get; set; } |
Gets or sets the sway sampling coefficient s (−1). |
int FeedForwardMultiplier { get; set; } |
Gets or sets the feed-forward width multiplier (2: 1024/2048). |
int HeadDim { get; set; } |
Gets or sets the attention head width (64). |
int NumDecoderLayers { get; set; } |
The flow estimator’s DiT blocks (22 in F5-TTS Base). |
int NumEncoderLayers { get; set; } |
The ConvNeXt V2 blocks in the character encoder (four in F5-TTS Base). |
int NumFunctionEvaluations { get; set; } |
Gets or sets the number of Euler steps at synthesis (32 NFE). |
int NumLayers { get; set; } |
Gets or sets the DiT blocks (22). |
int SamplingSeed { get; set; } |
Gets or sets the seed of the training draws and the sampling noise, for repeatable runs. |
int TextConvLayers { get; set; } |
Gets or sets the ConvNeXt V2 blocks refining the text (4). |
int TextDim { get; set; } |
Gets or sets the text embedding width (512). |
int TotalSteps { get; set; } |
Gets or sets the total updates over which the rate decays linearly (1.2M). |
int WarmupSteps { get; set; } |
Gets or sets the learning-rate warmup updates (20 000). |
int? RotaryHeads { get; set; } |
Gets or sets how many leading heads carry the rotary embedding (1, the reference configuration; null for all). |