MoonshineBaseOptions

Options & Configuration · AiDotNet.SpeechRecognition.Streaming

Options for Moonshine Base.

Inheritance: ModelOptions → MoonshineBaseOptions

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 Moonshine Base of Table 1: width 416, 8 encoder and 8 decoder layers, 8 heads.

Constructors

Constructor Summary
MoonshineBaseOptions() Initializes a new instance with default values.
MoonshineBaseOptions(MoonshineBaseOptions 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 every encoder and decoder self-attention (section 3.1: rotary position embeddings).
double TimeMaskRatio { get; set; } Largest time mask as a fraction of the utterance (section 3.1: pS = 0.05).
int EncoderDim { get; set; } Conformer width.
int EndToken { get; set; } The token that ends a transcript (Llama’s end of sequence: 2).
int FeedForwardMultiplier { get; set; } Expansion of each feed-forward network (4x the width).
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 SampleRate { get; set; } Audio sample rate in Hz.
int StartToken { get; set; } The token that starts the decoder’s input (Llama’s beginning of sequence: 1).
int TimeMasks { get; set; } SpecAugment time masks; none for Moonshine.
int VocabSize { get; set; } Output vocabulary (section 3.1: 32,000 BPE tokens plus 768 special tokens).
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.