I want to write an speaker recognition application (based on some password recorded few times for the authorized person).
I've decided to do it with C++ and BASS library (http://www.un4seen.com/).
I managed to get the FFT data (calculated for each update()
with the active microphone stream):
float fft[1024];
BASS_ChannelGetData(chan, fft, BASS_DATA_FFT2048); // get the FFT data
I send the data to the buffer so I can draw it in real-time:
// "normal" FFT
memset(specbuf, 0, SPECWIDTH*SPECHEIGHT);
for (x = 0; x<SPECWIDTH / 2; x++) {
y = sqrt(fft[x + 1]) * 3 * SPECHEIGHT - 4; // sqrt makes low values more visible
//y = fft[x + 1] * 10 * SPECHEIGHT; // linear scale (alternative)
if (y>SPECHEIGHT) y = SPECHEIGHT; // cap it
if (x && (y1 = (y + y1) / 2)) // interpolate from previous to make the display smoother
while (--y1 >= 0) specbuf[y1*SPECWIDTH + x * 2 - 1] = y1 + 1;
y1 = y;
while (--y >= 0) specbuf[y*SPECWIDTH + x * 2] = y + 1; // draw level
}
The problem is, how to calculate the MFCC from it? I'm a very begging in the field of signal processing, please take it into account.