STM32_AI_AudioPreprocessing_Library
Macros | Functions | Variables
mfcc_example.c File Reference

MFCC computation example. More...

#include "feature_extraction.h"
Include dependency graph for mfcc_example.c:

Macros

#define SAMPLE_RATE   16000U /* Input signal sampling rate */
 
#define FFT_LEN   2048U /* Number of FFT points. Must be greater or equal to FRAME_LEN */
 
#define FRAME_LEN   FFT_LEN /* Window length and then padded with zeros to match FFT_LEN */
 
#define HOP_LEN   512U /* Number of overlapping samples between successive frames */
 
#define NUM_MELS   128U /* Number of mel bands */
 
#define NUM_MEL_COEFS   2020U /* Number of mel filter weights. Returned by MelFilterbank_Init */
 
#define NUM_MFCC   20U /* Number of MFCCs to return */
 

Functions

void Preprocessing_Init (void)
 
void AudioPreprocessing_Run (int16_t *pInSignal, float32_t *pOutMfcc, uint32_t signal_len)
 

Variables

arm_rfft_fast_instance_f32 S_Rfft
 
MelFilterTypeDef S_MelFilter
 
DCT_InstanceTypeDef S_DCT
 
SpectrogramTypeDef S_Spectr
 
MelSpectrogramTypeDef S_MelSpectr
 
LogMelSpectrogramTypeDef S_LogMelSpectr
 
MfccTypeDef S_Mfcc
 
float32_t pInFrame [FRAME_LEN]
 
float32_t pOutColBuffer [NUM_MFCC]
 
float32_t pWindowFuncBuffer [FRAME_LEN]
 
float32_t pSpectrScratchBuffer [FFT_LEN]
 
float32_t pDCTCoefsBuffer [NUM_MELS *NUM_MFCC]
 
float32_t pMfccScratchBuffer [NUM_MELS]
 
float32_t pMelFilterCoefs [NUM_MEL_COEFS]
 
uint32_t pMelFilterStartIndices [NUM_MELS]
 
uint32_t pMelFilterStopIndices [NUM_MELS]
 

Detailed Description

MFCC computation example.

Author
MCD Application Team
Attention

Copyright (c) 2023 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.