This module contains the following classes:

  • MFCC, computing Mel-frequency cepstral coefficients (MFCCs).

This file is a modified version of the file by David Huggins-Daines from the CMU Sphinx-III project. You can find the original file in the thirdparty/ directory.

class aeneas.mfcc.MFCC(rconf=None, logger=None)[source]

A class for computing Mel-frequency cepstral coefficients (MFCCs).

CUTOFF = 1e-05

Cut-off threshold

MEL_10 = 2595.0

Base Mel frequency

compute_from_data(data, sample_rate)[source]

Compute MFCCs for the given audio data.

The audio data must be a 1D numpy.ndarray, that is, it must represent a monoaural (single channel) array of float64 values in [-1.0, 1.0].

  • data (numpy.ndarray (1D)) – the audio data
  • sample_rate (int) – the sample rate of the audio data, in samples/s (Hz)

ValueError: if the data is not a 1D numpy.ndarray (i.e., not mono), or if the data is empty


ValueError: if the upper frequency defined in the rconf is larger than the Nyquist frequenct (i.e., half of sample_rate)