CosyVoiceOptions
Options & Configuration · AiDotNet.TextToSpeech.CodecBased
Options for CosyVoice.
Inheritance: ModelOptions → CosyVoiceFamilyOptions → CosyVoiceConformerOptions → CosyVoiceAutoregressiveOptions → CosyVoiceOptions
Known derived types: CosyVoiceCloneOptions
For Beginners
These options configure the CosyVoice model. Default values follow the released model.
How It Works
The defaults are CosyVoice-300M’s (FunAudioLLM/CosyVoice examples/libritts/cosyvoice/conf/cosyvoice.yaml):
Whisper’s 100-language text tokens (51,866) and the 50 Hz S3 speech tokens (4,096); the LM’s 6-block Conformer text
encoder (512 in, 1,024 wide, 16 heads, 4,096 units) and 14-block Transformer (1,024 wide); the flow’s 6-block
Conformer (512 wide, 8 heads, 2,048 units) and U-Net estimator (channels 256, 256; 4 blocks; 12 mid blocks; 8 heads
of 64), 10 Euler steps with guidance 0.7; HiFT at 22.05 kHz (base 512, 8 harmonics, upsampling 8·8, iSTFT 16/4); a
192-wide CAM++ x-vector.
Constructors
| Constructor | Summary |
|---|---|
CosyVoiceOptions() |
Initializes a new instance with default values. |
CosyVoiceOptions(CosyVoiceOptions other) |
Initializes a new instance by copying all CosyVoice settings. |
Properties
| Property | Summary |
|---|---|
int LmFeedForwardDim { get; set; } |
The LM’s feed-forward width (linear_units), in the text encoder and the Transformer alike. |
int NumEncoderLayers { get; set; } |
The v1 Conformer text encoder’s block count. |
int TextEncoderDim { get; set; } |
The v1 Conformer text encoder’s input width. |
int TextLanguages { get; set; } |
Language tokens in the text tokenizer: 100 (Whisper large-v3’s) for CosyVoice-300M. |