TextGrid output formats and schemas
mainPraatIO supports four output types:
- Short TextGrid: Concise format, natively supported by Praat.
- Long TextGrid: Human-readable format, natively supported by Praat.
- JSON: A minimal, developer-friendly format. Note: This format does not support different min/max timestamps for the TextGrid vs its tiers.
- Textgrid-like JSON: A developer-friendly format that includes
xmin,xmax, and tier-specificxmin/xmax. Use this if your TextGrid has specific timestamp bounds that differ from the global bounds.
// Schema for Textgrid-like JSON (supports specific min/max per tier)
{
"xmin": 0.0,
"xmax": 1.8,
"tiers": [
{
"class": "IntervalTier",
"name": "phone",
"xmin": 0.0,
"xmax": 1.8,
"entries": [[0.0, 0.3, ""], [0.3, 0.38, "m"]]
}
]
}