MedicalASROptions

Options & Configuration · AiDotNet.SpeechRecognition.Specialized

Options for MedicalASR, Chiu et al. 2018’s CTC and LAS recognizers for medical conversations.

Inheritance: ModelOptions → MedicalASROptions

For Beginners

These options configure the MedicalASR model. Default values follow the original paper’s recommended settings for optimal speech recognition accuracy.

Constructors

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

Properties

Property Summary
MedicalAsrDecoderType DecoderType { get; set; } Gets or sets which end-to-end decoder to build.
OnnxModelOptions OnnxOptions { get; set; } Gets or sets the ONNX runtime options.
bool Bidirectional { get; set; } Gets or sets whether the encoder LSTMs are bidirectional.
double MaxFrequency { get; set; } Gets or sets the highest frequency the filterbanks cover, in Hz.
double ScheduledSamplingProbability { get; set; } Gets or sets the highest probability with which scheduled sampling feeds the LAS decoder its own previous prediction instead of the ground truth.
int DecoderDim { get; set; } Gets or sets the LAS decoder’s LSTM units, also the width of its grapheme embedding and attention.
int EncoderDim { get; set; } Gets or sets the LSTM units of each encoder layer: per direction when Bidirectional, in total otherwise.
int MaxAudioLengthSeconds { get; set; } Gets or sets the longest audio, in seconds, a transcription reads.
int MaxTextLength { get; set; } Gets or sets the most graphemes a LAS transcription emits.
int NumAttentionHeads { get; set; } Gets or sets the heads of the LAS multi-headed attention.
int NumDecoderLayers { get; set; } Gets or sets the LAS decoder’s LSTM layers.
int NumEncoderLayers { get; set; } Gets or sets the encoder LSTM layers.
int NumMels { get; set; } Gets or sets the filterbank channels per 25 ms frame.
int OutputDelay { get; set; } Gets or sets the output delay, in input steps, of a unidirectional CTC model: its first outputs are ignored and its last input step repeated as many times (section 4.1).
int SampleRate { get; set; } Gets or sets the audio sample rate in Hz.
int ScheduledSamplingRampSteps { get; set; } Gets or sets the training steps over which the sampling probability ramps linearly from 0.
int StackedFrames { get; set; } Gets or sets how many 10 ms frames are stacked into one input step, which is also the stride.
int VocabSize { get; set; } Gets or sets the output units.
string Language { get; set; } Gets or sets the transcript language.
string ModelPath { get; set; } Gets or sets the ONNX model path, for the ONNX constructor.
string[] PhoneInventory { get; set; } Gets or sets the names of the CTC model’s phone units by index, used to write its transcript.

Methods

Method Summary
MedicalASROptions ForCtc() The paper’s bidirectional CTC model (section 5.1): five bidirectional LSTM layers of 350 units per direction over 8K context-dependent phones and the blank.