Thank you, I needed this functionality and had been using audacity/audacity-project-tools + Python. GenAI made a version that works even if the first clip does not start at 0.00:
;version 4
(let ((clips (get '*track* 'clips)) ; absolute clip positions from Audacity
(sel-start (get '*selection* 'start)) ; selection start = 0 in Nyquist world
labels)
(dolist (clip clips (reverse labels))
(let* ((abs-start (first clip))
(abs-end (second clip))
(rel-start (- abs-start sel-start)) ; convert absolute to relative time
(rel-end (- abs-end sel-start))
(label-text "Clip")) ; simple label for all clips
(push (list rel-start rel-end label-text)
labels))))
Download version, Install, Launch
Download from label-clips.ny (548 Bytes)
For installation see
- “How to install” in this post for another plugin (has screenshots) or
- “Installing Nyquist plugins” - Installing plugins | Audacity Support (no screenshots)
Usage
- Select any audio
- Analyze/Label Clips

