mag2mfcc

ketos.audio.utils.misc.mag2mfcc(img, num_fft, rate, num_filters, num_ceps, cep_lifter)[source]

Convert a Magnitude spectrogram to a Mel-frequency cepstrum.

TODO: Check that the formulas used to compute the MFCCs are correct and consistent with those used in librosa: https://librosa.org/doc/main/generated/librosa.feature.mfcc.html#

Args:
img: numpy.array

Magnitude spectrogram image, linear axis

num_fft: int

Number of points used for the FFT.

rate: float

Sampling rate in Hz.

num_filters: int

The number of filters in the filter bank.

num_ceps: int

The number of Mel-frequency cepstrums.

cep_lifters: int

The number of cepstum filters.

Returns:
mfcc: numpy.array

Mel frequency cepstral coefficients