Let's say I have a wav file that is 5 minutes long, but I need to remove exactly 512ms of audio at exactly 2:30.192. How would I do this with SoX? I'm looking essentially for the opposite effect of the pad command where you can insert audio samples at specific points in the wav. The end result would be the original file minus the 512ms; I do NOT want to extract 512ms, I want to delete it.
+ Reply to Thread
Results 1 to 6 of 6
Hmm, I'd say select the parts you want to keep, copy/paste and leave out the rest. I'm not sure how SoX works, but maybe you could copy data from 0:00.000 to 2:30.192 to be part one. Then copy from 2:30.704 to the end to be part two. Eventually join parts one and two.Das Leben ist eine Nebelwand voller Rasierklingen. (C. Bukowski)
SoX is a command line tool. It's old as crap, being designed MANY years ago to allow (at the time) mostly non-Windows systems to have a way to convert between many file types. So your guess is as good as mine. If you want to use ancient command line tools like SoX, you're on your own. I'm just about the only guy here who's even heard of it, but I last used it in the 1990s and even then I only used it to convert some files into Sun's weird low quality audio format at the time (AIW if I remember correctly).
Geez, agni451, Audacity is available for Windows, Mac and Linux. If that can't meet your needs instead of SoX, there's really no hope for you.
Yeah, I thought of that, I was just hoping I could do this in one operation instead of 3.
1. extract the start
sox too-long.wav start.wav trim 0 2:30.192
sox too-long.wav end.wav trim 2:30.704 2:29:296
sox start.wav end.wav joined.wav
@jman98: Audacity is nice if you want to handle one file, but if you have e.g. 1000 files where you need to do some audio manipulations, a command line tool and a small script normally does the job far better,...
To avoid three single steps, maybe you can work Selur's suggestion into a batch script...Das Leben ist eine Nebelwand voller Rasierklingen. (C. Bukowski)