ParaformerLargeOptions

Options & Configuration · AiDotNet.SpeechRecognition.AlibabaASR

Options for Paraformer-large: the released 220M-parameter Mandarin Paraformer.

Inheritance: ModelOptions → ParaformerLargeOptions

For Beginners

These options configure the ParaformerLarge model. Defaults are the release’s config.yaml: a 50-block SAN-M encoder of width 512, a 16-block SAN-M decoder, the convolutional CIF predictor, glancing ratio 0.75 and 8,404 characters.

Constructors

Constructor Summary
ParaformerLargeOptions() Initializes a new instance with default values.
ParaformerLargeOptions(ParaformerLargeOptions 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.
double LabelSmoothing { get; set; } The 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 EncoderDim { get; set; } The encoder’s width (512), which the predictor and the decoder share.
int FeedForwardDim { get; set; } Gets or sets the hidden width of the feed-forward network.
int FsmnKernelSize { get; set; } The FSMN memories’ kernel (11).
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 NumDecoderLayers { get; set; } SAN-M 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).
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).