CMSIS-DSP  
CMSIS DSP Software Library
 
Loading...
Searching...
No Matches

Functions

void arm_mfcc_f16 (const arm_mfcc_instance_f16 *S, float16_t *pSrc, float16_t *pDst, float16_t *pTmp)
 MFCC F16.
 
arm_status arm_mfcc_init_f16 (arm_mfcc_instance_f16 *S, uint32_t fftLen, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs)
 Generic initialization of the MFCC F16 instance structure.
 
arm_status arm_mfcc_init_32_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs)
 Initialization of the MFCC F16 instance structure for 32 samples MFCC.
 
arm_status arm_mfcc_init_64_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs)
 Initialization of the MFCC F16 instance structure for 64 samples MFCC.
 
arm_status arm_mfcc_init_128_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs)
 Initialization of the MFCC F16 instance structure for 128 samples MFCC.
 
arm_status arm_mfcc_init_256_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs)
 Initialization of the MFCC F16 instance structure for 256 samples MFCC.
 
arm_status arm_mfcc_init_512_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs)
 Initialization of the MFCC F16 instance structure for 512 samples MFCC.
 
arm_status arm_mfcc_init_1024_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs)
 Initialization of the MFCC F16 instance structure for 1024 samples MFCC.
 
arm_status arm_mfcc_init_2048_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs)
 Initialization of the MFCC F16 instance structure for 2048 samples MFCC.
 
arm_status arm_mfcc_init_4096_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs)
 Initialization of the MFCC F16 instance structure for 4096 samples MFCC.
 

Description

Function Documentation

◆ arm_mfcc_f16()

void arm_mfcc_f16 ( const arm_mfcc_instance_f16 S,
float16_t *  pSrc,
float16_t *  pDst,
float16_t *  pTmp 
)

MFCC F16.

Parameters
[in]Spoints to the mfcc instance structure
[in]pSrcpoints to the input samples
[out]pDstpoints to the output MFCC values
[in,out]pTmppoints to a temporary buffer of complex
Description
The number of input samples if the FFT length used when initializing the instance data structure.

The temporary buffer has a 2*fft length size when MFCC is implemented with CFFT. It has length FFT Length + 2 when implemented with RFFT (default implementation).

The source buffer is modified by this function.

◆ arm_mfcc_init_1024_f16()

arm_status arm_mfcc_init_1024_f16 ( arm_mfcc_instance_f16 S,
uint32_t  nbMelFilters,
uint32_t  nbDctOutputs,
const float16_t *  dctCoefs,
const uint32_t *  filterPos,
const uint32_t *  filterLengths,
const float16_t *  filterCoefs,
const float16_t *  windowCoefs 
)

Initialization of the MFCC F16 instance structure for 1024 samples MFCC.

Parameters
[out]Spoints to the mfcc instance structure
[in]nbMelFiltersnumber of Mel filters
[in]nbDctOutputsnumber of Dct outputs
[in]dctCoefspoints to an array of DCT coefficients
[in]filterPospoints of the array of filter positions
[in]filterLengthspoints to the array of filter lengths
[in]filterCoefspoints to the array of filter coefficients
[in]windowCoefspoints to the array of window coefficients
Returns
error status
Description
The matrix of Mel filter coefficients is sparse. Most of the coefficients are zero. To avoid multiplying the spectrogram by those zeros, the filter is applied only to a given position in the spectrogram and on a given number of FFT bins (the filter length). It is the reason for the arrays filterPos and filterLengths.

window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.

The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.

◆ arm_mfcc_init_128_f16()

arm_status arm_mfcc_init_128_f16 ( arm_mfcc_instance_f16 S,
uint32_t  nbMelFilters,
uint32_t  nbDctOutputs,
const float16_t *  dctCoefs,
const uint32_t *  filterPos,
const uint32_t *  filterLengths,
const float16_t *  filterCoefs,
const float16_t *  windowCoefs 
)

Initialization of the MFCC F16 instance structure for 128 samples MFCC.

Parameters
[out]Spoints to the mfcc instance structure
[in]nbMelFiltersnumber of Mel filters
[in]nbDctOutputsnumber of Dct outputs
[in]dctCoefspoints to an array of DCT coefficients
[in]filterPospoints of the array of filter positions
[in]filterLengthspoints to the array of filter lengths
[in]filterCoefspoints to the array of filter coefficients
[in]windowCoefspoints to the array of window coefficients
Returns
error status
Description
The matrix of Mel filter coefficients is sparse. Most of the coefficients are zero. To avoid multiplying the spectrogram by those zeros, the filter is applied only to a given position in the spectrogram and on a given number of FFT bins (the filter length). It is the reason for the arrays filterPos and filterLengths.

