MFCC means Mel-frequency cepstral coefficients. It’s a powerful feature representation for sound. Although there is a lot of implementations in different programming language for MFCC, they give sheerly different results for the same audio input.

To solve this problem, I got an open-source implementation of C++ for MFCC and built a Python module for it. By using SWIG, this work became less painful.

The function has sample_rate and a one-dimension-array as input, a two-dimensions-array as output. So the header file of C++ looks like:

C++<br>

We also need to use numpy, so the interface file for SWIG is:

SWIG

To use this module, here is an example Python code:

Python

All the code is in my repository.