![]() On my RaspberryPi I get the following output (note that I have two USB microphones): **** List of CAPTURE Hardware Devices **** card 1: Device, device 0: USB Audio Subdevices: 0/1 Subdevice #0: subdevice #0 card 2: Device_1, device 0: USB Audio Subdevices: 0/1 Subdevice #0: subdevice #0 an alarm or your neighbour’s drilling) and loud enough over the background noise.įirst, take a look at the recognized audio input devices: arecord -l Note: in this example I’ll show how to use sound detection to recognize a baby’s cries, but the same exact procedure can be used to detect any type of sounds - as long as they’re long enough (e.g. ![]() Then install the dependencies that we’ll need: apt-get install ffmpeg lame libatlas-base-dev alsa-utils pip3 install tensorflowĪs a first step, we’ll have to record enough audio samples where the baby cries and where the baby doesn’t cry that we’ll use later to train the audio detection model. Also get a compatible USB microphone - anything will work, really. Recording some audio samplesįirst of all, get a RaspberryPi and flash any compatible Linux OS on an SD card - it’s better to use any RaspberryPi 3 or higher to run the Tensorflow model. Let’s see how to use our favourite open-source tools to get this job done. It should also come with a camera, so I can either check in real-time how my baby is doing or I can get a picture or a short video feed of the crib when he starts crying to check that everything is alright.It should work no matter the distance between the source and the speaker, with no need to move the speaker around the house.It should be able to stream the audio on any device - my own speakers, my smartphone, my computer etc.It shouldn’t only act as a dumb intercom that delivers sound from a source to one single type of compatible device. It should detect my baby’s cries and notify me (ideally on my phone) when he starts/stops crying, or track the data points on my dashboard, or do any kind of tasks that I’d want to run when my son is crying.It should run on anything as simple and cheap as a RaspberryPi with a cheap USB microphone.So I’ve come with a specification for a smart baby monitor. And most of them work on low-power radio waves, which means that they usually won’t work if the baby is in his/her room and you have to take a short walk down to the basement. ![]() ![]() They usually come with low-power speakers, and they usually can’t be connected to external speakers - it means that if I’m in another room playing music I may miss my baby’s cries, even if the monitor is in the same room as mine. It’s up to the parent to move the speaker as they move to different rooms, as they can’t play the sound on any other existing audio infrastructure. They don’t detect your baby’s cries - they simply act like intercoms that take sound from a source to a speaker. But I’ve soon realized that commercial baby monitors are dumber than the ideal device I’d want. Commercial baby monitors usually step in to fill that gap and they act as intercoms that let you hear your baby’s sounds even if you’re in another room. One of the first things I’ve come to realize as a father is that infants can really cry a lot, and even if I’m at home I may not always be nearby enough to hear my son’s cries. Or, can they? While we’re probably still a few years away from a robot that can completely take charge of the task of changing your son’s diapers (assuming that enough crazy parents agree to test such a device on their own toddlers), there are some less risky parental duties out there that offer some margin for automation. That’s because I’ve become a dad in the meantime, and I’ve had to take a momentary break from my projects to deal with some parental tasks that can’t (yet) be automated. Some of you may have noticed that it’s been a while since my last article. An updated version of this story is available on the Platypush blog.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |