label_import
Import labels from a standard Audacity label file by parsing tab-separated start, end, and text entries. Invalid lines are skipped and reported, so partial imports succeed.
Instructions
Import labels from a standard Audacity label text file (tab-separated start\tend\ttext per line; point labels have start == end).
There is no C++ import/export primitive for this in v4 (unlike v3's ImportLabels/ExportLabels scripting commands) - implemented here in pure Python instead, parsing the file directly and adding each label via the same primitives label_add_batch uses. Lines that don't parse as start/end/text are skipped and reported rather than failing the whole import.
Args: path: Absolute path to the labels text file.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "label_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |