CIFDecoderOptions

Options & Configuration · AiDotNet.SpeechRecognition.CTCVariants

Options for the CIF-based recognizer of Dong and Xu (2020).

Inheritance: ModelOptions → CIFDecoderOptions

For Beginners

Defaults are the paper’s Mandarin (AISHELL-2) model: 40 filterbanks with deltas, a 64-filter convolutional front-end, five self-attention layers at each of three time resolutions of width 640, a two-layer non-autoregressive decoder and 5,230 output labels. For the LibriSpeech base model set EncoderDim 512, FeedForwardDim 2048, PredictorWindow 5, NumDecoderLayers 3, CtcWeight 0.25 and VocabSize 3725.

Constructors

Constructor Summary
CIFDecoderOptions() Initializes a new instance with default values.
CIFDecoderOptions(CIFDecoderOptions 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 CtcWeight { get; set; } λ1, the encoder CTC loss’s weight (0.5 for Mandarin, 0.25 for LibriSpeech).
double LabelSmoothing { get; set; } The uniform label smoothing of the cross-entropy (0.2).
double LearningRate { get; set; } The AdamW learning rate used when no optimizer is injected (2e-4; the paper states no optimizer).
double QuantityWeight { get; set; } λ2, the quantity loss’s weight (1).
double TailThreshold { get; set; } The residual weight above which inference fires once more at the tail (0.5).
int EncoderDim { get; set; } The model width d (640).
int FeedForwardDim { get; set; } The self-attention layers’ feed-forward width (2,560).
int MaxAudioLengthSeconds { get; set; } Gets or sets the longest clip, in seconds, of the reference configuration.
int MaxTextLength { get; set; } Gets or sets the maximum number of text tokens.
int NumAttentionHeads { get; set; } Gets or sets the number of attention heads.
int NumDecoderLayers { get; set; } Self-attention layers in the non-autoregressive decoder (2).
int NumFilters { get; set; } The front-end convolutions’ filters (64).
int NumLayersPerResolution { get; set; } Self-attention layers at each temporal resolution of the encoder (n = 5).
int NumMels { get; set; } Filterbank bands; deltas and delta-deltas are added as channels (40).
int NumResolutions { get; set; } Temporal resolutions of the encoder, separated by pooling of width 2 (3).
int PredictorWindow { get; set; } The weight predictor’s convolution window (3).
int SampleRate { get; set; } Gets or sets the sample rate, in Hz, that input audio is expected at.
int VocabSize { get; set; } Output labels, blank (0), end of sentence (1) and pad (2) included (5,230).
string Language { get; set; } Gets or sets the language code used for speech processing.
string ModelPath { get; set; } Gets or sets the path of the pretrained ONNX model.
string[] Vocabulary { get; set; } Optional vocabulary mapping label IDs to text.