title: Converting and segmenting a collection of 44100hz, 16-bit mono wav files into 16kHz, 16-bit mono wav files
body: <p>I need to break apart a large collection of wav files into smaller segments, and convert them into 16 khz, 16-bit mono wav files. To segment the wav files, I downloaded a <code>WavFile</code> class from the following site: <a href="http://www.labbookpages.co.uk/audio/javaWavFiles.html" rel="nofollow">WavFile Class</a>. I tweaked it a bit to allow skipping an arbitrary number of frames. Using that class, I created a <code>WavSegmenter</code> class that would read a source wav file, and copy the frames between time x and time y into a new wav file. The start time and end time I can get from a provided XML file, and I can get the frames using <code>sample rate * time</code>. My problem is I do not know how to convert the sample rates from 44,100 to 16,000.</p>
  
  <p>Currently, I am looking into Java's Sound API for this. I didn't consult it initially, because I found the guides long, but if it's the best existing option, I am willing to go through it. I would still like to know if there's another way to do it, though. Finally, I would like to know whether I should completely adapt Java's Sound API, and drop the <code>WavFile</code> class I am currently using. To me, it looks sound, but I would just like to be sure.</p>
  
  <p>Thank you very much, in advance, for your time.</p>