MatchaTTSOptions

Options & Configuration · AiDotNet.TextToSpeech.FlowDiffusion

Options for Matcha-TTS (Mehta et al. 2024): a RoPE text encoder with duration predictor and an OT-CFM U-Net decoder.

Inheritance: ModelOptions → TtsModelOptions → EndToEndTtsOptions → MatchaTTSOptions

For Beginners

These options configure the MatchaTTS model. Default values follow the original paper settings.

How It Works

Defaults are the paper’s (§3–4) with the values it leaves to its reference implementation (shivammehta25/Matcha-TTS, configs/model/*.yaml, configs/data/ljspeech.yaml, configs/trainer/default.yaml): encoder width 192, 6 layers, 2 heads, filter 768, kernel 3, dropout 0.1, a 3-layer kernel-5 pre-net with dropout 0.5, rotary embeddings on half of each head’s channels; duration predictor filter 256; decoder channels (256, 256), 2 mid blocks, 2 heads of 64, dropout 0.05, SnakeBeta feed-forward; σ_min = 1e-4; Euler solver; Adam at 1e-4 with gradients clipped to norm 5; LJSpeech mel statistics (mean −5.536622, std 2.116101); 22.05 kHz, 1024-point STFT, hop 256, 80 mel bins. Inference uses 10 Euler steps at temperature 0.667 (the reference CLI’s defaults; the paper evaluates 2, 4 and 10 steps).

Constructors

Constructor Summary
MatchaTTSOptions() Creates the paper’s configuration.
MatchaTTSOptions(MatchaTTSOptions other) Initializes a new instance by copying from another instance.

Properties

Property Summary
double DecoderDropout { get; set; } Gets or sets the decoder’s dropout (0.05).
double GradientClipNorm { get; set; } Gets or sets the global gradient-norm clip (5, the reference trainer’s gradient_clip_val).
double LengthScale { get; set; } Gets or sets the duration multiplier at inference (1).
double MelMean { get; set; } Gets or sets the mel mean the model normalizes targets with (LJSpeech: −5.536622); compute it over the training set for other data.
double MelStd { get; set; } Gets or sets the mel standard deviation the model normalizes targets with (LJSpeech: 2.116101).
double PrenetDropout { get; set; } Gets or sets the pre-net’s dropout (0.5).
double SigmaMin { get; set; } Gets or sets σ_min of the OT-CFM probability path (1e-4).
double Temperature { get; set; } Gets or sets the noise temperature at inference (0.667).
int DecoderHeadDim { get; set; } Gets or sets the decoder Transformer’s per-head width (64).
int DecoderHeads { get; set; } Gets or sets the decoder Transformer’s heads (2).
int DecoderLevels { get; set; } Gets or sets the decoder U-Net’s levels (2: one down-sampling, then a same-resolution level).
int DecoderMidBlocks { get; set; } Gets or sets the decoder’s middle blocks (2).
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 width of every decoder U-Net level (256; the reference’s channels are (256, 256)).
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 SamplingSeed { get; set; } Gets or sets the seed of the training draws and the inference noise, for repeatable runs.