Skip to content

nexuml_library.layers.feature.lmbe

nexuml_library.layers.feature.lmbe

Log Mel Band Energy (LMBE) feature extractor layer.

LMBE

Bases: LayerDefinition

Compute Log Mel Band Energies from a raw waveform.

Uses torchaudio's MelSpectrogram + AmplitudeToDB pipeline. Optionally falls back to librosa for compatibility.

Attributes:

Name Type Description
n_mels int

Number of Mel filterbanks.

n_fft int

FFT size.

hop_length int

Number of samples between frames.

win_length int | None

Window length in samples.

power int

Spectrogram power (1=magnitude, 2=power).

fmin int

Minimum frequency.

fmax int

Maximum frequency.

sr int

Sample rate.

mel_scale str

Mel scale type ("slaney" or "htk").

pad_mode str

Padding mode for STFT.

use_librosa bool

Use librosa backend instead of torchaudio.