aubio / aubio

a library for audio and music analysis
https://aubio.org
GNU General Public License v3.0
3.26k stars 376 forks source link

MFCC coefficients #263

Open Galvo87 opened 4 years ago

Galvo87 commented 4 years ago

Hi! I tried to search in the docs, but found nothing useful... Is there a way to name the various mel coefficients that aubiomfcc returns?

Thanks

piem commented 4 years ago

hi @Galvo87

I'm not sure what exactly you are trying to do.

If you are using the command line tool aubiomfcc, you should be able to store the output then assign a name to each column. You can even filter out unwanted coefficients. Here the output of aubiomfcc is filtered to keep only coefficients 0, 2, 3, and 4 (the first cut remove the time column):

aubiomfcc drum.wav | cut -f 2 | cut -f 1,3-5 -d \ 

If you are using python-audio, you will find a demo in python/demos/demo_mfcc.py to extract (and plot) mfcc coefficients from a source. It should be fairly straightforward to convert mfccs from a numpy array to a dictionnary where each coefficient column is named.

Let us know if this answers your questions.

cheers, piem