diff dsp/cepstrum.m @ 32:c3b0cd708782

Imported core dsp tools.
author samer
date Sun, 20 Jan 2013 13:48:47 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dsp/cepstrum.m	Sun Jan 20 13:48:47 2013 +0000
@@ -0,0 +1,13 @@
+% cepstrum - generalised  cepstral coefficients from warped power spectrogram
+%
+% cepstrum ::
+%    [[M]->[K]] ~'which coefficients to compute',
+%    [[K]]      ~'edges for (K-2)-band filterbank',
+%    [[N]]      ~'centre frequencies of spectrum bins',
+%    [[N,T]]    ~'input spectra',
+% -> [[M,T]]    ~'MFCCs for L time slices'.
+function y = cepstrum(MX,edges,fx,x)
+	melW = tri_filterbank(edges,fx);
+	dctW = dct(eye(size(melW,1)));
+	y = dctW(MX,:)*log(melW*x);
+end