window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.

The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.

◆ arm_mfcc_init_2048_f16()

arm_status arm_mfcc_init_2048_f16 ( arm_mfcc_instance_f16 S,
uint32_t  nbMelFilters,
uint32_t  nbDctOutputs,
const float16_t *  dctCoefs,
const uint32_t *  filterPos,
const uint32_t *  filterLengths,
const float16_t *  filterCoefs,
const float16_t *  windowCoefs 
)

Initialization of the MFCC F16 instance structure for 2048 samples MFCC.

Parameters
[out]Spoints to the mfcc instance structure
[in]nbMelFiltersnumber of Mel filters
[in]nbDctOutputsnumber of Dct outputs
[in]dctCoefspoints to an array of DCT coefficients
[in]filterPospoints of the array of filter positions
[in]filterLengthspoints to the array of filter lengths
[in]filterCoefspoints to the array of filter coefficients
[in]windowCoefspoints to the array of window coefficients
Returns
error status
Description
The matrix of Mel filter coefficients is sparse. Most of the coefficients are zero. To avoid multiplying the spectrogram by those zeros, the filter is applied only to a given position in the spectrogram and on a given number of FFT bins (the filter length). It is the reason for the arrays filterPos and filterLengths.

window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.

The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.

◆ arm_mfcc_init_256_f16()

arm_status arm_mfcc_init_256_f16 ( arm_mfcc_instance_f16 S,
uint32_t  nbMelFilters,
uint32_t  nbDctOutputs,
const float16_t *  dctCoefs,
const uint32_t *  filterPos,
const uint32_t *  filterLengths,
const float16_t *  filterCoefs,
const float16_t *  windowCoefs 
)

Initialization of the MFCC F16 instance structure for 256 samples MFCC.

Parameters
[out]Spoints to the mfcc instance structure
[in]nbMelFiltersnumber of Mel filters
[in]nbDctOutputsnumber of Dct outputs
[in]dctCoefspoints to an array of DCT coefficients
[in]filterPospoints of the array of filter positions
[in]filterLengthspoints to the array of filter lengths
[in]filterCoefspoints to the array of filter coefficients
[in]windowCoefspoints to the array of window coefficients
Returns
error status
Description
The matrix of Mel filter coefficients is sparse. Most of the coefficients are zero. To avoid multiplying the spectrogram by those zeros, the filter is applied only to a given position in the spectrogram and on a given number of FFT bins (the filter length). It is the reason for the arrays filterPos and filterLengths.

window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.

The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.

◆ arm_mfcc_init_32_f16()

arm_status arm_mfcc_init_32_f16 ( arm_mfcc_instance_f16 S,
uint32_t  nbMelFilters,
uint32_t  nbDctOutputs,
const float16_t *  dctCoefs,
const uint32_t *  filterPos,
const uint32_t *  filterLengths,
const float16_t *  filterCoefs,
const float16_t *  windowCoefs 
)

Initialization of the MFCC F16 instance structure for 32 samples MFCC.

Parameters
[out]Spoints to the mfcc instance structure
[in]nbMelFiltersnumber of Mel filters
[in]nbDctOutputsnumber of Dct outputs
[in]dctCoefspoints to an array of DCT coefficients
[in]filterPospoints of the array of filter positions
[in]filterLengthspoints to the array of filter lengths
[in]filterCoefspoints to the array of filter coefficients
[in]windowCoefspoints to the array of window coefficients
Returns
error status
Description
The matrix of Mel filter coefficients is sparse. Most of the coefficients are zero. To avoid multiplying the spectrogram by those zeros, the filter is applied only to a given position in the spectrogram and on a given number of FFT bins (the filter length). It is the reason for the arrays filterPos and filterLengths.

window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.

The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.

◆ arm_mfcc_init_4096_f16()

arm_status arm_mfcc_init_4096_f16 ( arm_mfcc_instance_f16 S,
uint32_t  nbMelFilters,
uint32_t  nbDctOutputs,
const float16_t *  dctCoefs,
const uint32_t *  filterPos,
const uint32_t *  filterLengths,
const float16_t *  filterCoefs,
const float16_t *  windowCoefs 
)

Initialization of the MFCC F16 instance structure for 4096 samples MFCC.

Parameters
[out]Spoints to the mfcc instance structure
[in]nbMelFiltersnumber of Mel filters
[in]nbDctOutputsnumber of Dct outputs
[in]dctCoefspoints to an array of DCT coefficients
[in]filterPospoints of the array of filter positions
[in]filterLengthspoints to the array of filter lengths
[in]filterCoefspoints to the array of filter coefficients
[in]windowCoefspoints to the array of window coefficients
Returns
error status
Description
The matrix of Mel filter coefficients is sparse. Most of the coefficients are zero. To avoid multiplying the spectrogram by those zeros, the filter is applied only to a given position in the spectrogram and on a given number of FFT bins (the filter length). It is the reason for the arrays filterPos and filterLengths.

window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.

The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.

◆ arm_mfcc_init_512_f16()

arm_status arm_mfcc_init_512_f16 ( arm_mfcc_instance_f16 S,
uint32_t  nbMelFilters,
uint32_t  nbDctOutputs,
const float16_t *  dctCoefs,
const uint32_t *  filterPos,
const uint32_t *  filterLengths,
const float16_t *  filterCoefs,
const float16_t *  windowCoefs 
)

Initialization of the MFCC F16 instance structure for 512 samples MFCC.

Parameters
[out]Spoints to the mfcc instance structure
[in]nbMelFiltersnumber of Mel filters
[in]nbDctOutputsnumber of Dct outputs
[in]dctCoefspoints to an array of DCT coefficients
[in]filterPospoints of the array of filter positions
[in]filterLengthspoints to the array of filter lengths
[in]filterCoefspoints to the array of filter coefficients
[in]windowCoefspoints to the array of window coefficients
Returns
error status
Description
The matrix of Mel filter coefficients is sparse. Most of the coefficients are zero. To avoid multiplying the spectrogram by those zeros, the filter is applied only to a given position in the spectrogram and on a given number of FFT bins (the filter length). It is the reason for the arrays filterPos and filterLengths.

window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.

The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.

◆ arm_mfcc_init_64_f16()

arm_status arm_mfcc_init_64_f16 ( arm_mfcc_instance_f16 S,
uint32_t  nbMelFilters,
uint32_t  nbDctOutputs,
const float16_t *  dctCoefs,
const uint32_t *  filterPos,
const uint32_t *  filterLengths,
const float16_t *  filterCoefs,
const float16_t *  windowCoefs 
)

Initialization of the MFCC F16 instance structure for 64 samples MFCC.

Parameters
[out]Spoints to the mfcc instance structure
[in]nbMelFiltersnumber of Mel filters
[in]nbDctOutputsnumber of Dct outputs
[in]dctCoefspoints to an array of DCT coefficients
[in]filterPospoints of the array of filter positions
[in]filterLengthspoints to the array of filter lengths
[in]filterCoefspoints to the array of filter coefficients
[in]windowCoefspoints to the array of window coefficients
Returns
error status
Description
The matrix of Mel filter coefficients is sparse. Most of the coefficients are zero. To avoid multiplying the spectrogram by those zeros, the filter is applied only to a given position in the spectrogram and on a given number of FFT bins (the filter length). It is the reason for the arrays filterPos and filterLengths.

window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.

The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.

◆ arm_mfcc_init_f16()

arm_status arm_mfcc_init_f16 ( arm_mfcc_instance_f16 S,
uint32_t  fftLen,
uint32_t  nbMelFilters,
uint32_t  nbDctOutputs,
const float16_t *  dctCoefs,
const uint32_t *  filterPos,
const uint32_t *  filterLengths,
const float16_t *  filterCoefs,
const float16_t *  windowCoefs 
)

Generic initialization of the MFCC F16 instance structure.

Parameters
[out]Spoints to the mfcc instance structure
[in]fftLenfft length
[in]nbMelFiltersnumber of Mel filters
[in]nbDctOutputsnumber of Dct outputs
[in]dctCoefspoints to an array of DCT coefficients
[in]filterPospoints of the array of filter positions
[in]filterLengthspoints to the array of filter lengths
[in]filterCoefspoints to the array of filter coefficients
[in]windowCoefspoints to the array of window coefficients
Returns
error status
Description
The matrix of Mel filter coefficients is sparse. Most of the coefficients are zero. To avoid multiplying the spectrogram by those zeros, the filter is applied only to a given position in the spectrogram and on a given number of FFT bins (the filter length). It is the reason for the arrays filterPos and filterLengths.

window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.

The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.

This function should be used only if you don't know the FFT sizes that you'll need at build time. The use of this function will prevent the linker from removing the FFT tables that are not needed and the library code size will be bigger than needed.
If you use CMSIS-DSP as a static library, and if you know the MFCC sizes that you need at build time, then it is better to use the initialization functions defined for each MFCC size.