annotate dsp/mfcc.m @ 47:82075c94eed1
adding a bunch of stuff, including graphics and pitch toolboxes.
author |
samer |
date |
Sat, 17 Jan 2015 15:20:35 +0000 |
parents |
c3b0cd708782 |
children |
|
rev |
line source |
samer@32
|
1 % mfcc - Mel-frequency ceptral coefficients
|
samer@32
|
2 %
|
samer@32
|
3 % mfcc ::
|
samer@32
|
4 % [[M]->[40]] ~'which of 40 available coeffs to return',
|
samer@32
|
5 % N:natural ~'analysis window size',
|
samer@32
|
6 % [[T]] ~'input signal',
|
samer@32
|
7 % nonneg ~'sampling rate'
|
samer@32
|
8 % -> [[M,L]] ~'MFCCs for L time slices'.
|
samer@32
|
9 function y=mfcc(MX,N,x,fs)
|
samer@32
|
10 [pow,fx]=powspec(spdiag(hamming(N,'periodic'))*buffer(x,N,floor(N/2)),2^nextpow2(N+1));
|
samer@32
|
11 y=cepstrum(MX,melspace(400/3,min(7000,fs/2),42),fs*fx,pow);
|
samer@32
|
12 end
|