PhoneInterval#

class montreal_forced_aligner.db.PhoneInterval(**kwargs)[source]#

Bases: Base

Database class for storing information about aligned phone intervals

Parameters:
  • id (int) – Primary key

  • begin (float) – Beginning timestamp of the interval

  • end (float) – Ending timestamp of the interval

  • duration (float) – Calculated duration of the interval

  • phone_goodness (float) – Confidence score, log-likelihood, etc for the phone interval

  • phone_id (int) – Foreign key to Phone

  • phone (Phone) – Phone of the interval

  • utterance_id (int) – Foreign key to Utterance

  • utterance (Utterance) – Utterance of the interval

  • word_interval_id (int) – Foreign key to WordInterval

  • word_interval (WordInterval) – Word interval that is associated with the phone interval

  • workflow_id (int) – Foreign key to CorpusWorkflow

  • workflow (CorpusWorkflow) – Workflow that generated the phone interval

as_ctm()[source]#

Generate a CtmInterval from the database object

Returns:

CTM interval object

Return type:

CtmInterval

classmethod from_ctm(interval, utterance, workflow_id)[source]#

Construct a PhoneInterval from a CtmInterval object

Parameters:
  • interval (CtmInterval) – CtmInterval containing data for the phone interval

  • utterance (Utterance) – Utterance object that the phone interval belongs to

  • workflow_id (int) – Integer id for the workflow that generated the phone interval

Returns:

Phone interval object

Return type:

PhoneInterval