BESTRQOptions
Options & Configuration · AiDotNet.SpeechRecognition.Foundation
Options for BEST-RQ: Conformer XL pre-trained with a random-projection quantizer, with a CTC layer.
Inheritance: ModelOptions → BESTRQOptions
For Beginners
These options configure the BEST-RQ recognizer: the size of its Conformer encoder, the random quantizer that makes its self-supervised targets, and how much of the input pre-training hides.
How It Works
The defaults are the 0.6B non-streaming LibriSpeech model of Chiu et al. 2022, section 4.1: 80-bin log-mel input at a 10 ms stride, Conformer XL (24 blocks, 1024 wide, 8 heads, kernel 5; Zhang et al. 2020, Table 1), an 8192-entry 16-dimensional codebook over 4 stacked frames, and masking with probability 0.01 over 400 ms spans.
Constructors
| Constructor | Summary |
|---|---|
BESTRQOptions() |
Initializes a new instance with default values. |
BESTRQOptions(BESTRQOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
ONNX runtime options. |
double LogMelFloor { get; set; } |
Floor added to the mel energies before the logarithm. |
double MaskNoiseStd { get; set; } |
Standard deviation of the zero-mean normal noise that replaces masked frames (section 3: 0.1). |
double MaskProbability { get; set; } |
Probability that each input frame starts a masked span (section 4.1.1: 0.01). |
int CodeDim { get; set; } |
Codebook entry dimension, the height of the projection matrix (section 4.1.1: 16). |
int CodebookSize { get; set; } |
Random-projection quantizer codebook entries, which is also the pre-training softmax width (section 4.1.1: 8192). |
int ConvKernel { get; set; } |
Depthwise convolution kernel (Conformer XL: 5). |
int EncoderDim { get; set; } |
Conformer width (Conformer XL, Zhang et al. |
int FeedForwardMultiplier { get; set; } |
Feed-forward expansion of each half-step feed-forward module (Gulati et al. |
int HopLength { get; set; } |
Frame stride in samples (section 4.1: 10 ms). |
int MaskLength { get; set; } |
Masked span length in input frames (section 4.1.1: 400 ms, 40 frames at the 10 ms stride). |
int MaxAudioLengthSeconds { get; set; } |
Longest audio a transcription covers, in seconds; longer input is truncated. |
int MaxTextLength { get; set; } |
Most tokens a transcription decodes. |
int NumAttentionHeads { get; set; } |
Attention heads per block (Conformer XL: 8). |
int NumEncoderLayers { get; set; } |
Conformer blocks (section 4.1.1 and Conformer XL: 24). |
int NumMels { get; set; } |
Log-mel bins (section 4.1: 80-dimensional log-mel filter bank coefficients). |
int SampleRate { get; set; } |
Audio sample rate in Hz. |
int StackedFrames { get; set; } |
Input frames stacked per quantized label, matching the encoder’s 4× reduction (section 4.1.1: 4). |
int VocabSize { get; set; } |
CTC vocabulary size, blank (token 0) included; tokens above 0 decode as Unicode code points. |
int WindowLength { get; set; } |
Analysis window in samples (25 ms at 16 kHz; the paper states only the 10 ms stride). |
string Language { get; set; } |
Language reported for transcriptions. |
string ModelPath { get; set; } |
Path to an exported ONNX model, when one is used. |