Live Dog of the Day: One Tech-Savvy Pet Owner Set Up a Bark-to-Text Twitter Account for His Pooch
Henry Conklin loves his dog and wants to share the canine's voice with the world. Modern social media and Conklin's technological know-how make that possible.
The mathematics/computer science undergraduate student at the University of Virginia regularly engages in competitive programming and decided to use these skills to make a Twitter account that his dog Oliver could 'control'.
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.
The full process from bark to tweet takes three steps. First is recording. I have the raspberry pi listening continuously and triggering a recording once it hears a sound over a preset volume. 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.
Finally, the barks are forwarded to the twitter api (using python-twitter) and posted under the handle @OliverBarkBark (be sure to follow!). Currently the tweets are random strings composed of "bark," "ruff," and "woof." I plan to replace that with a bark-to-text translator that will likely produce similar results but be more accurate to Oliver's actual voice.