Coder Social home page Coder Social logo

open-ears's Introduction

Open Ears

Build Status

The Problem

I have a parrot named Greg who has recently started making a very specific, very load, high-pitched beep. When I am close enough to her cage, the sound is loud enough to cause real ear damage.

The Solution

Open Ears is a Dockerized Python script which runs on a Raspberry Pi with a microphone. It constantly monitors the sound near Greg's cage for the very specific beep that is a problem. When it detects the beep, it triggers a mild negative stimulus: it flashes a ceiling lamp near the cage.

Disclaimer: Parrot training works best with rewarding positive behavior and ignoring negative behavior. Open Ears is meant to supplement these methods and is very experimental.

Details

Open Ears runs several processes using the multiprocessing module. The processes that monitor the microphone input stream are layered in complexity such that the cheap processes like calculating the volume are run before the more expensive processes like fourier transforms.

Deployment

Open Ears can be built and deployed as a Docker image. The reason for using Docker is to separate the hairy system-level audio libraries from the base Raspberry Pi filesystem.

Since it is intended to be deployed to the ARM-based Raspberry Pi, but built on x86-based machines, the Docker image is built on top of the resin/armv7hf-debian-qemu image.

Continuous deployment is enabled on this repository, so pushes to master trigger automated build and deployment directly to the Raspberry Pi under Greg's cage.

Note that in order for microphones to be available inside the Docker container they must be bound.

Example:

$ docker build . -t openears
$ docker run -d --restart always --device /dev/snd -v /home/pi/out:/out openears

open-ears's People

Contributors

armsnyder avatar trellixvulnteam avatar

Stargazers

Longshan Du avatar

Watchers

James Cloos avatar Corey Grief avatar  avatar

Forkers

trellixvulnteam

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.