samer@32: % mfcc - Mel-frequency ceptral coefficients samer@32: % samer@32: % mfcc :: samer@32: % [[M]->[40]] ~'which of 40 available coeffs to return', samer@32: % N:natural ~'analysis window size', samer@32: % [[T]] ~'input signal', samer@32: % nonneg ~'sampling rate' samer@32: % -> [[M,L]] ~'MFCCs for L time slices'. samer@32: function y=mfcc(MX,N,x,fs) samer@32: [pow,fx]=powspec(spdiag(hamming(N,'periodic'))*buffer(x,N,floor(N/2)),2^nextpow2(N+1)); samer@32: y=cepstrum(MX,melspace(400/3,min(7000,fs/2),42),fs*fx,pow); samer@32: end