
Remove silence from audio
Cut out stretches of an audio file (or a video's audio track) quieter than a threshold for longer than a minimum duration, keeping a little padding at each cut, decoded and re-encoded as WAV through the same PCM path as audio-reverse. WAV decodes everywhere; other codecs need a browser.
Remove silence from audio cuts any stretch of low volume once it runs longer than a minimum length you set, leaving a short pad near the nearest real sound. Loudness is measured against a threshold in dBFS, minus 40 by default. A file quiet throughout is refused. WAV decodes anywhere; other codecs need a browser first.
Questions
How is silence detected?
Every sample is compared against thresholdDb, minus 40 dBFS by default, converted to a linear level; a frame quieter than that on every channel counts as silence.
What does paddingMs do?
It keeps a short stretch of the removed silence, 0 milliseconds by default, at whichever edge of a cut run borders real audio, so the cut does not land jarringly close to speech.
What if there is no silence to remove?
The tool still writes an output file, a copy of the input re-encoded as WAV, and its report says no run of silence at or above minSilenceMs was found.
Why did it refuse my file entirely?
Because the whole file measured below thresholdDb, so removing all of it would leave nothing. Raise thresholdDb or check that you dropped the right file.
Does this work on a video's audio track?
Yes. The picture is untouched; only the decoded audio samples are trimmed and written back out as a WAV file.