ASR Models¶
aana.core.models.asr
¶
AsrWord
¶
Bases: BaseModel
Pydantic schema for Word from ASR model.
ATTRIBUTE | DESCRIPTION |
---|---|
word |
The word text.
TYPE:
|
speaker |
Speaker label for the word.
TYPE:
|
time_interval |
Time interval of the word.
TYPE:
|
alignment_confidence |
Alignment confidence of the word, >= 0.0 and <= 1.0.
TYPE:
|
from_whisper
¶
Convert WhisperWord to AsrWord.
PARAMETER | DESCRIPTION |
---|---|
whisper_word |
The WhisperWord from faster-whisper.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
AsrWord
|
The converted AsrWord.
TYPE:
|
Source code in aana/core/models/asr.py
AsrSegment
¶
Bases: BaseModel
Pydantic schema for Segment from ASR model.
ATTRIBUTE | DESCRIPTION |
---|---|
text |
The text of the segment (transcript/translation).
TYPE:
|
time_interval |
Time interval of the segment.
TYPE:
|
confidence |
Confidence of the segment.
TYPE:
|
no_speech_confidence |
Chance of being a silence segment.
TYPE:
|
words |
List of words in the segment. Default is [].
TYPE:
|
speaker |
Speaker label. Default is None.
TYPE:
|
from_whisper
¶
Convert WhisperSegment to AsrSegment.
Source code in aana/core/models/asr.py
AsrTranscriptionInfo
¶
Bases: BaseModel
Pydantic schema for TranscriptionInfo.
ATTRIBUTE | DESCRIPTION |
---|---|
language |
Language of the transcription.
TYPE:
|
language_confidence |
Confidence of the language detection, >= 0.0 and <= 1.0. Default is 0.0.
TYPE:
|
from_whisper
¶
Convert WhisperTranscriptionInfo to AsrTranscriptionInfo.
PARAMETER | DESCRIPTION |
---|---|
transcription_info |
The WhisperTranscriptionInfo from faster-whisper.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
AsrTranscriptionInfo
|
The converted AsrTranscriptionInfo.
TYPE:
|
Source code in aana/core/models/asr.py
AsrTranscription
¶
Bases: BaseModel
Pydantic schema for Transcription/Translation.
ATTRIBUTE | DESCRIPTION |
---|---|
text |
The text of the transcription/translation. Default is "".
TYPE:
|