I have around 20,000 .wav files (all voice lines) that I need to strip the silence from the start AND end of.
The "silence" isn't pure silence, so I'll need to set a threshold.
I'd also like to leave a little "silence" before the actual sound/voice starts, so each file would get trimmed but .X seconds of the original silence remains.
I've tried various commands and can't get it to set a threshold correctly. I've seen a lot of internet comments about doing this, so I must be using the command wrong.
I also can't figure out how to leave .X seconds of silence.
I assume sox can do this, or at least most of it?
I found this very useful guide for using SoX Silence. While the official SoX Silence manual page is quite a mess and incomprehensible, this guide provides thorough explanation with examples: https://digitalcardboard.com/blog/2009/08/25/the-sox-of-silence/comment-page-2/
You can try:
sox input.wav output.wav silence 1 X 0.1% 1 X 0.1% : newfile : restart
with X
being a number such as 0.75
Trim the silence beginning of the audio
sox in.wav out1.wav silence 1 0.1 1%
Source: https://digitalcardboard.com/blog/2009/08/25/the-sox-of-silence/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With