Skip to main content

Module mel

Module mel 

Source
Available on crate feature mel only.
Expand description

Mel filterbank, (log-)mel spectrograms and MFCCs.

This module is pure math and builds without std. It operates on power spectra (|S|²), which you obtain from a Spectrogram column via spectrum::power.

Conventions follow librosa’s defaults: the Slaney mel scale with area-normalized triangular filters, and an orthonormal DCT-II for MFCCs.

Structs§

DctII
An orthonormal type-II DCT, precomputed as a basis matrix.
MelFilterBank
A bank of triangular mel filters mapping n_freqs linear bins to n_mels mel bands.

Enums§

MelScale
The mel frequency scale convention.

Functions§

hz_to_mel
Convert a frequency in Hz to mels.
mel_to_hz
Convert mels to a frequency in Hz.