Sox: splitting audio on silence but leaving tails

sox

I love how sox has the ability to split an audio file on silence. The issue I'm haivng is that occasionally my audio tracks end with fadeouts, or notes decaying into reverb (subtle sounds that sox will mistake for silence). I'm trying to adjust the sox command to split the tracks on silence, but LEAVE a LITTLE silence after each split.
I can't figure out exactly how to do it. here's the command I have so far:

sox in.wav out.wav silence 1 2 0.5% 1 4.0 0.9% : newfile : restart

Any help with this would be greatly appreciated!

Best Answer

To add some silence, you need a chunk of silence and append it to your file

sox -n -r 44100 -c 2 silence.wav trim 0.0 3.0

and

sox filetopad.mp3 silence.wav output.wav

as described Padding an audio file with silence using sox.

Related Question