Alas, Poor Yorick! I Tweeted Him

yoreck the talking skull

You know Halloween is coming around when the tweet reading skulls start popping up. [Marc] wanted to bring the Halloween spirit into his workplace, so he built “Yorick”. In case you’re worried, no humans were harmed (or farmed for parts) in the creation of this hack. Yorick started life as an anatomical skull model, the type one might find in a school biology lab. Yorick’s skull provided a perfect enclosure for not one but two brains.

A Raspberry Pi handles his higher brain function. The Pi uses the Twitter API to scan for tweets to @wedurick. Once a tweet is found, it is sent to Google’s translate server. A somewhat well-known method of performing text to speech with Google translate is the next step. The procedure is simple: sending “http://translate.google.com/translate_tts?tl=en&q=hackaday” will return an MP3 file of the audio. To get a British accent, simply change to google.co.uk.

The Pi pipes the audio to a speaker, and to the analog input pin of an Arduino, which handles Yorick’s lower brain functions.  The Arduino polls the audio in a tight loop.  An average of the last 3 samples is computed and mapped to a servo position. This results in an amazingly realistic and automatic mouth movement. We think this is the best part of the hack.

It wouldn’t’ be fair for [Marc] to keep the fruits of his labors to himself, so Yorick now has his own Livestream channel. Click past the break to hear Yorick’s opinion on the Hack A Day comments section! Have we mentioned that we love pandering?

9 thoughts on “Alas, Poor Yorick! I Tweeted Him

  1. The mouth movement seems to be a bit behind the sound. No surprise considering it has to be processed and the servo has to move. Maybe the audio could be delayed relative to the signal to the arduino to improve this? Nice work though.

Leave a Reply to 0xfredCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.