crowsetta.formats.seq.textgrid.parse.parse#
- crowsetta.formats.seq.textgrid.parse.parse(textgrid_path: str | Path, keep_empty: bool = False) dict [source]#
Parse a TextGrid file, loading it into a
dict
.This function is used by
crowsetta.formats.seq.TextGrid.from_file()
to load and parse the TextGrid file passed in as theannot_path
argument.- Parameters:
textgrid_path (str, pathlib.Path) – The path to a TextGrid file.
keep_empty (bool) – If True, keep intervals in interval tiers that have empty labels (i.e., the empty string “”). Default is False.
- Returns:
textgrid_raw – A dict with keys ‘xmin’, ‘xmax’, and ‘tiers’.
- Return type: