Hello I am trying to do sound classification in matlab. I have different samples of sounds for 2 seconds. How can I proceed with that. The sounds I am using are churchbell, footsteps, trains, sirens and people talking.



2 Answers 2


A typical approach would be to

  1. Compute representative features from the signals. In this regard, e.g., the Mel Frequency Cepstral Coefficients (MFCCs) have shown to be quite useful for a wide range of applications.
  2. Use supervised learning, i.e. using data for which the class is known, to train a classifier. A first algorithm may be based on Logistic Regression or a Support Vector Machine (SVM).
  3. Use the trained model to classify unknown sounds.

Usually, it is important to analyze the classification performance. In order to do so, it is useful to split the available data into a training and a test data set. Then you can determine one or more measures to evaluate the classification performance.

A number of questions here on DSP.SE deal with this subject. Some examples are

  • $\begingroup$ @downvoter: If you give a hint on why you think this answer is not useful I will update and try to clarify it. $\endgroup$
    – applesoup
    Commented Feb 20, 2018 at 23:20

Your data set determines how to proceed.

If you have many ( thousands ) labeled examples of each class, and a fixed set of classes, a black box convolutional neural net with many layers is a straightforward solution.

At the (an)other extreme, you have only a few examples of each class, and have reason to expect the number of classes will grow in the future, a “this class” and everything else is in the other class approach would make sense, so each class is treated separately. As a hypothetical example, you mentioned church bells, so you can look up articles on the acoustics of church bells and engineer a church bell feature set, specific to that class.

Another extreme, you have a few examples of each class, form a matrix with data, and cross your fingers and perform a singular value decomposition SVD, and it might resolve an orthogonal and compact set of projections.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.