RWKVTransducerOptions

Options & Configuration · AiDotNet.SpeechRecognition.ConformerFamily

Options for the RWKV streaming transducer, An and Zhang, “Exploring RWKV for Memory Efficient and Low Latency Streaming ASR” (arXiv:2309.14758).

Inheritance: ModelOptions → RWKVTransducerOptions

For Beginners

These options configure the RWKV streaming recognizer. The three that matter most control its running summary: how fast older audio fades, how much extra weight the current frame gets, and how much each frame is blended with the one before it. Defaults follow the original paper’s recommended settings for optimal speech recognition accuracy.

Constructors

Constructor Summary
RWKVTransducerOptions() Initializes a new instance with default values.
RWKVTransducerOptions(RWKVTransducerOptions other) Initializes a new instance by copying from another instance.

Properties

Property Summary
OnnxModelOptions OnnxOptions { get; set; } Gets or sets the ONNX Runtime settings used when the model is loaded from an ONNX file.
bool BoundaryAware { get; set; } Gets or sets whether to use the boundary-aware transducer variant.
double CurrentTokenBonus { get; set; } Gets or sets u, the extra weight the CURRENT frame carries relative to the decayed history.
double DropoutRate { get; set; } Gets or sets the dropout probability of the native layers during training.
double LearningRate { get; set; } Gets or sets the AdamW learning rate used when no optimizer is injected.
double TimeDecay { get; set; } Gets or sets w, the per-step time-decay exponent of the RWKV recurrence.
double TokenShiftMix { get; set; } Gets or sets mu, the token-shift mix: how much of the current frame the shifted input uses, the remainder coming from the previous frame.
int CgmlpDim { get; set; } Width of the convolutional gating MLP branch.
int EncoderDim { get; set; } Gets or sets the hidden width of the encoder.
int MaxAudioLengthSeconds { get; set; } Gets or sets the longest clip, in seconds, of the reference configuration.
int MaxEncoderFrames { get; set; } Longest encoder frame count the RWKV blocks are built for.
int NumAttentionHeads { get; set; } Gets or sets the number of heads in each attention layer.
int NumEncoderLayers { get; set; } Gets or sets the number of encoder blocks.
int NumMels { get; set; } Gets or sets the number of mel filterbank channels in the input features.
int SampleRate { get; set; } Gets or sets the sample rate, in Hz, that input audio is expected at.
int VocabSize { get; set; } Output vocabulary size; must equal Vocabulary’s length.
string Language { get; set; } Gets or sets the language code (for example “en”) reported for a transcript when none is passed or detected.
string ModelPath { get; set; } Gets or sets the path of the pretrained ONNX model.
string[] Vocabulary { get; set; } Gets or sets the token strings, indexed by token id, that native transcripts are spelled with.

Methods

Method Summary
void Validate() Validates the configuration.