Phone

sequences.word_and_phone.Phone(self, interval=(None, None, None), *, Interval=None)

A Phone subclass of SequenceInterval

Has all the same methods and attributes as SequenceInterval in addition to attributes described below. superset_class set to Word, and subset_class set to Bottom

Parameters

Name Type Description Default
interval list | tuple | Interval | SequenceInterval A tuple or list of start, end and label, or another SequenceInterval (None, None, None)

Examples

from aligned_textgrid import Word, Phone

DH = Phone((0, 1, "DH"))
AH0 = Phone((1, 2, "AH0"))

THE = Word((0, 2, "THE"))

DH.set_word(THE)
AH0.set_word(THE)

print(
    (
    f"The phone is {DH.label}. "
    f"The next phone is {DH.fol.label}. "
    f"It is in the word {DH.inword.label}."
    )
)
The phone is DH. The next phone is AH0. It is in the word THE.

Attributes

Name Type Description
inword Word The word instance this phone appears in.

Methods

Name Description
set_word Convenience function to set word for this Phone

set_word

sequences.word_and_phone.Phone.set_word(word)

Convenience function to set word for this Phone

Parameters

Name Type Description Default
word Word Word instance. required

Reuse

GPLv3