MFCC Class

Mel-Frequency Cepstral Coefficients (MFCCs)

class spiegelib.features.MFCC(num_mfccs=20, frame_size=2048, hop_size=512, scale_axis=0, **kwargs)

Bases: spiegelib.features.features_base.FeaturesBase

Parameters
  • num_mfccs (int, optional) – Number of MFCCs to return, defaults to 20

  • frame_size (int, optional) – Size of FFT to use when calculating MFCCs, defaults to 2048

  • hop_size (int, optiona) – hop length in samples, defaults to 512

  • scale_axis (int, tuple, None) – When applying scaling, determines which dimensions scaling be applied along. Defaults to 0, which scales each MFCC and time series component independently.

  • kwargs – Keyword arguments, see spiegelib.features.features_base.FeaturesBase.

get_features(audio)

Run MFCC extraciton on audio buffer.

Parameters

audio (AudioBuffer) – input audio

Returns

Results of MFCC extraction. Format depends on output type set during construction.

Return type

np.ndarray