WordInterval#
- class montreal_forced_aligner.db.WordInterval(**kwargs)[source]#
Bases:
BaseDatabase 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
Pronunciationpronunciation (
Pronunciation) – Pronunciation of the wordutterance (
Utterance) – Utterance of 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:
CtmInterval
- classmethod from_ctm(interval, utterance)[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 to
- Returns:
Word interval object
- Return type: