Git Product home page Git Product logo

baby_cry_rpi's Introduction

Baby cry detection - Deployment on Raspberry Pi

Recognition of baby cry from audio signal.

The aim is to automatically recognize a baby crying while sleeping. In such case, a lullaby is started to calm the baby down.

This is done by implementing a machine learning algorithm on a Raspberry Pi.

Hardware setup

  • Raspberry Pi 2B
  • Usb microphone
  • Speakers connected via Jack 3.5 mm

Software setup

This repo should be cloned on the Rapsberry Pi in /opt/.

To make it work:

  • Install docker on your Raspberry Pi
  • Get the Docker image docker pull mikkl/rpi2-babycry:squashed
  • Put model.pkl generated by baby_cry_detection in folder model
  • Put the egg file baby_cry_detection-1.1-py2.7.egg generated by baby_cry_detection in folder lib
  • Execute script/run.sh from /opt/baby_cry_rpi

baby_cry_rpi's People

Contributors

giulbia avatar

Stargazers

Sebastian Rolando avatar Kyle McLaren avatar  avatar Jarrod Bourlon avatar William Renaldy avatar E. Tolga Ayan avatar  avatar wanlong_peng avatar Gilad Zamoscinski avatar  avatar Jaco Engelbrecht avatar  avatar Daniel Sabec avatar Jesal Gadhia avatar Kinson avatar Richard M Wan avatar Jiancong Gao avatar Joe avatar

Watchers

James Cloos avatar Richard M Wan avatar  avatar  avatar

baby_cry_rpi's Issues

Can't running in the raspberry pi zero w

Hello giulbia,
I like your app very much, so I try to run on my raspberry pi board.I cloned the repo to the folder as required,put the .egg to lib,and put the model.pkl in model.But when I run,I'm prompted that there are no librosa modoules.So I try to install the librosa module,and then there are other missing modules,even if I have finished installing,the program will run a segment error.
So my question :
1:Whether app can run on raspberry pi?
2:raspberry pi zero w can't run on app?
3:raspberry pi zero w missing corresponding supported modules?

Thanks,
jason

Docker file for mikkl/rpi2-babycry?

I have no idea what I'm doing, but I'm trying to create a docker image for python3 that can run all this stuff. Is there any chance that you can share the Docker file for mikkl/rpi2-babycry? I'm hoping it will give me some hints as to how to do this.

Thanks!

Can't import module baby_cry_detection.rpi_methods

Hi,

I try to run this project on my RPi 3B+. I installed all necessary libraries but a meet the following error:

File "/opt/baby_cry_rpi/script/make_prediction.py", line 12, in <module>
    from baby_cry_detection.rpi_methods import Reader
ImportError: No module named baby_cry_detection.rpi_methods

How can I fix it ?

Best regards,
Phuong Duong.

Prediction not predicting the baby cry

Hi Giulbia,

Thanks for your work on baby cry prediction. I wanted to try it...I actually setup and generated egg & pkl files in PC, and docker is up on my rpi3 and mic and speaker are setup and tested with aplay & arecord...then i tried to run the "run.sh" played some baby cry audios....but it not able to predict below is the log...

root@raspberrypi:/opt/baby_cry_rpi/script# script/run.sh
bash: script/run.sh: No such file or directory
root@raspberrypi:/opt/baby_cry_rpi/script# cd ..
root@raspberrypi:/opt/baby_cry_rpi# script/run.sh
Welcome to Parenting 2.1
Start Recording...
Recording WAVE '/opt/baby_cry_rpi/recording/signal_9s.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
Predicting...
What is the prediction? /usr/local/lib/python2.7/dist-packages/librosa/init.py:40: DeprecationWarning: You are using librosa with Python 2. Please note that librosa 0.7 will be the last version to support Python 2, after which it will require Python 3 or later.
DeprecationWarning)
Prediction is 0
State of the Process PREDICTION = 0, PLAYING=0, # TIMES MY BABY CRIED=0
Start Recording...
Recording WAVE '/opt/baby_cry_rpi/recording/signal_9s.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
Predicting...
What is the prediction? /usr/local/lib/python2.7/dist-packages/librosa/init.py:40: DeprecationWarning: You are using librosa with Python 2. Please note that librosa 0.7 will be the last version to support Python 2, after which it will require Python 3 or later.
DeprecationWarning)

any help will be appreciated.

thanks in advance :)

Rgds,
~~DG

can not execute script/run.sh

Hello giulbia,
Can I run the program only by getting the Docker image docker pull mikkl/rpi2-babycry:squashed?
I cloned the repo to the folder as required,put the .egg to lib,and put the model.pkl in model.but I ran into this problem

pi@raspberrypi:/opt/baby_cry_rpi/script $ ./run.sh
docker: unknown server OS: .
See 'docker run --help'.

docker image pull

Error response from daemon: manifest for mikkl/rpi-raspbian-baby-cry-detection:p
i3 not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.