analyze_label_sounds
Automatically label sound regions in an audio file by detecting silence gaps. Set thresholds and offsets to segment long recordings, or label the silences instead for trimming and cleanup.
Instructions
Automatically label regions of sound separated by silence.
A good starting point for segmenting a long recording: label every passage of sound, or with label_type="between" label the silences instead so they can be trimmed with label_delete_regions.
measurement, label_type, pre_offset, post_offset and label_text are new and not yet independently live-tested against a running Audacity — verified against the scripting reference and unit tests with mocked responses only. threshold_db/min_silence_duration/min_sound_duration predate this and are unaffected.
Args: threshold_db: Volume threshold to distinguish sound from silence (dB). Default: -30 min_silence_duration: Minimum duration of silence between sounds (seconds). Default: 0.5 min_sound_duration: Minimum duration of a sound region (seconds). Default: 0.1 measurement: How level is measured — peak, avg or rms. Default: peak label_type: What to label — before, after, around or between the sounds. Default: before pre_offset: Seconds to extend each label before the sound starts. Default: 0 post_offset: Seconds to extend each label after the sound ends. Default: 0 label_text: Text for each label. Default: Audacity's own default
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label_text | No | ||
| label_type | No | before | |
| pre_offset | No | ||
| measurement | No | peak | |
| post_offset | No | ||
| threshold_db | No | ||
| min_sound_duration | No | ||
| min_silence_duration | No |