# From MFCC to Machine learning. What are the steps?

I was able to get a dataset with MFCC coefficients. However, depending on the length of my sound file I get a different sized matrix. As in, 13 (13 MFCC coefficients) by XXX, where XXX will vary depending on the length of the sound file. Does it make sense to 'normalize it' to keep XXX consistent? If so, how? Like in this example, the size of the matrix always varies: https://archive.ics.uci.edu/ml/machine-learning-databases/00195/Test_Arabic_Digit.txt

Also, how will I feed this into a Machine Learning algorithm? (i.e. k-NN, HMM, etc.) I somewhat figured how to do it if it's just one line for each sound file (e.g. 1 by 13 for each sound). What are the steps if it's MFCC? I am a little lost here.

Thank you for your help.

## 1 Answer

There are two general things you can do with a machine learning algorithm: 1. Regression-- take input data and return an output numerical value. This is also known as curve-fitting, parameter estimation, etc. 2. Classification-- take input data and return a decision from a discrete set. In traditional statistical terminology, this is similar to hypothesis testing.

(I'm assuming that you are interested in classification.)

If you are doing supervised learning, you will need some training data, i.e. sets of MFCC coefficients that have been labeled with a priori knowledge. E.g. if you are identifying American English accents, you will need some audio data from New Englanders, Southerners, Midwesterners, etc., from which you extract the MFCC coefficients and label them manually. These coeffcients are known as features and the algorithm that distills down the high-dimensional dataset (i.e. the audio clip) down to a few coefficients (i.e. the MFCC coefficients) is known as feature extraction.

Once you have your training data and labels, you can apply a simple algorithm like KNN quite easily using libraries such as the Python sklearn library.

• Is the labeling done within the matrix? I.e. create a column with a single number where that number belongs to a class that I am defining? Let's say for the data set in the link I provided above, how would I label this set and input it into an algorithm (e.g. sklearn like you've mentioned)? @carlos – Ryan Feb 21 '17 at 0:47
• @Ryan-- I would suggest reading Chapter two of this excellent book: statweb.stanford.edu/~tibs/ElemStatLearn A PDF copy of the book is provided freely by the author at that website. This will explain the concepts and notation in more depth. – Robert L. Feb 21 '17 at 0:52