dcase_util.features.MfccDeltaExtractor

class dcase_util.features.MfccDeltaExtractor(fs=44100, win_length_samples=None, hop_length_samples=None, win_length_seconds=0.04, hop_length_seconds=0.02, spectrogram_type='magnitude', n_fft=2048, window_type='hamming_asymmetric', n_mels=40, fmin=0, fmax=None, normalize_mel_bands=False, htk=False, n_mfcc=20, omit_zeroth=False, width=9, **kwargs)[source]

Feature extractor class to extract MFCC delta features

Constructor

Parameters
fsint

Sampling rate of the incoming signal. Default value 44100

win_length_samplesint

Window length in samples. Default value None

hop_length_samplesint

Hop length in samples. Default value None

win_length_secondsfloat

Window length in seconds. Default value 0.04

hop_length_secondsfloat

Hop length in seconds. Default value 0.02

spectrogram_typestr

Spectrogram type, magnitude or power spectrogram. Default value ‘magnitude’

n_fftint

Length of the FFT window. Default value 2048

window_typestr

Window function type. Default value ‘hamming_asymmetric’

n_melsint

Number of mel bands to generate. Default value 40

fminint

Lowest frequency in mel bands (in Hz). Default value 0

fmaxint

Highest frequency in mel bands (in Hz), if None, fmax = fs/2.0. Default value None

normalize_mel_bandsbool

Normalize mel band to have peak at 1.0. Default value False

htkbool

Use HTK formula for mel band creation instead of Slaney. Default value False

n_mfccint

Number of MFCC coefficients. Default value 20

omit_zerothbool

Omit 0th coefficient. Default value False

widthint

Width of the delta window. Default value 9

__init__(fs=44100, win_length_samples=None, hop_length_samples=None, win_length_seconds=0.04, hop_length_seconds=0.02, spectrogram_type='magnitude', n_fft=2048, window_type='hamming_asymmetric', n_mels=40, fmin=0, fmax=None, normalize_mel_bands=False, htk=False, n_mfcc=20, omit_zeroth=False, width=9, **kwargs)[source]

Constructor

Parameters
fsint

Sampling rate of the incoming signal. Default value 44100

win_length_samplesint

Window length in samples. Default value None

hop_length_samplesint

Hop length in samples. Default value None

win_length_secondsfloat

Window length in seconds. Default value 0.04

hop_length_secondsfloat

Hop length in seconds. Default value 0.02

spectrogram_typestr

Spectrogram type, magnitude or power spectrogram. Default value ‘magnitude’

n_fftint

Length of the FFT window. Default value 2048

window_typestr

Window function type. Default value ‘hamming_asymmetric’

n_melsint

Number of mel bands to generate. Default value 40

fminint

Lowest frequency in mel bands (in Hz). Default value 0

fmaxint

Highest frequency in mel bands (in Hz), if None, fmax = fs/2.0. Default value None

normalize_mel_bandsbool

Normalize mel band to have peak at 1.0. Default value False

htkbool

Use HTK formula for mel band creation instead of Slaney. Default value False

n_mfccint

Number of MFCC coefficients. Default value 20

omit_zerothbool

Omit 0th coefficient. Default value False

widthint

Width of the delta window. Default value 9

Methods

__init__([fs, win_length_samples, ...])

Constructor

extract(y)

Extract features for the audio signal.

get_spectrogram(y[, n_fft, ...])

Spectrogram

get_window_function(n[, window_type])

Window function

log([level])

Log container content

show([mode, indent, visualize])

Print container content

to_html([indent])

Get container information in a HTML formatted string

to_string([ui, indent])

Get container information in a string

Attributes

description

Extractor description

label

Extractor label

logger

Logger instance