RevAIOptions
Options & Configuration · AiDotNet.SpeechRecognition.ProprietaryAPI
Options for Rev AI’s Reverb ASR.
Inheritance: ModelOptions → RevAIOptions
For Beginners
These options set the size of the Conformer encoder, the feature front end and the training augmentation.
How It Works
The defaults: 18 Conformer blocks, a CTC layer and a bidirectional attention decoder of three left-to-right and three right-to-left layers, about 280M parameters (Reverb report, section 2.2). The report gives the layer counts and the total; the width (640, 8 heads, feed-forward 2,560) is the one that totals about 280M with those layers, and the kernel, CTC weight, reverse weight and label smoothing are WeNet’s U2++ defaults.
Constructors
| Constructor | Summary |
|---|---|
RevAIOptions() |
Initializes a new instance with default values. |
RevAIOptions(RevAIOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
ONNX runtime options. |
double CtcWeight { get; set; } |
Weight w of the CTC loss in the joint objective w L_CTC + (1 - w) L_attention. |
double LabelSmoothing { get; set; } |
Label smoothing of the decoder’s cross-entropy. |
double ReverseWeight { get; set; } |
The right-to-left decoder’s share of the attention loss (0.3, WeNet U2++’s reverse_weight). |
double RopeTheta { get; set; } |
Rotary base of the attention’s relative position encoding, standing in for WeNet’s relative positional encoding. |
double TimeMaskRatio { get; set; } |
Largest time mask as a fraction of the utterance (section 3.1: pS = 0.05). |
int AttentionDecoderFeedForward { get; set; } |
Feed-forward units of each decoder layer (2,560). |
int AttentionDecoderLayers { get; set; } |
Left-to-right decoder layers (3, section 2.2). |
int ConvKernel { get; set; } |
Depthwise convolution kernel (15, WeNet’s cnn_module_kernel). |
int EncoderDim { get; set; } |
Conformer width (640). |
int FeedForwardMultiplier { get; set; } |
Expansion of each half-step feed-forward module (section 2.3: 4). |
int FrequencyMaskWidth { get; set; } |
Largest frequency mask, in mel bins (section 3.1: F = 27). |
int FrequencyMasks { get; set; } |
SpecAugment frequency masks (section 3.1: 2). |
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. |
int NumEncoderLayers { get; set; } |
Conformer blocks (18, section 2.2). |
int NumMels { get; set; } |
Log-mel bins (section 3.1: 80-channel filterbanks over 25 ms windows with a 10 ms stride). |
int ReverseDecoderLayers { get; set; } |
Right-to-left decoder layers (3, section 2.2). |
int SampleRate { get; set; } |
Audio sample rate in Hz. |
int TimeMasks { get; set; } |
SpecAugment time masks (section 3.1: 10). |
int VocabSize { get; set; } |
Output vocabulary size, blank (token 0) included. |
string Language { get; set; } |
Language reported for transcriptions. |
string ModelPath { get; set; } |
Path to an exported ONNX model, when one is used. |
string[] Vocabulary { get; set; } |
The text of each token; tokens past the list decode as Unicode code points, and tokens in angle brackets decode to nothing. |