Expand description
Auto-cut: find “loud” segments (speech) vs “quiet” ones (ambient) in an audio clip from its waveform peaks (media::waveform::Peaks, 100 buckets/s) — no extra decoding. Pure functions, unit-tested.
Structs§
Constants§
- EPS 🔒
Functions§
- loud_
segments - Loud segments as (start, end) in SOURCE seconds within [src_in, src_in + src_len) of the analysed
stream, merged/filtered per
paramsand clamped to that window. Peak level per bucket = max(|min|, |max|) → dBFS. Empty peaks → empty result. - to_
timeline - Turn source-time loud segments into timeline cut times + ranges to remove for a clip that starts at
startwithspeed(forward only; reversed/frozen clips are not auto-cut): returns (cuts, quiet_ranges) in timeline seconds, quiet ranges = the complement of the loud segments inside the clip.keep_quietswaps the roles (keep ambient, remove speech).