Skip to content

Log-mel / MFCC feature front end in analysis #340

Description

@gabrielfrasantos

Motivation

Keyword-spotting and spectrogram models on MCUs (DS-CNN, the "Hello Edge" class of models) need a log-mel or MFCC front end. The analysis module already has the parts: real FFT, DCT and windowing. It has no mel filterbank or MFCC stage. This is neural-network-toobox-cpp roadmap item N15, which feeds N18/N19 (2D and depthwise-separable convolution).

Proposed scope

  • Windowed real FFT → power spectrum → triangular mel filterbank (HTK or Slaney scale, with NumMelBands, fMin and fMax as parameters) → log (with ε floor) → DCT-II (first NumCoefficients).
  • Compile-time sizes, float-only, no heap, filterbank weights precomputable (constexpr where feasible).
  • Tests: the mel/Hz conversion round-trip, filterbank partition of unity (Slaney normalisation), and one frame checked against a librosa/python_speech_features reference with the same parameters.

References

S. Davis, P. Mermelstein, IEEE Trans. ASSP 28(4), 1980.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions