I've started to implement an MFCC algorithm on an embedded DSP, using the CMSIS DSP library. However the results I'm getting don't appear consistent. This is my algorithm so far:
- Gather 32ms PCM sample from microphone, 512 samples long. 16000hz
- Apply a Hamming window.
- Compute the 512 FFT using this.
- Compute the magnitudes to get power spectrum.
- Generate a set of 30 filter banks - using 32 points on the mel spectrum
- Convert my power spectrum magnitudes from 16bit ints to floats.
- Get the dot product for each filter with the power spectrum.
- Log each dot product.
- This is the uncertain part. The DSP library I'm using only has DCT IV, and this only supports sizes 128 and up. My set of logs is 32. So I've opted to use a Real FFT function, the results I get from this vary quite a lot. If I speak the same word in the same tone.
Could this be what is hampering my result? Real FFT provides an output of both real, complex and conjugate data (described in link above) - which would I use for the MFCC? - Should I even expect my MFCCs to be similar or is it expected to vary a lot? My results tend to vary between -20.0 and 20.0.
Thanks in advance.