I'm using SoX to trim a set of wav files into 16kHz, 16bit, mono channel wav files (which will be subsets of one of the initial wav files). Most of the source wav files are already set to this specification, however, I just found out that some of them have different sample rates. Since it's going to be automated in Java using a ProcessBuilder, I figured I could use the following command:
sox <source_wav> -b 16 <dest_wav> channels 1 rate 16000 trim <startTime> =<endTime>
and it'll only change the sample rate if it isn't 16000 Hz. It does what it's supposed to on files with the same specification, but on files with different sample rates, I get:
sox WARN rate: rate clipped 48 samples; decrease volume?
sox WARN dither: dither clipped 44 samples; decrease volume?
How should I deal with this without degrading the quality of the audio? Note that I don't know anything about signal processing.