https://github.com/armsnyder/open-ears
Instant automated parrot trainer
https://github.com/armsnyder/open-ears
docker machine-learning philips-hue python raspberry-pi signal-processing svm
Last synced: about 2 months ago
JSON representation
Instant automated parrot trainer
- Host: GitHub
- URL: https://github.com/armsnyder/open-ears
- Owner: armsnyder
- Created: 2017-04-12T04:51:28.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T19:55:03.000Z (over 3 years ago)
- Last Synced: 2025-03-14T06:12:04.363Z (over 1 year ago)
- Topics: docker, machine-learning, philips-hue, python, raspberry-pi, signal-processing, svm
- Language: Python
- Homepage:
- Size: 43.9 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Open Ears
[](https://travis-ci.org/armsnyder/open-ears)
## 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:
```bash
$ docker build . -t openears
$ docker run -d --restart always --device /dev/snd -v /home/pi/out:/out openears
```