SeACoOptions

Options & Configuration · AiDotNet.SpeechRecognition.AlibabaASR

Options for SeACo-Paraformer: Paraformer-large with a hotword bias encoder, bias decoder and bias output layer.

Inheritance: ModelOptions → SeACoOptions

For Beginners

Defaults are the released SeACo-Paraformer (FunASR’s seaco config and the paper’s section 4.2): the Paraformer-large backbone, a two-layer LSTM bias encoder of width 512, a four-block bias decoder with 1,024 hidden units, hotwords of 2 to 8 tokens sampled with ratios 0.75, and 8,404 characters.

Constructors

Constructor Summary
SeACoOptions() Initializes a new instance with default values.
SeACoOptions(SeACoOptions 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.
SeACoTrainingStage TrainingStage { get; set; } Which parameter group Train updates.
double BiasLabelSmoothing { get; set; } The bias loss’s label smoothing (0.1; the release’s seaco_lsm_weight).
double BiasMergeLambda { get; set; } λ in Equation 5: the weight on the bias probabilities where the bias decoder detects a hotword (1).
double HotwordBatchRatio { get; set; } r_b: the share of training batches that sample hotwords (0.75); the others train with the default hotword alone.
double HotwordUtteranceRatio { get; set; } r_u: the share of utterances in a sampling batch that contribute a hotword (0.75).
double LabelSmoothing { get; set; } The ASR decoder loss’s label smoothing (0.1).
double PredictorWeight { get; set; } The MAE token-count loss’s weight (1).
double SamplingRatio { get; set; } The glancing sampler’s λ (0.75).
double TailThreshold { get; set; } The CIF tail weight at inference (0.45).
int AttentionFilterTopK { get; set; } k for attention score filtering (50; section 4.3): with more hotwords, only the k the bias decoder’s last layer attends to most are kept.
int BiasFeedForwardDim { get; set; } The bias decoder’s feed-forward width (1,024; section 4.2).
int BiasFsmnKernelSize { get; set; } The bias decoder’s FSMN kernel (21; the release’s seaco_decoder_conf).
int EncoderDim { get; set; } The model width (512), shared by the encoder, the predictor, both decoders and the bias encoder.
int FeedForwardDim { get; set; } The encoder’s and the ASR decoder’s feed-forward width (2,048).
int FsmnKernelSize { get; set; } The encoder’s and the ASR decoder’s FSMN kernel (11).
int HotwordMaxLength { get; set; } l_max: the longest sampled hotword in tokens (8).
int HotwordMinLength { get; set; } l_min: the shortest sampled hotword in tokens (2).
int LfrM { get; set; } Filterbank frames stacked by the low frame rate front end (7).
int LfrN { get; set; } The stride between stacks (6).
int MaxAudioLengthSeconds { get; set; } Gets or sets the longest clip, in seconds, of the reference configuration.
int MaxTextLength { get; set; } Gets or sets the most tokens decoded for one utterance.
int NumAttentionHeads { get; set; } Gets or sets the number of attention heads.
int NumBiasDecoderLayers { get; set; } SAN-M blocks with cross-attention in the bias decoder (4; section 4.2), before its final feed-forward block.
int NumBiasEncoderLayers { get; set; } LSTM layers in the bias encoder (2; section 4.2).
int NumDecoderLayers { get; set; } SAN-M ASR decoder blocks with cross-attention (16), before the final feed-forward block.
int NumEncoderLayers { get; set; } SAN-M encoder blocks (50).
int NumMels { get; set; } Kaldi filterbank bands (80).
int SampleRate { get; set; } Gets or sets the sample rate, in Hz, that input audio is expected at.
int VocabSize { get; set; } Output vocabulary, blank (0), start (1) and end (2) included (8,404).
int WarmupSteps { get; set; } The learning rate’s warmup steps (30,000, FunASR’s warmuplr).
int? HotwordMaskTokenId { get; set; } The no-bias class (‘#’).
string Language { get; set; } Gets or sets the language code used for speech processing.
string ModelPath { get; set; } Gets or sets the path of the pretrained ONNX model.
string[] Vocabulary { get; set; } Optional vocabulary mapping token IDs to text tokens (the release’s tokens.json); hotwords are tokenized with it.