CAMPlusPlusOptions
Options & Configuration · AiDotNet.Audio.Speaker
Configuration options for the CAM++ (Context-Aware Masking Plus Plus) speaker model.
Inheritance: ModelOptions → CAMPlusPlusOptions
For Beginners
CAM++ is a lightweight speaker recognition model optimized for speed. It uses a clever “context-aware masking” technique that helps it focus on the most important parts of speech for identifying who is speaking, while ignoring silence and noise. This makes it both fast and accurate—ideal for real-time applications.
How It Works
CAM++ (Wang et al., 2023) is a fast and accurate speaker verification model that uses context-aware masking with a densely connected time delay neural network (D-TDNN). It processes variable-length utterances efficiently and achieves competitive EER results while being significantly faster than Transformer-based approaches.
The defaults are the released model’s (3D-Speaker CAMPPlus, the campplus.onnx CosyVoice
ships): 80 Kaldi filterbank bands at 16 kHz, a 128-channel TDNN layer, D-TDNN blocks of 12, 24 and 16
layers growing 32 channels each through a 4×32 bottleneck, and a 192-wide embedding.
Constructors
| Constructor | Summary |
|---|---|
CAMPlusPlusOptions() |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
Gets or sets the ONNX runtime options. |
double DefaultThreshold { get; set; } |
Gets or sets the default cosine similarity threshold. |
double FrameLengthMilliseconds { get; set; } |
Gets or sets the filterbank frame length in milliseconds (Kaldi’s default). |
double FrameShiftMilliseconds { get; set; } |
Gets or sets the filterbank frame shift in milliseconds (Kaldi’s default). |
double LearningRate { get; set; } |
Gets or sets the learning rate of the AdamW fallback, used only when no paper optimizer is built. |
double MinDurationSeconds { get; set; } |
Gets or sets the minimum audio duration in seconds. |
int BottleneckMultiplier { get; set; } |
Gets or sets the D-TDNN bottleneck as a multiple of the growth rate (bn_size). |
int EmbeddingDim { get; set; } |
Gets or sets the output speaker embedding dimension (embedding_size). |
int GrowthRate { get; set; } |
Gets or sets the channels each D-TDNN layer adds (growth_rate). |
int InitialChannels { get; set; } |
Gets or sets the TDNN layer’s output channels (init_channels). |
int NumMels { get; set; } |
Gets or sets the number of Kaldi filterbank bands (feat_dim); a multiple of 8. |
int SampleRate { get; set; } |
Gets or sets the expected audio sample rate in Hz. |
string ModelPath { get; set; } |
Gets or sets the path to the ONNX model file. |