2
$\begingroup$

I wanted to write a code to detect baby cry sound. I am using Windows as platform. Presently, I am able to get audio samples and its frequency plot(using FFT) but not sure how to proceed forward.

I wanted to ask what steps I should follow to detect the baby cry sound given its time-frequency plot.

I saw some methods such as median filter followed by HMM in speech recognition. But for simple sound detection do I need to go for such sophiticated method?

I will be very grateful if you could help me.

$\endgroup$
0
$\begingroup$

This paper might have exactly what you need if you go the supervised learning route, it has a good comparison of logistical regressions versus convoluted nets

http://www.ieee.org.il/wp-content/uploads/2016/11/2016_ICSEE_paper_206.pdf

In this work, two machine-learning algorithms were pro- posed for the detection of baby cry in audio recordings: a logistic regression classifier and a more complex CNN classifier. The results show a considerable advantage of the CNN classifier compared to the logistic regression classifier. As CNNs are naturally suited for large training datasets and for multi-class classification, we plan to train a CNN classifier to detect various types of domestic sounds in addition to cry signals.

$\endgroup$
  • 1
    $\begingroup$ Thank you, appreciate it! , seems this will give good acccuracy. I have left the project though. $\endgroup$ – Bhavin Chowksi Feb 7 '17 at 10:08
  • $\begingroup$ Good luck on your next endeavour! :) $\endgroup$ – J.A.K. Feb 7 '17 at 20:39
0
$\begingroup$

Since you have frequency bucket information, you essentially have a frequency histogram.

If you treat histograms as n dimensional vectors, you can use dot product to get a similarity value that goes from 0 to 1 and could tune that so that sounds that have a value greater than say 0.6 are considered a match.

For more information check this out: http://blog.demofox.org/2015/02/13/writing-a-basic-search-engine-aka-calculating-similarity-of-histograms-with-dot-product/

Alternately you could get a little more advanced and use support vector machines, which require training data of both negatives and positives to find a way to differentiate hits and misses.

$\endgroup$
  • 1
    $\begingroup$ If you want to detect when the baby is crying as opposed to sleeping, I would go with a band-pass filter in the frequency region corresponding to baby cries (near 500-5000Hz I guess) and set a threshold. Basically what Alan is proposing. Speech recognition seems overcomplicated for your use case. SR is required to figure out intelligible words, not featureless cries. $\endgroup$ – user13706 Jul 13 '15 at 18:36
  • $\begingroup$ Thanks for the reply :). I know the frequency region corresponding to baby cries is near 500-5000Hz. But it shows lot of variation for different baby sounds. So how to proceed. Also what do you mean by "set a threshold"? $\endgroup$ – Bhavin Chowksi Jul 14 '15 at 16:09
  • $\begingroup$ By setting a threshold I believe he meant to basically watch for a frequency amplitude to go over a specific value. $\endgroup$ – Alan Wolfe Jul 14 '15 at 16:25
  • $\begingroup$ Have you noticed a specific "shape" of frequency amplitudes (harmonics) for crying versus other baby sounds? If so, the histogram dot product technique can help you distinguish the crying case from the other cases. If you haven't noticed any such pattern, support vector machines can be used to find any such non obvious patterns. $\endgroup$ – Alan Wolfe Jul 14 '15 at 16:27
  • $\begingroup$ Wait! Frequency amplitude should directly be proportional to the sound intensity, right? $\endgroup$ – Bhavin Chowksi Jul 14 '15 at 17:35

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.