Mercurial > hg > emotion-detection-top-level
view Code/General/openFile.m @ 2:5fd388fdd6ef
initial commit - this file allows the programmer to select which of the PRAAT generated metrics the user wishes to use for classification, and then applies the k-means classifier.
author | Dawn Black <dawn.black@eecs.qmul.ac.uk> |
---|---|
date | Mon, 10 Sep 2012 09:18:15 +0100 |
parents | ea0c737c6323 |
children |
line wrap: on
line source
function [x, fs, frameLength, noOfFrames] = openFile( currentSampleName ) [ x, fs ] = wavread(['../' currentSampleName]); frameLength = 2^(ceil(log2(fs/100))); noOfFrames = floor( length(x) / frameLength); %skip the final samples if necessary % Convert stereo to mono if (size(x, 2)==2) x = mean(x')'; end