pyeeg.features.TextGridParser.parse_from_string
- TextGridParser.parse_from_string(content: str) TextGrid
Parse a TextGrid from a string.
Iterates over the lines of a Praat TextGrid in short text format. Two tier header formats are supported:
compact:
item [N]: "tier_name"on a single line.long (Praat’s default): an
item [N]:header line followed byclass = "..."andname = "tier_name"lines.
Two interval formats are supported:
compact:
intervals [N]: "label" start endon a single line.long (Praat’s default): an
intervals [N]:header line followed byxmin = ...,xmax = ...andtext = "..."lines.
Tier and interval indices reported by Praat are ignored; only names, labels, and timestamps are kept.