WordInterval#
- class montreal_forced_aligner.db.WordInterval(**kwargs)[source]#
Bases:
Base
Database class for storing information about aligned word intervals
- Parameters:
id (int) – Primary key
begin (float) – Beginning timestamp of the interval
end (float) – Ending timestamp of the interval
word (
Word
) – Word of the intervalpronunciation_id (int) – Foreign key to
Pronunciation
pronunciation (
Pronunciation
) – Pronunciation of the wordutterance (
Utterance
) – Utterance of the intervalworkflow_id (int) – Foreign key to
CorpusWorkflow
workflow (
CorpusWorkflow
) – Workflow that generated the intervalphone_intervals (list[
PhoneInterval
]) – Phone intervals for the word interval
- as_ctm()[source]#
Generate a CtmInterval from the database object
- Returns:
CTM interval object
- Return type:
- classmethod from_ctm(interval, utterance, workflow_id)[source]#
Construct a WordInterval from a CtmInterval object
- Parameters:
interval (
CtmInterval
) – CtmInterval containing data for the word intervalutterance (
Utterance
) – Utterance object that the word interval belongs toworkflow_id (int) – Integer id for the workflow that generated the phone interval
- Returns:
Word interval object
- Return type: