Caution
You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.10.2.
librosa.feature.inverse.mfcc_to_mel
- librosa.feature.inverse.mfcc_to_mel(mfcc, *, n_mels=128, dct_type=2, norm='ortho', ref=1.0, lifter=0)[source]
Invert Mel-frequency cepstral coefficients to approximate a Mel power spectrogram.
This inversion proceeds in two steps:
The inverse DCT is applied to the MFCCs
librosa.db_to_power
is applied to map the dB-scaled result to a power spectrogram
- Parameters:
- mfccnp.ndarray [shape=(…, n_mfcc, n)]
The Mel-frequency cepstral coefficients
- n_melsint > 0
The number of Mel frequencies
- dct_type{1, 2, 3}
Discrete cosine transform (DCT) type By default, DCT type-2 is used.
- normNone or ‘ortho’
If
dct_type
is 2 or 3, settingnorm='ortho'
uses an orthonormal DCT basis. Normalization is not supported for dct_type=1.- reffloat
Reference power for (inverse) decibel calculation
- lifternumber >= 0
- If
lifter>0
, apply inverse liftering (inverse cepstral filtering):: M[n, :] <- M[n, :] / (1 + sin(pi * (n + 1) / lifter) * lifter / 2)
- If
- Returns:
- Mnp.ndarray [shape=(…, n_mels, n)]
An approximate Mel power spectrum recovered from
mfcc
- Warns:
- UserWarning
due to critical values in lifter array that invokes underflow.