EmformerRNNTOptions
Options & Configuration · AiDotNet.SpeechRecognition.Streaming
Options for Emformer RNN-T.
Inheritance: ModelOptions → EmformerRNNTOptions
For Beginners
These options set the size of the streaming encoder, how far it looks back and ahead, and the size of the decoder.
How It Works
The defaults are torchaudio’s emformer_rnnt_base: 20 Emformer layers of width 512 (128 x 4 stacked frames),
8 heads, 2048 feed-forward units, 16-frame segments, a 4-frame look-ahead, 30 frames of left context, 1024-dimensional
encodings and a three-layer 512-unit LSTM prediction network.
Constructors
| Constructor | Summary |
|---|---|
EmformerRNNTOptions() |
Initializes a new instance with default values. |
EmformerRNNTOptions(EmformerRNNTOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
ONNX runtime options. |
double TimeMaskRatio { get; set; } |
Largest time mask as a fraction of the utterance. |
int EncodingDim { get; set; } |
Width of the transcription and prediction encodings the joiner sums (1024). |
int FeedForwardDim { get; set; } |
Feed-forward units of each Emformer layer (2048, GELU). |
int FrequencyMaskWidth { get; set; } |
Largest frequency mask, in mel bins. |
int FrequencyMasks { get; set; } |
SpecAugment frequency masks. |
int LeftContextLength { get; set; } |
Left context in reduced frames (30). |
int MaxAudioLengthSeconds { get; set; } |
Longest audio a transcription covers, in seconds; longer input is truncated. |
int NumAttentionHeads { get; set; } |
Attention heads (8). |
int NumEncoderLayers { get; set; } |
Emformer layers (20). |
int NumLstmLayers { get; set; } |
LSTM layers of the prediction network (3). |
int NumMels { get; set; } |
Log-mel bins (80). |
int RightContextLength { get; set; } |
Look-ahead in input frames (4). |
int SampleRate { get; set; } |
Audio sample rate in Hz. |
int SegmentLength { get; set; } |
Segment length in input frames (16). |
int SymbolEmbeddingDim { get; set; } |
Symbol embedding and LSTM width of the prediction network (512). |
int TimeMasks { get; set; } |
SpecAugment time masks. |
int TimeReductionInputDim { get; set; } |
Width of the bias-free input linear layer before time reduction (128). |
int TimeReductionStride { get; set; } |
Frames stacked by time reduction (4); the Emformer width is TimeReductionInputDim times this. |
int VocabSize { get; set; } |
Output vocabulary, blank (token 0) included (torchaudio’s LibriSpeech model: 4,097 symbols). |
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. |