Trying to split a Wav file into two parts using SoX

I am trying to split one .wav file into two parts, where there are a few seconds of silence. Based on the documentation I found, the following should work:

 sox testfile.wav tester.wav silence 1 0.50 0.1% 1 1.0 0.1% : newfile : restart

"testfile.wav" is a voice recording, and I put about 4 seconds of silence in the middle of this test. Expected Result: I get "tester001.wav" and "tester002.wav" from running this. Instead, I get one file - "tester.wav", which is the first part of the original file (up to silence). I am wondering how to do this and make a new file from the AFTER silence part.

I found this: sox could not split the files into StackOverflow, but the accepted answer to this question did not change it for me (changing seconds to 3.0 gave me the same results, as I have a space of four seconds. It still didn't give me a second audio file.)

Any help would be appreciated!

+3
source share
1 answer

Ha! Well, it turns out that the SoX version running on my server was ancient, which was the problem. After upgrading to the current version, everything works as expected. :)

+3
source

All Articles