Whisper Models¶
aana.core.models.whisper
¶
WhisperParams
¶
Bases: BaseModel
A model for the Whisper audio-to-text model parameters.
ATTRIBUTE | DESCRIPTION |
---|---|
language |
Optional language code such as "en" or "fr". If None, language will be automatically detected.
TYPE:
|
beam_size |
Size of the beam for decoding.
TYPE:
|
best_of |
Number of best candidate sentences to consider.
TYPE:
|
temperature |
Controls the sampling randomness. It can be a tuple of temperatures, which will be successively used upon failures according to either compression_ratio_threshold or log_prob_threshold.
TYPE:
|
word_timestamps |
Whether to extract word-level timestamps.
TYPE:
|
vad_filter |
Whether to enable voice activity detection to filter non-speech.
TYPE:
|
check_temperature
¶
Validates a temperature value.
PARAMETER | DESCRIPTION |
---|---|
v |
Value to validate.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ValueError
|
Temperature is out of range. |
RETURNS | DESCRIPTION |
---|---|
Temperature value. |
Source code in aana/core/models/whisper.py
BatchedWhisperParams
¶
Bases: BaseModel
A model for the Batched version of Whisper audio-to-text model parameters.
ATTRIBUTE | DESCRIPTION |
---|---|
language |
Optional language code such as "en" or "fr". If None, language will be automatically detected.
TYPE:
|
beam_size |
Size of the beam for decoding.
TYPE:
|
best_of |
Number of best candidate sentences to consider.
TYPE:
|
temperature |
Controls the sampling randomness. It can be a tuple of temperatures, which will be successively used upon failures according to either compression_ratio_threshold or log_prob_threshold.
TYPE:
|
#TODO |
add other parameters
TYPE:
|
check_temperature
¶
Validates a temperature value.
PARAMETER | DESCRIPTION |
---|---|
v |
Value to validate.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ValueError
|
Temperature is out of range. |
RETURNS | DESCRIPTION |
---|---|
Temperature value. |