label_delete
Delete a label by index from label_list without touching audio. Selects the label's span on its label track and split-deletes it, preserving audio and re-adding any fully contained labels.
Instructions
Delete a single label without touching the audio.
Get the index from label_list. Audacity has no scripting command for deleting one label, so this selects the label's own span on its own label track and split-deletes it — audio tracks are never in the selection, and nothing downstream shifts in time.
Other labels on the same track that sit entirely inside the deleted label's span would be removed as collateral, so they are re-added afterwards. A label that only partially overlaps the span may be trimmed to the boundary; check label_list afterwards if labels on that track overlap each other.
To delete a label and the audio under it, use label_delete_audio_at.
Args: index: Flat label index from label_list
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes |