I have a large acoustic dataset (multiple years) with 6 hour recordings at 48 kHz sample rate. I am looking at patterns in humpback whale chatter and want to downsample my data to a 4 or 6 kHz sample rate. I have been using the Triton package in Matlab, developed by the Scripps Whale Acoustic Lab/Acoustic Ecology Lab. When I use the 'decimate' function to downsample my data, I find that it loses some data at the edge of the specified sample rate - i.e. if I decimate my 48 kHz sample rate to a 4 kHz sample rate, the produced sound file only has good data from 0 - 1800 Hz, roughly. While it's unlikely that I am missing a lot of humpback vocalizations in this 1800-2000 Hz window, I am wondering if there are other softwares that will downsample without losing samples near the nyquist frequency. Additionally, it takes several days to decimate a 3-4 month deployment in the Triton package.
A colleague recommended SoX (Sound eXchange), but I have had trouble getting it to work. They said it doesn't lose any data near the nyquist, and that it decimates much faster than Matlab.
Does anyone else use Sox? Or another software to decimate their large datasets?