SenseVoiceOptions
Options & Configuration · AiDotNet.SpeechRecognition.AlibabaASR
Options for SenseVoice: multi-task speech understanding model.
Inheritance: ModelOptions → SenseVoiceOptions
For Beginners
These options configure SenseVoice-Small. Supported defaults follow the released FunASR configuration: 512-wide SAN-M encoder, 50 + 20 blocks, 4 attention heads, 2048-wide feed-forward layers, FSMN kernel 11, low frame rate 7/6, 25,055 tokens, 80 mel bands, and AdamW at 2e-5.
Constructors
| Constructor | Summary |
|---|---|
SenseVoiceOptions() |
Initializes a new instance with default values. |
SenseVoiceOptions(SenseVoiceOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
Gets or sets the ONNX Runtime settings used when the model is loaded from an ONNX file. |
bool TargetsIncludeRichTokens { get; set; } |
Training targets carry the four rich tokens (language, emotion, event, text normalization) before the transcript, as the release’s do; their cross-entropy is then added to the CTC loss. |
bool UseInverseTextNormalization { get; set; } |
The text-normalization query: with inverse text normalization (14) or without (15, the release’s default). |
double LearningRate { get; set; } |
Gets or sets the optimizer learning rate. |
double WeightDecay { get; set; } |
Gets or sets the weight decay of the default optimizer. |
int EncoderDim { get; set; } |
Gets or sets the hidden width of the encoder. |
int FeedForwardDim { get; set; } |
Gets or sets the hidden width of the feed-forward network. |
int FsmnKernelSize { get; set; } |
The FSMN memory’s kernel (11). |
int LfrM { get; set; } |
Filterbank frames stacked by the low frame rate front end (7). |
int LfrN { get; set; } |
The stride between stacks (6, 60 ms). |
int MaxAudioLengthSeconds { get; set; } |
Gets or sets the longest clip, in seconds, of the reference configuration. |
int MaxTextLength { get; set; } |
Gets or sets the most tokens decoded for one utterance. |
int NumAttentionHeads { get; set; } |
Gets or sets the number of heads in each attention layer. |
int NumEncoderLayers { get; set; } |
Gets or sets the number of encoder layers. |
int NumMels { get; set; } |
Gets or sets the number of mel filterbank channels in the input features. |
int NumTpEncoderLayers { get; set; } |
SAN-M blocks after the first norm (tp_blocks, 20). |
int SampleRate { get; set; } |
Gets or sets the sample rate, in Hz, that input audio is expected at. |
int VocabSize { get; set; } |
Gets or sets the number of output tokens the model predicts over. |
string Language { get; set; } |
The language query: auto (the release’s default), zh, en, yue, ja, ko or nospeech. |
string ModelPath { get; set; } |
Gets or sets the path of the pretrained ONNX model. |
string[] Vocabulary { get; set; } |
Token strings by id; ids past it decode as Unicode code points. |