Multimedia & Machine Learning Algorithms · Multimedia Algorithms
Audio Signal Processing: FFT and MFCC
Explanation
DFT — Frequency Representation of a Digital Signal
The Discrete Fourier Transform (DFT) maps time-domain samples to their frequency-domain equivalents:
- : DC component — sum of all samples: (the mean is , not itself).
- : DFT magnitude (unnormalized) at frequency (where = sampling rate).
- A signal is a sum of periodic components: DFT finds how much of each frequency is present.
FFT — Efficient Computation
Naive DFT: operations. FFT (Cooley-Tukey) exploits symmetry: .
For : DFT needs ops; FFT only — 32× faster.
Windowing Before FFT
A finite-length signal is implicitly multiplied by a rectangular window — causing frequency spread (spectral leakage). Solution: multiply by a smooth window (Hann, Hamming) before the FFT.
Hann window:
Pre-emphasis — Boosting High Frequencies
Speech signals lose power at high frequencies. A pre-emphasis filter compensates:
This improves SNR at high frequencies and aids subsequent MFCC extraction.
Mel Scale — Modeling Human Perception
The human ear perceives pitch on a logarithmic scale, not a linear one. The Mel scale models this:
Useful property: .
.
MFCC — Mel-Frequency Cepstral Coefficients
MFCCs are the standard features for speech recognition. The pipeline:
1. Pre-emphasis:
2. Framing: split into short overlapping windows (20–40 ms, ~50% overlap)
3. Windowing: multiply each frame by Hann/Hamming window
4. **FFT Power spectrum:**
5. Mel filterbank: apply triangular filters in Mel space
6. Log:
7. DCT:
Coefficients are the standard 13 MFCCs.
The Discrete Fourier Transform (DFT) maps time-domain samples to their frequency-domain equivalents:
- : DC component — sum of all samples: (the mean is , not itself).
- : DFT magnitude (unnormalized) at frequency (where = sampling rate).
- A signal is a sum of periodic components: DFT finds how much of each frequency is present.
FFT — Efficient Computation
Naive DFT: operations. FFT (Cooley-Tukey) exploits symmetry: .
For : DFT needs ops; FFT only — 32× faster.
Windowing Before FFT
A finite-length signal is implicitly multiplied by a rectangular window — causing frequency spread (spectral leakage). Solution: multiply by a smooth window (Hann, Hamming) before the FFT.
Hann window:
Pre-emphasis — Boosting High Frequencies
Speech signals lose power at high frequencies. A pre-emphasis filter compensates:
This improves SNR at high frequencies and aids subsequent MFCC extraction.
Mel Scale — Modeling Human Perception
The human ear perceives pitch on a logarithmic scale, not a linear one. The Mel scale models this:
Useful property: .
.
MFCC — Mel-Frequency Cepstral Coefficients
MFCCs are the standard features for speech recognition. The pipeline:
1. Pre-emphasis:
2. Framing: split into short overlapping windows (20–40 ms, ~50% overlap)
3. Windowing: multiply each frame by Hann/Hamming window
4. **FFT Power spectrum:**
5. Mel filterbank: apply triangular filters in Mel space
6. Log:
7. DCT:
Coefficients are the standard 13 MFCCs.
Interactive Visualization
Loading visualization
Worked Examples
Practice
Exercise 1 of 6
1
Compute for the signal with .
★Quiz
Test your knowledge from this lesson
A mix of questions from the lesson — each attempt varies slightly
Answer at least 4 out of 5 questions correctly to pass (70%)