It is not at all trivial to recognize a particular sound from its FFT spectrum. But it may be possible that particular frequencies will show up in a baby's cry and not in other sounds.
A baby's cry has a frequency of 3500kHz on average. Is it possible to get the spectrum of that frequency and compare it to the samples?
For what purpose?
I'm working on a surveillance system for baby. It includes a PIR sensor, a sound sensor and a GSM module. The purpose is to detect if the baby stopped breathing or started crying and send an alert SMS to the parents.
I'm only having a problem with the sound sensor part.
It sounds like you're relatively new to audio analysis, to programming, and to this hardware. You've selected a very challenging early project. If you have a high tolerance for frustration and disappointment, then by all means, proceed. If not, you might be better advised to start with easier projects with hope of quicker success, and less rigorous theoretical demands.
Yes I am new to audio analysis and Arduino, I can manage myself in programming.
It's a school project and I need to make it work for the sake of my grades xD
I have a teacher supervising me but he's an expert on STM boards he only can help me with the algorithm and a bit in the coding but I have to figure it out on my own first.
Isn't there an alternative way to get what I want then?
I assume that you're using an Uno.
Yes I am, I already mentioned it in my first post.
You'll need to characterize the sound you want to identify. I don't really know how you're going to get sample data from a baby crying. Maybe just run a recorder until you get what you want, or maybe introduce a recorder during the inevitable moments when somebody else unsuccessfully tries to quiet the baby. For heaven's sake, don't make it cry just to get audio samples.
I assure you no babies will be harmed during the process xD
Do I have to get a sample data from a baby crying? Wouldn't it be a "particular baby" cry?
You'll also need to characterize the ambient sound in the environment where you'll use it.
We'll just consider that the baby is in a silent room sleeping peacefully until he wakes up and starts crying.
Thanks for your help.