CosyVoiceFamilyOptions
Options & Configuration · AiDotNet.TextToSpeech.CodecBased
Options shared by the CosyVoice models: audio and codec geometry, language-model dimensions, HiFT, CAM++ conditioning, optional released frontend paths and training. Each model sets its release’s defaults.
Inheritance: ModelOptions → CosyVoiceFamilyOptions
Known derived types: CosyVoice3Options, CosyVoiceConformerOptions
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
Exported graph runtime settings. |
bool IncludeDiscriminators { get; set; } |
Whether to build HiFT’s discriminators, which only Vocoder training uses. |
double DropoutRate { get; set; } |
Native encoder dropout probability. |
double LearningRate { get; set; } |
Configured language-model and flow learning rate; the GAN retains its separately declared rate. |
double WeightDecay { get; set; } |
Optional coupled L2 weight decay for native Adam (zero in the released recipes). |
int CodebookSize { get; set; } |
Speech-token vocabulary cardinality. |
int CodecFrameRate { get; set; } |
Speech tokens per second. |
int FftSize { get; set; } |
FFT window size for the conditioning frontend. |
int HiftBaseChannels { get; set; } |
HiFT’s first upsampling width (base_channels). |
int HiftHarmonics { get; set; } |
HiFT’s harmonics above the fundamental (nb_harmonics). |
int HopSize { get; set; } |
Samples per mel frame; must equal four times the product of HiFT upsampling rates. |
int LLMDim { get; set; } |
Language-model hidden width. |
int MaxReferenceSeconds { get; set; } |
Maximum prompt duration accepted by the released frontend (30 seconds). |
int MaxTextLength { get; set; } |
Maximum input text length. |
int MelChannels { get; set; } |
Mel-spectrogram frequency channels. |
int NumCodebooks { get; set; } |
The single S3 token stream used by the CosyVoice family. |
int NumHeads { get; set; } |
Language-model query attention heads. |
int NumLLMLayers { get; set; } |
Language-model decoder blocks. |
int SampleRate { get; set; } |
Audio sample rate in Hz. |
int SamplingSeed { get; set; } |
The seed of sampling and of training’s random draws. |
int SpeakerEmbeddingDim { get; set; } |
Flow conditioning x-vector width. |
int SpeakerEncoderChannels { get; set; } |
CAM++’s TDNN channels (init_channels). |
int SpeakerEncoderGrowthRate { get; set; } |
CAM++’s D-TDNN growth rate. |
int VocabSize { get; set; } |
Text vocabulary size. |
int VocoderSegmentLength { get; set; } |
The samples a vocoder training step crops or pads an utterance to (the recipe’s truncate_length); a multiple of HopSize. |
int WarmupSteps { get; set; } |
The learning-rate warmup of each stage’s Adam (the recipe’s warmup_steps; 0 for a constant rate). |
int[] HiftSourceKernels { get; set; } |
HiFT’s source-branch residual block kernels, one per upsampling stage. |
int[] HiftUpsampleKernels { get; set; } |
HiFT’s transposed-convolution kernels, one per upsampling stage. |
int[] HiftUpsampleRates { get; set; } |
HiFT’s upsampling rates; their product times the iSTFT hop of 4 is HopSize. |
string SpeakerEncoderOnnxPath { get; set; } |
Optional original frozen CAM++ graph; release loading sets this path. |
string SpeechTokenizerPath { get; set; } |
Optional original frozen speech-tokenizer ONNX graph; release loading sets this path. |