dcase_util.features.SpectralFeatureExtractor

class dcase_util.features.SpectralFeatureExtractor(spectrogram_type='magnitude', n_fft=2048, window_type='hamming_asymmetric', **kwargs)[source]

Spectral feature extractor base class

Constructor

Parameters
fsint

Sampling rate of the incoming signal.

win_length_samplesint

Window length in samples.

hop_length_samplesint

Hop length in samples.

win_length_secondsfloat

Window length in seconds.

hop_length_secondsfloat

Hop length in seconds.

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’

__init__(spectrogram_type='magnitude', n_fft=2048, window_type='hamming_asymmetric', **kwargs)[source]

Constructor

Parameters
fsint

Sampling rate of the incoming signal.

win_length_samplesint

Window length in samples.

hop_length_samplesint

Hop length in samples.

win_length_secondsfloat

Window length in seconds.

hop_length_secondsfloat

Hop length in seconds.

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’

Methods

__init__([spectrogram_type, n_fft, window_type])

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