# Baby Cry recognition robust against the distance [closed]

I am building a baby cry detection system using deep learning algorithm, Raspberry Pi and a microphone as the sound sensor.

When the baby starts crying then the system should detect the cry. It is working good when I placed the mic near to the baby and but when the mic is away I am not able to detect sound.

Please suggest me any techniques to detect sound from max 3-meter range.

• What have you tried so far? What kind of microphone are you using? What do you mean you are not able to detect sound? How does the recorded signal change? – user6522399 Sep 14 '18 at 9:02
• I re-opened the question to post a very vague answer. Closing it again, please try to provide us with more details. – jojek Sep 20 '18 at 11:08

To increase the efficiency of an electret microphone based sound capture system, you can :

• use an electronic microphone pre-amplifier.
• increase microphone directivity by a parabolic focus antenna.
• use multiple microphones and apply adaptive noise cancelling.

This question is very broad and it is not possible to give a very good answer without even knowing the internals of your system (the type of the network and features make a big difference). However, I will try.

The most important question is not to "suggest techniques to detect sound from max 3-meter range", but to understand why it is not working. Have you tried to investigate it? There could be many possible reasons:

• The network is overfitted to the clean/loud data, it was trained on. Hence, when the microphone is placed at a further distance, room reflections take over the direct sound and the signal is more smeared. Try to record the training data at 3m range and add it to the training. Also, in order to prevent overfitting, try to use some regularization and see how it works.
• The network is dependent on the energy of the input signal. I don't really think that this is the case, since in an average room, the difference between SPL at 1 and 3 meters will be something like 5 dB. Anyway, you can try to boost the input signal that was recorded at 3m, feed it to the network and see whether it is working. If it is, then a simple retrain with quieter data, or possibly AGC will help.
• The microphone has a very low gain or possibly is too noisy. Try to listen to the sounds that you've recorded. If the SNR is not very good, then simply go for a different combination of the sound card and a microphone.
• The threshold used to make the decision based on the output of the network is not optimal. Try to calculate a ROC curve and see if it can be adjusted to the more optimal operating point.

There are also different possibilities, but for now try to debug it:

• Listen to the actual recordings made at 1 and 3 meters. Compare their spectra and loudness.
• Retrain the network using more data, recorded at further distances.
• If the amount of your training data is sufficient, try to use some regularization techniques.
• Try to move the microphone at steps from 1m to 3m. Plot the accuracy vs the distance. Listen to the examples, analyse the recordings - that will tell you a lot.

To add to Fat32's suggestions, if your signal is noisy, use a microphone with lower self-noise.

I suggest that you do some requirement calculations first.

Lets assume that a baby cry has a lot of energy at 100Hz

Sound speed in air at 20 degrees C is a about 340m/s.

that gives a wavelength of about 3.4 meters, so your required distance is less than a wave length.

Assuming a baby is in a room , not much bigger, the baby cry probably has some standing wave characteristics. If this is the case there will be places within the room that are louder and quieter that are only loosely related to the distance between the baby and your microphone and if there is a relationship it will be weakly proportional to $1/r$.

I suggest you do some more experimentation along these lines. Make some of the assumptions more concrete, like the the frequency content of a baby cry. 100Hz is probably too low. 1000Hz changes a lot of the first order physics assumptions. Does moving your microphone have a $1/r$ relationship or are there loud and quiet spots in the room.

As some of the other answers suggested some amplification, how much amplification can be tolerated. An extra microphone can give some diversity gain but how far apart and how to process should be considered.

You really should move to knowing your problem better because those will lead to better solutions.