Menu

Splitting an Audio Project at Label Marks, the Way Audacity Does It (and Batch-Exporting Many Projects)
📰

Splitting an Audio Project at Label Marks, the Way Audacity Does It (and Batch-Exporting Many Projects)

DEV Community: typescript·王磊·16 days ago
#BLCMKlcd
#devtotypescript#devto#dev#label#file
Reading 0:00
15s threshold

If you edit podcasts or long recordings in Audacity, you probably use label tracks: little text marks on the timeline ("Intro", "Interview", "Outro"). Audacity can split a project into one file per label ( Export Multiple → Split files based on Labels ). I recently added the same thing to a browser-based .aup3 / .aup4 tool, plus a batch mode for several projects at once. Reproducing the rule exactly took more care than I expected, so here is how it works and what tripped me up.

Where labels live

A label track is stored in the project document as <labeltrack> containing <label t="…" t1="…" title="…"/> elements. t is the start in seconds and t1 the end. I checked the writer ( LabelTrack::WriteXML ) in Audacity 3.7.9 and 4.0.0 and the same names show up in .aup3 , .aup4 and the old XML-based 1.x/2.x .aup , so one reader covers all three.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.