IndexTTSOptions
Options & Configuration · AiDotNet.TextToSpeech.CodecBased
Options for IndexTTS.
Inheritance: ModelOptions → TtsModelOptions → IndexTTSOptions
For Beginners
These settings size IndexTTS’s networks, control how it picks each piece of sound, and set how it trains; the defaults reproduce the released 1.0 model.
How It Works
The defaults are IndexTTS 1.0 (Deng et al. 2025; IndexTeam/Index-TTS``config.yaml): a 1024-wide,
20-layer GPT-2 with 16 heads over 12000 BPE text tokens and 8194 mel codes (8192 DVAE codes, start 8192, stop 8193),
conditioned by 32 perceiver latents pooled from a 6-block, 512-wide conformer over the prompt’s 100-band log mel
(24 kHz, n_fft 1024, hop 256); a DVAE of 8192 codes, one per 1024 samples; and BigVGAN turning the GPT’s latents
into 24 kHz audio, upsampling ×1024 from 1536 channels with SnakeBeta, conditioned on a 512-wide ECAPA-TDNN speaker
embedding of the prompt. Version1_5 gives IndexTTS 1.5 (1280 wide, 24 layers, 20 heads).
Generation follows the release’s infer: beam search over 3 beams that samples its candidates (top-k 30,
top-p 0.8, temperature 1, repetition penalty 10), up to 600 codes a segment of at most 120 text tokens; runs of more
than 30 silent codes (code 52) shrink to 10. The paper and the release publish no training recipe; training follows
XTTS’s GPT recipe, whose UnifiedVoice IndexTTS’s is: 0.01 × text cross-entropy + mel cross-entropy, AdamW at 5e-6 with
betas (0.9, 0.96), weight decay 0.01 on weights only, the rate halved at steps 900k, 2.7M and 5.4M.
Constructors
| Constructor | Summary |
|---|---|
IndexTTSOptions() |
Creates the IndexTTS 1.0 configuration. |
Properties
| Property | Summary |
|---|---|
bool Sample { get; set; } |
Sample the beam candidates (do_sample, true); otherwise take the best. |
double Beta1 { get; set; } |
AdamW’s β1 (0.9). |
double Beta2 { get; set; } |
AdamW’s β2 (0.96). |
double Epsilon { get; set; } |
AdamW’s ε (1e-8). |
double LearningRateDecay { get; set; } |
The factor at each milestone (0.5). |
double MelLossWeight { get; set; } |
The mel cross-entropy’s weight (XTTS’s gpt_loss_mel_ce_weight, 1.0). |
double RepetitionPenalty { get; set; } |
Repetition penalty (10). |
double Temperature { get; set; } |
Temperature (1.0). |
double TextLossWeight { get; set; } |
The text cross-entropy’s weight (XTTS’s gpt_loss_text_ce_weight, 0.01). |
double TopP { get; set; } |
Top-p (0.8). |
int Beams { get; set; } |
Beams (3). |
int ConditionBlocks { get; set; } |
The conditioning conformer’s blocks (6). |
int ConditionDim { get; set; } |
The conditioning conformer’s width (512). |
int ConditionHeads { get; set; } |
The conditioning conformer’s (and perceiver’s) heads (8). |
int ConditionLatents { get; set; } |
Perceiver latents the prompt is pooled into (32). |
int ConditionLinearUnits { get; set; } |
The conditioning conformer’s feed-forward width (2048). |
int DvaeCodebookDim { get; set; } |
The DVAE’s codebook width (512). |
int DvaeHidden { get; set; } |
The DVAE’s first downsampling width (512; doubled per layer). |
int DvaeKernel { get; set; } |
The DVAE’s downsampling kernel (3). |
int DvaeLayers { get; } |
The DVAE’s stride-2 layers (2): as many halvings as take the mel frames (one per HopSize samples) to one per SamplesPerCode samples; -1 when no whole number of halvings does. |
int DvaeResBlocks { get; set; } |
The DVAE’s residual blocks (3). |
int KeptSilentCodes { get; set; } |
The silent codes kept in a row when shrinking (10). |
int Layers { get; set; } |
GPT-2 layers (20). |
int MaxGeneratedTokens { get; set; } |
The most mel codes generated a segment (max_mel_tokens, 600). |
int MaxMelTokens { get; set; } |
The most mel codes a sequence holds (max_mel_tokens, 605). |
int MaxSilentCodes { get; set; } |
More silent codes than this in a segment trigger the shrinking (30). |
int MelCodes { get; set; } |
The mel-code vocabulary: the DVAE’s codes plus the start and stop codes (8194). |
int PerceiverMultiple { get; set; } |
The perceiver’s feed-forward multiple (2). |
int SamplesPerCode { get; } |
Samples per mel code (mel_length_compression, 1024): BigVGAN’s upsampling, the product of VocoderUpsampleRates. |
int SamplingSeed { get; set; } |
The seed of generation’s sampling. |
int SegmentTokens { get; set; } |
The most text tokens a segment holds (max_text_tokens_per_segment, 120). |
int SilentCode { get; set; } |
The DVAE code of silence, whose long runs are shrunk (52). |
int SpeakerEmbeddingDim { get; set; } |
The speaker embedding’s width (speaker_embedding_dim, 512). |
int SpeakerEncoderAttentionChannels { get; set; } |
ECAPA-TDNN’s attentive pooling width (128). |
int SpeakerEncoderScale { get; set; } |
ECAPA-TDNN’s Res2Net scale (8). |
int SpeakerEncoderSeChannels { get; set; } |
ECAPA-TDNN’s squeeze-excitation width (128). |
int TopK { get; set; } |
Top-k (30). |
int TrainingSeed { get; set; } |
The seed of training’s dropout. |
int VocoderInitialChannels { get; set; } |
BigVGAN’s first width (1536). |
int[] LearningRateMilestones { get; set; } |
The steps at which the rate is multiplied by LearningRateDecay (MultiStepLR, [900000, 2700000, 5400000]). |
int[] SpeakerEncoderChannels { get; set; } |
ECAPA-TDNN’s widths per stage ([512, 512, 512, 512, 1536]). |
int[] SpeakerEncoderDilations { get; set; } |
ECAPA-TDNN’s dilations per stage ([1, 2, 3, 4, 1]). |
int[] SpeakerEncoderKernels { get; set; } |
ECAPA-TDNN’s kernels per stage ([5, 3, 3, 3, 1]). |
int[] VocoderResBlockKernels { get; set; } |
BigVGAN’s AMP block kernels ([3, 7, 11]). |
int[] VocoderUpsampleKernels { get; set; } |
BigVGAN’s upsampling kernels ([8, 8, 4, 4, 4, 4]). |
int[] VocoderUpsampleRates { get; set; } |
BigVGAN’s upsampling rates ([4, 4, 4, 4, 2, 2], ×1024). |
int[][] VocoderResBlockDilations { get; set; } |
BigVGAN’s AMP block dilations ([1, 3, 5] each; the release’s AMPBlock1 takes three). |
string BpeModelPath { get; set; } |
The release’s SentencePiece model (bpe.model), which turning text into tokens needs. |
Methods
| Method | Summary |
|---|---|
IndexTTSOptions Version1_5() |
The IndexTTS 1.5 configuration (IndexTeam/IndexTTS-1.5): a 1280-wide, 24-layer GPT with 20 heads, up to 600 text tokens and 800 mel codes, and a BigVGAN reading 1280-wide latents. |