I am doing a personal project which aims to detect infant cry. I have an infant cry audio database and extracted the MFCC from these files using MATLAB. I've come up with 12 coefficients for each frame the audio was divided into. My goal is to compare audio obtained from a microphone with the training data (MFCC from the samples). I figured I would split the audio input data into frames and then compare each frame with the training data using a k-NN classifier. My question is how to, in fact, train the k-NN classifier, since I have many samples to compare with. I mean, what should I compare the frames from the input data to?


  • $\begingroup$ OK let us think we have trained our network let it be RNN or Bpnn or any ANN then how to test an input,I mean we split the input signal in to frames or we extract MFCC coefficients and feed into ANN then it does the same method as in training but there is no back propagation i.e it uses the updated weights we got in training phase and will it find output in according to that ??what takes in testing phase an anyone help me??thanks in advance $\endgroup$ – user25398 Dec 13 '16 at 5:44
  • $\begingroup$ @user25398 Once you've trained your network using the coefficients and obtained the weights and biases, you should these parameters for classification. You'll use the coefficients as inputs and, if the network was trained correctly, it will find the output accordingly. $\endgroup$ – gustavsl Dec 14 '16 at 13:42

Your problem here is not a discriminative problem in which you have two (or more) classes you want to recognize. If it had been the case - for example discriminate infant cry with recording of bird songs, you would have compared each MFCC vector from the incoming audio stream to a massive set of frames either labelled as "bird song" or "infant cry" depending on the recording from which they came from. Note that the datasets would have been absolutely massive if your training sets had more than seconds of audio.

Your problem consists in measuring how similar your data is to a given category; or how well it fits a model trained on the example data - it is a "one-class" problem. In a Bayesian framework, this is equivalent to evaluating the probability of the "infant cry" hypothesis given the MFCC frame as evidence. I recommend you to frame your problem in Bayesian terms because it is likely that for your application, there are probably different costs involved in a false alarms or in missing the detection of a cry; so you'd like to work with a method which can balance them. Working in a probabilistic frameworks implies that you'll need to pick a model for the distribution of MFCC vectors on your training data. The simplest, but most computationally expensive approach is to use Kernel density estimation - this is like a one-class, statistical cousin of k-NN (equally computationally intensive); but a more sensible approach given the amount of data would be gaussian mixture models.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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