title: Downsampling wav audio file
body: <p>I have to downsample a wav file from 44100Hz to 16000Hz without using any external Python libraries, so preferably <code>wave</code> and/or <code>audioop</code>. I tried just changing the wav files framerate to 16000 by using <code>setframerate</code> function but that just slows down the entire recording. How can I just downsample the audio file to 16kHz and maintain the same length of the audio?</p>