Trim head and tail dead air, compress long mid pauses, and land a 16 kHz mono WAV for whisper.cpp, or keep a cleaned take for FFmpeg loudnorm, all on the command line. Our lab ran SoX v14.4.2 (Debian package 14.4.2+git20190427-5+b3) on Debian 13.
Official links · No affiliate commission · Added October 30, 2026
What we checked on SoX
The box was Debian 13 in a KVM guest with 8 CPU threads. The audio was ours: three English Piper TTS parts with digital silence we added for head, mid and tail (no music bed, no third-party audio). Master file interview_master_48k_mono.wav: PCM s16le, 48000 Hz, mono, 7,142,452 bytes. soxi -D read 74.399729 s. FFmpeg silencedetect at -50 dB / min 1.0 s saw head 5.005896 s, mid 3.237646 s and 4.212042 s, and tail 5.191229 s.
Head and tail only used the reverse chain: silence 1 0.1 1% reverse silence 1 0.1 1% reverse. That landed at 64.161458 s (removed 10.238271 s). The mid gaps stayed; FFmpeg still measured 3.237646 s and 4.212042 s after that pass.
Mid-pause compress with leave: silence -l 1 0.1 1% -1 2.0 1% wrote 58.092375 s (removed 16.307354 s from the input). A tighter -l ... -1 0.5 1% pass landed at 55.443208 s. On a clean synthetic gap file (14.000000 s), the same -l ... -1 2.0 1% recipe wrote 8.039417 s with two leftover gaps of 2.019854 s each, so the leave-2-second behavior holds on hard digital silence. On the TTS fixture, soft edges near 1% meant a strict -50 dB / 1.0 s detector did not see a remaining gap that long after the -l 2.0 pass; we still trust soxi -D.
Sample-rate handoff: rate 16k channels 1 from the mid-2 s file kept duration 58.092375 s at 16000 Hz, mono. SoX warned rate clipped 7 samples and dither clipped 5 samples. We did not claim a listening score from those clips.
Two deliberate pitfalls on the same master. A recipe with below-periods=1 and no reverse (silence 1 0.1 1% 1 0.1 1%) stopped at the first mid silence and left 0.371167 s. Raising the head/tail threshold from 1% to 10% cut the trim output from 64.161458 s to 63.287208 s (extra 0.874250 s of edge audio gone). A three-take batch (trim ends + rate 16k) finished in wall 0.063 s; outputs were 16 kHz mono at 14.635188 s, 19.869250 s and 19.913125 s.
Limits from those runs: One TTS English voice on one 74.399729 s mono WAV with digital silence we planted, so the durations compare settings on our input; they are not a silence-accuracy figure for your recordings. EBU R128 loudnorm was not run (SoX norm / gain are not a substitute). Audacity noise reduction was not compared. No GPU path. Windows and macOS package builds were not run. Real room noise, crosstalk and quiet human speech beyond this TTS fixture, and MP3 in/out quality beyond noting that lossy round-trips are a bad idea for a prep step you still need to edit, were not tested.
SoX v14.4.2 on our own 74.399729 s VO: head/tail trim to 64.161458 s, mid-pause -l 2.0 to 58.092375 s, then 16 kHz mono, plus the below-periods=1 stop at 0.371167 s.
Gate every take with the lab commands in order: soxi the input, reverse-chain head/tail silence, -l mid-pause leave gap, rate 16k mono, then FAIL the below-periods=1 and 10% traps before whisper or loudnorm.
The SourceForge project page for SoX (Sound eXchange) describes it as a command-line sound processing utility that converts audio formats and applies effects during conversion. The license line there lists GNU GPL version 2.0 and GNU LGPL version 2.0. Our box used the Debian packages sox / libsox3 at 14.4.2+git20190427-5+b3; sox --version and soxi --version both printed SoX v14.4.2. Binaries on PATH were /usr/bin/sox and /usr/bin/soxi.
We only tested that Debian 13 Linux build. Windows and macOS package builds were not run here. Work on a copy of your take folder until you trust the silence threshold on your voice, and measure every output with soxi -D rather than guessing from the waveform.