0
$\begingroup$

I need some verification on steps required to extract MFCCs from raw audio as I'm finding that some sources outline them slightly differently.

  1. Get raw audio frame
  2. Run window function (eg Blackman) on raw audio data by multiplying each datapoint with the window
  3. Perform FFT on windowed audio frame.
  4. Calculate magnitudes by powering and summing real and imaginary parts of first half of FFT real^2 + imaginary^2
  5. Convert magnitudes to dBv using 10 * Math.log10(magnitude)
  6. Construct Mel Filter Bank consisting of eg 26 triangular filters spaced out across entire spectrum
  7. Multiply dBv data with Mel Filter Bank to get 26 coefficients
  8. Run log10 on each of the 26 coefficients
  9. Perform DCT/FFT or ?iFFT? on 26 coefficients
  10. Result produced is 26 MFCCs?

Regarding point 7: I'm not certain of input for multiplying with Mel Filter Bank. Should it be dBv, magnitudes, magnitudes converted to Mel scale or something else?

Point 9: I found some sources saying that said 26 coefficients should then be used as an input for DCT/FFTs as though they would be a signal. Other sources say the should be used for an inverse FFT as the result is mean to be a cepstrum. Can someone clarify?

Can someone verify this process and point out any mistakes?

I find it difficult to find solid points of reference covering these techniques and providing reasoning behind them. I was wondering if there's a book covering all of the above with technical examples, starting with theory and explanation of DSP concepts along with MFCCs and related speech analysis techniques. Most books I'm seeing focus mainly on Mixed Markov Models and don't seem cover cepstrums and MFCCs at all (at least by looking at their tables of contents).

$\endgroup$
  • $\begingroup$ Re 5. No need to do that. Re 7. Use DCT type II. Re 8. Usually take less coefficients, 13 etc. Also there is no dBV as far as you are concerned these are decibels only. On the other hand there are many good tutorials on this topic on DSP SE. $\endgroup$ – jojek Oct 21 '16 at 16:49
  • $\begingroup$ I also want to know the answer, Do you find the reason or some conference for its detail? Mostly, I always saw those steps: 1,2,3,4,6,7,8,9,10 without step 5, and not dBv data multiplied with Mel Filter Bank. But what dB means some logarithmic algorithm right? So why we don't need step 5 but need 7? How about 1,2,3,4,5,6,8,9,10 without 7? $\endgroup$ – zlin Apr 2 at 13:33
0
$\begingroup$

Point 7: Multiply and add the FFT with the MelFilter Banks. Therefore, if you are using 26 Filter banks , we will end up getting 26 dimensional vector at the end. Point 9: Take the DCT of the 26 dimensional vector. Point 10: Keep the first 12 coefficients and discard the rest.

I understood MFCC features by reading this link: http://practicalcryptography.com/miscellaneous/machine-learning/guide-mel-frequency-cepstral-coefficients-mfccs/

It is very simple to understand from the link above.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.