Wednesday, August 19, 2015

Twitter for dogs

Henry Conklin’s dog, Oliver, is one of those very vocal dogs who likes to try to let you know what he’s thinking. By barking. A lot. Henry says:

I decided that his thoughts and comments needed to be shared with the world. Thus the @OliverBarkBark project was born. By connecting a Rasberry Pi, a wifi dongle, and a microphone, I was able to make a system that automatically detected, filtered, and published each and every one of Oliver's deafening vocalizations.

Screen Shot 2015-08-19 at 12.58.14

Henry has built a system around a Raspberry Pi that listens out for sounds over a certain volume, and triggers a recording when that constraint is met.

oliver-twitter-on-guard

But there are things in Oliver the dog’s vicinity which are also pretty noisy, so a second, filtering step is needed. Henry says:

Oliver barking is by far the loudest thing within several miles, so the volume threshold should be sufficient. However, the recordings are still triggered occasionally by unwanted junk. To guard against this, I needed to perform a second step to filter the barks from the junk.

I took a machine learning approach to filter out the barks. I built a model using the pyAudioAnalysis library and around a day's worth of barks (about 20). I then set up a bash script to run every ten minutes, classify each recorded sound, and forward the barks on to the next step.

The output is forwarded to the Twitter API, where they’re published by an account called @OliverBarkBark. Right now, a random string of barks, woofs, howls, and ruffs are published, but Henry is looking at adding some more sophistication by designing a dog-to-text translator which will say “bark” when Oliver barks, “ruff” when Oliver ruffs, and “woof”…you get the idea.

oliver-twitter-setup

All the code you’ll need to replicate the scheme in your own house (you’ll need a dog first) is available on Henry’s GitHub at https://github.com/HenryWConklin/barkdetect. Thanks Henry, and please give Oliver a biscuit for us.

The post Twitter for dogs appeared first on Raspberry Pi.

No comments:

Post a Comment