SparkTTSOptions

Options & Configuration · AiDotNet.TextToSpeech.CodecBased

Options for the released Spark-TTS 0.5B graph.

Inheritance: ModelOptions → SparkTTSOptions

How It Works

Defaults are taken from SparkAudio/Spark-TTS-0.5B: Qwen2 has width 896, 24 layers, 14 query heads and 2 key/value heads; BiCodec emits one 8,192-way semantic stream at 50 Hz and represents a speaker with 32 finite-scalar-quantized 4^6-way global tokens.

Constructors

Constructor Summary
SparkTTSOptions() Initializes a new instance with default values.

Properties

Property Summary
OnnxModelOptions OnnxOptions { get; set; } Settings for the exported ONNX graph runtime.
SparkTTSTrainingComponent TrainingComponent { get; set; } Gets or sets the component to optimize during training.
bool ConstrainedSpeechDecoding { get; set; } Optional speech-range-constrained decoding; false reproduces the released full-vocabulary sampling.
bool TieWordEmbeddings { get; set; } Gets or sets whether input and output token embeddings share their weights.
double FeatureMatchingWeight { get; set; } Gets or sets the weight of the feature matching objective.
double LearningRate { get; set; } The active training component’s AdamW learning rate.
double MelLossWeight { get; set; } Gets or sets the weight of the mel loss.
double MelMinimumFrequency { get; set; } Gets or sets the mel minimum frequency.
double ReferenceSegmentSeconds { get; set; } Gets or sets the reference segment duration, in seconds.
double RmsNormEpsilon { get; set; } Gets or sets the numerical stability constant for RMS norm.
double RopeTheta { get; set; } Gets or sets the rotary positional-embedding frequency base for the model.
double SemanticCodebookWeight { get; set; } Gets or sets the weight of the semantic codebook objective.
double SemanticCommitmentWeight { get; set; } Gets or sets the weight of the semantic commitment objective.
double Temperature { get; set; } Gets or sets the logit temperature used during sampling.
double TopP { get; set; } Gets or sets the cumulative probability threshold for nucleus sampling.
double WeightDecay { get; set; } The active training component’s AdamW weight decay.
double[] DiscriminatorBands { get; set; } Gets or sets the discriminator bands.
int BiCodecDim { get; set; } Gets or sets the feature width of the BiCodec.
int CodebookSize { get; set; } The semantic token vocabulary size.
int CodecFrameRate { get; set; } The semantic codec frame rate in Hz.
int DiscriminatorChannels { get; set; } Gets or sets the discriminator channels.
int DiscriminatorWidthDivisor { get; set; } Gets or sets the discriminator width divisor.
int EndContentToken { get; set; } Gets or sets the token ID for end content.
int EndGlobalToken { get; set; } Gets or sets the token ID for end global.
int EndSemanticToken { get; set; } Gets or sets the token ID for end semantic.
int EndStyleLabelToken { get; set; } Gets or sets the token ID for end style label.
int EndStylePromptToken { get; set; } Gets or sets the token ID for end style prompt.
int EosToken { get; set; } Original Qwen end-of-message token used by the released generator.
int GenderTokenOffset { get; set; } Gets or sets the gender token offset.
int GenerationSeed { get; set; } Gets or sets the random seed used during generation, also used for initialization when Seed is null.
int GlobalCodebookSize { get; set; } Gets or sets the global codebook size.
int GlobalTokenCount { get; set; } Gets or sets the global token count.
int GlobalTokenOffset { get; set; } Gets or sets the global token offset.
int GlobalTokenizerWarmupSteps { get; set; } Teacher/global-FSQ warmup duration.
int HopSize { get; set; } The speaker tokenizer’s mel hop in samples.
int KeyValueHeads { get; set; } Gets or sets the number of key/value attention heads.
int LLMDim { get; set; } The Qwen decoder hidden width.
int LmIntermediateDim { get; set; } Gets or sets the feature width of the language-model intermediate.
int MaxCodecFrames { get; set; } The semantic generation limit in codec frames.
int MaxTextLength { get; set; } The text input limit in tokens.
int MaximumPositionEmbeddings { get; set; } Gets or sets the maximum number of token positions.
int MelChannels { get; set; } The speaker tokenizer’s mel frequency channels.
int MelFftSize { get; set; } Gets or sets the mel FFT size.
int MelWindowSize { get; set; } Gets or sets the mel window size.
int MinimumGeneratedCodecFrames { get; set; } Gets or sets the minimum generated codec frames.
int NumCodebooks { get; set; } The single semantic token stream emitted by BiCodec.
int NumHeads { get; set; } The Qwen query attention heads.
int NumLLMLayers { get; set; } The Qwen decoder depth.
int PerceiverDepth { get; set; } Gets or sets the perceiver depth.
int PerceiverHeads { get; set; } Gets or sets the number of attention heads in the perceiver.
int PitchLabelOffset { get; set; } Gets or sets the pitch label offset.
int PitchValueOffset { get; set; } Gets or sets the pitch value offset.
int PostnetLayers { get; set; } Gets or sets the number of layers in the postnet.
int PrenetLayers { get; set; } Gets or sets the number of layers in the prenet.
int SampleRate { get; set; } The waveform sample rate, paired with the codec frame rate and waveform decoder strides.
int SemanticCodeDimension { get; set; } Gets or sets the feature width of the semantic code.
int SemanticEncoderLayers { get; set; } Gets or sets the number of layers in the semantic encoder.
int SemanticTokenOffset { get; set; } Gets or sets the semantic token offset.
int SpeakerContextDim { get; } Gets or sets the feature width of the speaker context.
int SpeakerEcapaChannels { get; set; } Gets or sets the speaker ECAPA channels.
int SpeakerEmbeddingDim { get; set; } The speaker tokenizer’s d-vector width.
int SpeakerLatentDim { get; set; } Gets or sets the feature width of the speaker latent.
int SpeedLabelOffset { get; set; } Gets or sets the speed label offset.
int SpeedValueOffset { get; set; } Gets or sets the speed value offset.
int StartContentToken { get; set; } Gets or sets the token ID for start content.
int StartGlobalToken { get; set; } Gets or sets the token ID for start global.
int StartSemanticToken { get; set; } Gets or sets the token ID for start semantic.
int StartStyleLabelToken { get; set; } Gets or sets the token ID for start style label.
int StartStylePromptToken { get; set; } Gets or sets the token ID for start style prompt.
int TaskControllableTtsToken { get; set; } Gets or sets the token ID for task controllable tts.
int TaskTtsToken { get; set; } Gets or sets the token ID for task tts.
int TopK { get; set; } Gets or sets the maximum number of highest-probability tokens retained during sampling.
int VocabSize { get; set; } The joint text and added speech-token vocabulary size.
int VocosDim { get; set; } Gets or sets the feature width of the vocos.
int VocosIntermediateDim { get; set; } Gets or sets the feature width of the vocos intermediate.
int Wav2VecHeads { get; set; } Gets or sets the number of attention heads in the Wav2Vec.
int Wav2VecHiddenDim { get; set; } Gets or sets the feature width of the Wav2Vec hidden.
int Wav2VecIntermediateDim { get; set; } Gets or sets the feature width of the Wav2Vec intermediate.
int Wav2VecLayers { get; set; } Gets or sets the number of layers in the Wav2Vec.
int WaveDecoderChannels { get; set; } Gets or sets the wave decoder channels.
int[] DiscriminatorWindows { get; set; } Gets or sets the discriminator windows.
int[] FsqLevels { get; set; } Gets or sets the finite scalar quantizer levels.
int[] TrainingMelBins { get; set; } Gets or sets the training mel bins.
int[] TrainingMelWindows { get; set; } DAC-style multi-scale mel analysis windows for codec training.
int[] Wav2VecConvDims { get; set; } Gets or sets the Wav2Vec convolution channel widths.
int[] Wav2VecConvKernels { get; set; } Gets or sets the convolution kernel sizes for the Wav2Vec convolution.
int[] Wav2VecConvStrides { get; set; } Gets or sets the convolution strides for the Wav2Vec convolution.
int[] Wav2VecMixedLayers { get; set; } Gets or sets the number of layers in the Wav2Vec mixed.
int[] WaveDecoderKernels { get; set; } Gets or sets the convolution kernel sizes for the wave decoder.
int[] WaveDecoderRates { get; set; } Gets or sets the wave decoder rates.
string ModelPath { get; set; } The exported ONNX graph path, when a graph is loaded.
string[] TextSymbols { get; set; } Optional literal character vocabulary for compact custom models; null uses the released Qwen BPE.