StreamingZipformerOptions

Options & Configuration · AiDotNet.SpeechRecognition.Streaming

Options for the streaming Zipformer transducer.

Inheritance: ModelOptions → StreamingZipformerOptions

For Beginners

Each array has one entry per stack, from the input side to the output side.

How It Works

The defaults are icefall’s LibriSpeech Zipformer recipe (per-stack blocks 2, 2, 3, 4, 3, 2; widths 192, 256, 384, 512, 384, 256; downsampling 1, 2, 4, 8, 4, 2; feed-forward 512, 768, 1024, 1536, 1024, 768; heads 4, 4, 4, 8, 4, 4; kernels 31, 31, 15, 15, 15, 31), a 512-wide stateless decoder with two labels of context, a 512-wide joiner and a 500-token vocabulary, with 32-frame chunks and 128 frames of left context for streaming.

Constructors

Constructor Summary
StreamingZipformerOptions() Initializes a new instance with default values.
StreamingZipformerOptions(StreamingZipformerOptions 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 ChunkSize { get; set; } Frames (at 50 Hz) of each streaming attention chunk; zero attends over the whole utterance.
int ContextSize { get; set; } Labels the stateless decoder reads (2).
int DecoderDim { get; set; } Width of the stateless decoder (512).
int FrequencyMaskWidth { get; set; } Largest frequency mask, in mel bins.
int FrequencyMasks { get; set; } SpecAugment frequency masks.
int JoinerDim { get; set; } Width of the joiner (512).
int LeftContextFrames { get; set; } Frames (at 50 Hz) of left context each chunk attends to; negative for the whole past.
int MaxAudioLengthSeconds { get; set; } Longest audio a transcription covers, in seconds; longer input is truncated.
int NumEncoderLayers { get; } Total Zipformer blocks.
int NumMels { get; set; } Log-mel filterbank bins (80).
int PosDim { get; set; } Width of the relative positional encoding (48).
int PosHeadDim { get; set; } Positional query dimension per head (4).
int QueryHeadDim { get; set; } Query and key dimension per head (32).
int SampleRate { get; set; } Audio sample rate in Hz.
int TimeMasks { get; set; } SpecAugment time masks.
int ValueHeadDim { get; set; } Value dimension per head (12).
int VocabSize { get; set; } Output vocabulary, blank (token 0) included (icefall’s LibriSpeech BPE: 500).
int[] ConvKernels { get; set; } Depthwise convolution kernel of each stack.
int[] Downsampling { get; set; } Downsampling factor of each stack relative to 50 Hz.
int[] EmbedChannels { get; set; } Channels of Conv-Embed’s three convolutions (section 3.1: 8, 32, 128).
int[] EncoderDims { get; set; } Embedding width of each stack.
int[] FeedForwardDims { get; set; } Feed-forward width of each stack (the block’s three modules use 3/4, 1 and 5/4 of it).
int[] NumHeads { get; set; } Attention heads of each stack.
int[] NumLayersPerStack { get; set; } Zipformer blocks of each stack.
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.