Skip to content

File syn_mfcc.c

FileList > dsp > syn_mfcc.c

Go to the source code of this file

Zero-Heap Fixed-Point Mel-Frequency Cepstral Coefficients (MFCC) Implementation.

  • #include "syn_mfcc.h"
  • #include <string.h>

Public Functions

Type Name
SYN_Status syn_mfcc_init (SYN_MFCC * mfcc, uint16_t sample_rate_hz, uint16_t fft_size)
Initialize MFCC Extractor Context.
SYN_Status syn_mfcc_process_frame (SYN_MFCC * mfcc, const int16_t * pcm_in, q7_t mfcc_out)
Process one window of 16-bit PCM audio samples and compute 13 Q7 MFCC coefficients.

Public Functions Documentation

function syn_mfcc_init

Initialize MFCC Extractor Context.

SYN_Status syn_mfcc_init (
    SYN_MFCC * mfcc,
    uint16_t sample_rate_hz,
    uint16_t fft_size
) 

Parameters:

  • mfcc Pointer to MFCC context.
  • sample_rate_hz Audio sample rate in Hz.
  • fft_size FFT window size (must be 64 or 128).

Returns:

SYN_OK on success, SYN_INVALID_PARAM if invalid.


function syn_mfcc_process_frame

Process one window of 16-bit PCM audio samples and compute 13 Q7 MFCC coefficients.

SYN_Status syn_mfcc_process_frame (
    SYN_MFCC * mfcc,
    const int16_t * pcm_in,
    q7_t mfcc_out
) 

Parameters:

  • mfcc Pointer to MFCC context.
  • pcm_in Array of 16-bit PCM input samples (length = fft_size).
  • mfcc_out Output buffer for 13 Q7 MFCC coefficients.

Returns:

SYN_OK on success, SYN_INVALID_PARAM if NULL.



The documentation for this class was generated from the following file src/syntropic/dsp/syn_mfcc.c