export_textgrid#

montreal_forced_aligner.textgrid.export_textgrid(speaker_data, output_path, duration, frame_shift, output_format='long_textgrid')[source]#

Export aligned file to TextGrid

Parameters:
  • speaker_data (dict[Speaker, dict[str, list[CtmInterval]]) – Per speaker, per word/phone CtmInterval

  • output_path (Path) – Output path of the file

  • duration (float) – Duration of the file

  • frame_shift (float) – Frame shift of features, in seconds

  • output_format (str, optional) – Output format, one of: “long_textgrid” (default), “short_textgrid”, “json”, or “csv”