diff Code/Descriptors/Matlab/Speech/calculate_MFCC.m @ 4:92ca03a8fa99 tip

Update to ICASSP 2013 benchmark
author Dawn Black
date Wed, 13 Feb 2013 11:02:39 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Code/Descriptors/Matlab/Speech/calculate_MFCC.m	Wed Feb 13 11:02:39 2013 +0000
@@ -0,0 +1,22 @@
+function [ceps] = calculate_MFCC( x, fs, frameLength, noOfFrames )
+
+% sampleFileName = sampleWavFileName( 1 : length( sampleWavFileName ) - 4 );
+% fileName = [ sampleFileName '_MFCC.txt'];
+% fileID = fopen( fileName, 'w');
+% 
+% raw = x(:,1);
+
+[ceps,freqresp,fb,fbrecon,freqrecon] = mfcc( x, fs, fs/frameLength );
+
+
+% noOfValidFrames = length(ceps);
+
+% for i = 1 : noOfValidFrames
+%     fprintf(fileID,'%d ',i);
+%     for j = 1: 13 % get's the first 13 MFCC's
+%          fprintf(fileID, '%f ', ceps(j,i));
+%     end
+%     fprintf(fileID, '\n');
+% end
+% 
+% fclose( fileID );
\ No newline at end of file