Mercurial > hg > mauch-mirex-2010
view _misc/featureextraction/.svn/text-base/readaudiochunk.m.svn-base @ 8:b5b38998ef3b
added all that other stuff
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:54:25 +0100 |
parents | |
children |
line wrap: on
line source
% Read in an audio file function [audiodata, info] = readaudiochunk(info) fprintf(1,'reading audio chunk\n'); % read in wav file [rawdata, info.fs] = wavread(info.filename,[info.startsample info.endsample]); info.fsdownsampled = info.fs; % take average of stereo signals to give one mono audio vector meandata = mean(rawdata,2); % normalise audio if max(meandata) > 0.00001 audiodata = meandata/max(meandata); else audiodata = meandata; end