DSPRelated.com
Code

Decimate WAV file

Ron April 1, 2011 Coded in Matlab

 

This is a SCRIPT to decimate a WAV file by an integer factor.

 

factor = 8;
[X, fs, nbits] = wavread('file.wav');
Y = decimate(X,factor);
wavwrite (Y, fs/factor, nbits, 'file-decimate.wav');