← Back to the chapter · Previous detail · Next detail →
Technical detail · Audio Feature Extraction for IoT
From log-mel energies to MFCCs
Apply the discrete cosine transform to decorrelate the log-filter energies:
Retaining the lower-order coefficients gives the compact MFCC record; higher orders mostly describe finer variations across the filter-bank envelope. Record whether coefficient zero is kept, whether liftering is applied, and whether per-channel or dataset normalization follows. A model trained with 40 filters, one normalization rule, and 13 retained coefficients cannot safely consume features produced by an undocumented “equivalent” pipeline.
The mel scale is usually described as “perceptual”, which is true and unhelpful when you are choosing a filter count. Figure 6 runs one frame through all three steps so the warping shows up as geometry rather than as an adjective.
Panel one of Figure 6 is the frame as the FFT leaves it: 201 one-sided bins at Hz spacing, with most of the energy in the low resonances and very little above 6 kHz. Panel two explains why that distribution is about to be treated unevenly — 1,000 Hz ≈ 1,000 mel but 8,000 Hz ≈ 2,835 mel, so the upper half of this 0–8 kHz range is compressed into roughly a third of the mel axis. Panel three shows what that does to the filters: the labelled centre frequencies bunch together below 1 kHz and stretch apart above 4 kHz, and the bars beneath convert those triangles into ten band energies on an evenly spaced index. That last move is the one worth naming in a review, because from the model’s side the uneven hertz axis is gone: it sees band 1 through band 10, and any narrow tone that fell inside a wide upper triangle has already been merged with its neighbours.