Create Label for Each Clip in Track

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

Usage

  1. Select any audio
  2. Analyze/Label Clips

Output example