function cps=mfcc_ifft(s,CPS_COEFFS); % MFCC, [cps,dct]=mfcc(s,CPS_COEFFS) % everything hard-wired inside. Reads mel fb from ~/matlab/fbanks/ % can eventually output also the dct % CPS_COEFFS is the number of cps. coeffs including the 0-th one. % 1st and last channel repeated; uses the ifft instead of dct. load /u/honza/matlab/fbanks/mfb %load /home/cernocky/OGI/PLP/mfb N=size(mfb,2); CPS_ORDER=15; S = abs(specgram(s,256,8000,hamming(200),120)).^2; Nfr = size(S,2); fbout = mfb' * S; % log fboutlog = log(fbout); % ifft - better do it in a cycle. R = zeros(2*(N+1),Nfr); for ii=1:Nfr, repeated = [fboutlog(1,ii); fboutlog(:,ii); fboutlog(N,ii)]; x = [repeated; repeated(N+1:-1:2)]; % flip for the ifft X = real(ifft(x)); R(:,ii) = X; %pause end % nothing more, R is the result ! cps = R(1:CPS_COEFFS,:);