TDTDecoderOptions
Options & Configuration · AiDotNet.SpeechRecognition.Streaming
Options for TDT.
Inheritance: ModelOptions → TDTDecoderOptions
For Beginners
These options set the size of the Conformer encoder and decoder, the feature front end and the training augmentation.
How It Works
The defaults: 17 Conformer blocks, width 512, 8 heads, a 31-wide depthwise kernel, a 640-unit single-layer LSTM prediction network and a 640-wide joint network.
Constructors
| Constructor | Summary |
|---|---|
TDTDecoderOptions() |
Initializes a new instance with default values. |
TDTDecoderOptions(TDTDecoderOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
ONNX runtime options. |
double RopeTheta { get; set; } |
Rotary base of the attention’s relative position encoding, standing in for the paper’s relative sinusoidal encoding (section 2.1). |
double TimeMaskRatio { get; set; } |
Largest time mask as a fraction of the utterance (section 3.1: pS = 0.05). |
int ConvKernel { get; set; } |
Depthwise convolution kernel (Conformer-Large: 31). |
int EncoderDim { get; set; } |
Conformer width. |
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 JointDim { get; set; } |
Width of the joint network. |
int MaxAudioLengthSeconds { get; set; } |
Longest audio a transcription covers, in seconds; longer input is truncated. |
int NumAttentionHeads { get; set; } |
Attention heads per block. |
int NumEncoderLayers { get; set; } |
Conformer blocks. |
int NumMels { get; set; } |
Log-mel bins (section 3.1: 80-channel filterbanks over 25 ms windows with a 10 ms stride). |
int PredictionDim { get; set; } |
LSTM units of the prediction network (section 3.1: a single-layer LSTM of 640 units for Conformer M and L, 320 for S). |
int PredictionLayers { get; set; } |
LSTM layers of the prediction network (section 3.1: 1). |
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 (1024 SentencePiece tokens). |
int[] Durations { get; set; } |
The frame durations the joint network chooses among (Xu et al. |
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. |