This is an implementation of the standard MFCC algorithm in C using FFTW library.
real_time_mfcc.c demonstrates real time usage of this library.
Clone this repository and follow the instructions below to run it successfully on a Linux machine (tested on Ubuntu 16.04 LTS).
Download the latest stable release of FFTW here.
Open terminal from the folder where the tar.gz file was downloaded into.
tar xvf fftw-3.3.6-pl2.tar.gz
cd fftw-3.3.6-pl2/
./configure --enable-shared --enable-threads && make -j
sudo make install
Depending on your machine you may find the library in /usr/local/lib.
Go to mfcc local repository's root directory.
mkdir ./lib
cp /usr/local/lib/libfftw3.a ./lib/libfftw3.a
Install this to successfully run real_time_mfcc.c.
sudo apt-get install libasound-dev
Download the latest stable release of Portaudio here.
Open terminal from the folder where the tar.gz file was downloaded into.
tar xvfz pa_stable_v190600_20161030.tgz
cd portaudio/
./configure && make -j
sudo make install
Depending on your machine you may find the library in /usr/local/lib.
Go to mfcc local repository's root directory.
cp /usr/local/lib/libportaudio.a ./lib/libportaudio.a
Install this to check the correctness of output of real_time_mfcc.c.
sudo apt-get install python-pip
pip install numpy
pip install scipy
pip install python_speech_features
cd ./src/
gcc -c libmfcc.c -o ../lib/libmfcc.o
cd ../lib/
ar x libportaudio.a
ar x libfftw3.a
ar rcs libmfcc.a *.o
rm *.o
cd ../Example/
gcc real_time_mfcc.c -L../lib/ -lmfcc -lm -lrt -lasound -pthread -o real_time_mfcc
./real_time_mfcc
python mse_check.py