audioscriptingautomationaiff

AIFF files: strip initial "whitespace"


I have a folder full of AIFF files that have a little gap at the beginning where no sound is heard. How would I go about writing a script/tool that'd remove this gap?

Basically the files look like this in Audacity (I want to get only the selected part): audacity screenshot

I can't really use Audacity because I have hundreds of the files so doing it by hand is not an option.

I don't care too much about the OS / language, as long as it works.


Solution

  • In the end it was just easier to hack up a quick C++ solution using libsndfile.

    Feel free to steal it from https://github.com/houbysoft/short/blob/master/removeInitialSilence.cpp.