ConvTransformerOptions

Options & Configuration · AiDotNet.SpeechRecognition.ConformerFamily

Options for ConvTransformer.

Inheritance: ModelOptions → ConvTransformerOptions

For Beginners

These options set the size of the encoder and decoder, the feature front end and the training augmentation.

How It Works

The defaults are the canonical model of section 3.1: width 1024, 10 encoder and 10 decoder Transformer blocks, 16 heads.

Constructors

Constructor Summary
ConvTransformerOptions() Initializes a new instance with default values.
ConvTransformerOptions(ConvTransformerOptions 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; zero, since the convolutional context replaces positional encodings (section 2.2).
double TimeMaskRatio { get; set; } Largest time mask as a fraction of the utterance (section 3.1: pS = 0.05).
int DecoderEmbeddingDim { get; set; } Width of the decoder’s token embedding (section 3.1: 512).
int EncoderDim { get; set; } Transformer width.
int FeedForwardMultiplier { get; set; } Expansion of each feed-forward network: 2048 ReLU units at width 1024.
int FrequencyMaskWidth { get; set; } Largest frequency mask, in mel bins (section 3.1: F = 27).
int FrequencyMasks { get; set; } SpecAugment frequency masks; Moonshine reads the waveform and trains without them.
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 NumDecoderLayers { get; set; } Decoder layers (Table 1).
int NumEncoderLayers { get; set; } Conformer blocks.
int NumMels { get; set; } Log-mel bins (section 3.1: 80-dimensional log mel-filterbank coefficients).
int SampleRate { get; set; } Audio sample rate in Hz.
int TimeMasks { get; set; } SpecAugment time masks; none in the paper.
int VocabSize { get; set; } Output vocabulary (section 3.1: 5,000 unigram subword units).
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.