WhisperOptions
Options & Configuration · AiDotNet.Audio.Whisper
Configuration options for the Whisper speech recognition model.
Inheritance: ModelOptions → NeuralNetworkOptions → ModelHyperparameterOptions → AudioNeuralNetworkOptions → WhisperOptions
For Beginners
Whisper comes in different sizes (tiny to large). Smaller models are faster but less accurate. Larger models are more accurate but slower.
- Tiny: ~39M parameters, fastest, good for quick transcription
- Base: ~74M parameters, balanced speed/accuracy
- Small: ~244M parameters, good accuracy
- Medium: ~769M parameters, high accuracy
- Large: ~1.5B parameters, best accuracy, slow
How It Works
Whisper is a speech recognition model developed by OpenAI that can transcribe audio in multiple languages and perform translation.
Constructors
| Constructor | Summary |
|---|---|
WhisperOptions() |
Initializes a new instance with default values. |
WhisperOptions(WhisperOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
Gets or sets the ONNX execution options. |
WhisperModelSize ModelSize { get; set; } |
Gets or sets the model size to use. |
bool Translate { get; set; } |
Gets or sets whether to translate to English. |
double Temperature { get; set; } |
Gets or sets the temperature for sampling. |
int BeamSize { get; set; } |
Gets or sets the beam size for beam search decoding. |
int MaxAudioLengthSeconds { get; set; } |
Gets or sets the maximum length of audio to process in seconds. |
int MaxTokens { get; set; } |
Gets or sets the maximum number of tokens to generate. |
int NumMels { get; set; } |
Gets or sets the number of mel filterbank channels. |
int SampleRate { get; set; } |
Gets or sets the sample rate expected by the model. |
string Language { get; set; } |
Gets or sets the language code for transcription (e.g., “en”, “es”, “fr”). |
Methods
| Method | Summary |
|---|---|
void Validate() |
Throws if a value this model requires has been left unset or is not positive. |