process_ctm_line#

montreal_forced_aligner.textgrid.process_ctm_line(line, reversed_phone_mapping, raw_id=False)[source]#

Helper function for parsing a line of CTM file to construct a CTMInterval

CTM format is:

utt_id channel_num start_time phone_dur phone_id [confidence]

Parameters:
  • line (str) – Input string

  • reversed_phone_mapping (dict[int, str]) – Mapping from integer IDs to phone labels

Returns:

Extracted data from the line

Return type:

CtmInterval