What is discrete cosine transform? Why we need it in MFCC?
Private research annotation
Sign in to add a private research label or note.
- User
What is discrete cosine transform? Why we need it in MFCC?
- Assistant
Sign in to add a private research label or note.
What is discrete cosine transform? Why we need it in MFCC?
The Discrete Cosine Transform (DCT) is a technique for converting a signal into elementary frequency components. In simpler terms, it is used to transform a sequence of data points (such as a signal) into a sum of cosine functions oscillating at different frequencies. The DCT, specifically the DCT-II, is widely used in signal and image processing, particularly for lossy compression of audio and visual data because of its strong "energy compaction" property. This means that most of the signal information tends to be concentrated in a few low-frequency components of the DCT, which is useful in compression.
Mel-Frequency Cepstral Coefficients (MFCCs) are features widely used in speech and audio processing. The process of calculating MFCCs involves several steps, one of which incorporates the DCT. Here's a simplified version of the process leading to how and why DCT is used:
Frame the signal into short frames: Audio signals are non-stationary. This means their frequency content changes over time. To deal with this, we frame the signal into short segments where the audio signal's frequency content is assumed to be stationary.
Calculate the periodogram estimate of the power spectrum for each frame: This step converts each frame from time domain to frequency domain, typically using the Fast Fourier Transform (FFT).
Apply the Mel filterbank to the power spectra, sum the energy in each filter: The Mel scale approximates the human ear's response more closely than the linearly-spaced frequency bands. This step converts the frequency information into the Mel scale.
Take the logarithm of all filterbank energies: The human perception of sound intensity is logarithmic, not linear. This step mimics that perception.
Take the DCT of the log filterbank energies: This is where the DCT comes into play. The reasons we need DCT in MFCC calculation are:
De-correlation: The log Mel spectra are typically highly correlated. The DCT helps to de-correlate these signals, which means that the resulting coefficients are more independent of each other. This property is very useful for subsequent processing, such as feature matching and classification, in machine learning algorithms.
Energy compaction: For signal representation, it's efficient to concentrate signal energy into as few coefficients as possible. DCT has the property of energy compaction, especially after applying the Mel filterbank and logarithm, so most of the information tends to be concentrated in the first few DCT coefficients. This allows for a more compact and representative feature set.
Retain a number of the most significant DCT coefficients: Typically, only the first 12-13 coefficients are kept as they contain the majority of the information needed to represent the spectral shape. The higher coefficients, which represent rapid changes in the filterbank energies, are less important for speech recognition and are therefore discarded.
In summary, the DCT is a critical part of the MFCC calculation process because it helps to de-correlate the feature set and concentrate the most important information into a few coefficients, making it an effective and compact representation for speech signals in various applications such as speech recognition, speaker identification, and audio classification.
Not yet included in a published release.