KeywordSpottingOptions

Options & Configuration · AiDotNet.SpeechRecognition.Specialized

Options for Keyword Spotting: lightweight wake-word and command detection.

Inheritance: ModelOptions → KeywordSpottingOptions

For Beginners

These options configure the KeywordSpotting model. Default values follow the original paper’s recommended settings for optimal speech recognition accuracy.

Constructors

Constructor Summary
KeywordSpottingOptions() Initializes a new instance with default values.
KeywordSpottingOptions(KeywordSpottingOptions 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.
double DropoutRate { get; set; } Gets or sets a dropout probability kept for source compatibility; the Deep KWS layers have no dropout, so it is not read.
double LearningRate { get; set; } Gets or sets the initial stochastic-gradient-descent learning rate.
double LearningRateDecay { get; set; } Gets or sets the per-update exponential learning-rate multiplier.
int EncoderDim { get; set; } Gets or sets the number of ReLU units in each fully connected hidden layer.
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 an attention-head count kept for source compatibility with older Conformer-based configurations.
int NumEncoderLayers { get; set; } Gets or sets the number of fully connected ReLU hidden layers.
int NumMels { get; set; } Gets or sets the number of log-filterbank energies per acoustic frame.
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; } Gets or sets the language code (for example “en”) reported for a transcript when none is passed or detected.
string ModelPath { get; set; } Gets or sets the path of the pretrained ONNX model.
string[] Vocabulary { get; set; } Gets or sets output label names, with index zero reserved for the non-keyword/filler label.