CTCSegmentationOptions

Options & Configuration · AiDotNet.SpeechRecognition.CTCVariants

Options for CTC-segmentation.

Inheritance: ModelOptions → CTCSegmentationOptions

For Beginners

These options set the size of the Transformer encoder, the feature front end and the training augmentation.

How It Works

The defaults: a 12-layer Transformer encoder, width 256, 4 heads, a 6-layer decoder and a CTC layer.

Constructors

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

Properties

Property Summary
OnnxModelOptions OnnxOptions { get; set; } ONNX runtime options.
double CtcWeight { get; set; } Weight w of the CTC loss in the joint objective w L_CTC + (1 - w) L_attention.
double LabelSmoothing { get; set; } Label smoothing of the decoder’s cross-entropy.
double RopeTheta { get; set; } Rotary base of the attention; zero, since the Transformer adds sinusoidal positions.
double TimeMaskRatio { get; set; } Largest time mask as a fraction of the utterance (section 3.1: pS = 0.05).
int AttentionDecoderFeedForward { get; set; } Feed-forward units of each decoder layer.
int AttentionDecoderLayers { get; set; } Transformer decoder layers trained jointly with the CTC layer.
int ConfidenceWindow { get; set; } Frames per window of the segment confidence (Equation 3’s L).
int EncoderDim { get; set; } Conformer width.
int FeedForwardMultiplier { get; set; } Expansion of each feed-forward network: 2048 units at width 256.
int FrequencyMaskWidth { get; set; } Largest frequency mask, in mel bins (section 3.1: F = 27).
int FrequencyMasks { get; set; } SpecAugment frequency masks (section 3.1: 2).
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 NumEncoderLayers { get; set; } Conformer blocks.
int NumMels { get; set; } Log-mel bins (section 3.1: 80-channel filterbanks over 25 ms windows with a 10 ms stride).
int SampleRate { get; set; } Audio sample rate in Hz.
int TimeMasks { get; set; } SpecAugment time masks (section 3.1: 10).
int VocabSize { get; set; } Output vocabulary size, blank (token 0) included.
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.