When Yorick was first brought to life, he had Alexa’s voice. A lot of his charm was the incongruity between his appearance and his voice. At the same time, a number of folks asked about having a creepier voice and I wanted to try to do that for this Halloween. An update to the AlexaPi project added support for the SoX audio playback handler as an alternative to VLC. SoX has support for audio effects, so it became possible to change Yorick’s output voice. I didn’t want to lose Alexa’s voice, so I edited the AlexaPi code so that it would recognize both “Alexa” and “Yorick” as trigger words, with the output sound depending on which trigger word you used. As a result, Yorick now responds either as Alexa or with his own voice.
Just like Elliot on Mr. Robot, Yorick now has a split personality.
I talked to Yorick, aka Alexa, a bit about Halloween:
It turns out that Yorick is a baseball fan and was rather disappointed that the Washington Nationals aren’t in the World Series. Awhile back, I asked him about going to one of the playoff games:
AlexaPi uses PocketSphinx for recognizing the trigger word. The original code is set up to recognize a single trigger word or phrase, which you can easilly change in a yaml configuration file. However PocketSphinx can recognize multiple keywords or phrases selected from a python list. Some editing of the AlexaPi source code was needed in order to change the trigger from a single variable to a list. Similarly, the code was modified slightly so that once a trigger word was recognized it checks which word was used. If the trigger word is “Yorick” it changes the pitch and speed of the audio output.
I used version 1.5 of AlexaPi. This and previous versions had a problem in that the temporary file names used were the response code that the Alexa voice service returned. These sometimes included characters that were illegal for file names or that were too long for a file name. I patched these problems (and later versions of AlexaPi have fixed this problem).
In addition, the servo motion routines had to be modified slightly, as version 1.5 and later of AlexaPi begins streaming questions to the Alexa voice service as they are asked, rather than waiting until the question is finished. This results in a faster response time.
I’ve been extremely gratified by the interest in Project Yorick, so I thought I’d share a bit more. First up is a St. Patrick’s Day greeting:
And here’s a video of Yorick without the project box, as he was being developed:
Last Halloween, I accidentally applied too much voltage to the servos and burned out the eyes servo. Luckily, I could take the skull apart and replace it. Here’s a picture from the successful brain surgery:
This post is more suited to Halloween then the coming Yule, but I finally got around to writing it, and besides, as I write this, there’s only 327 days left to next Halloween! There are several options for controlling animated props, including prop controllers specifically designed for this purpose. A recent addition to the market is the MonsterShield, an Arduino-based prop controller with open source code you can modify. I haven’t tried one out, but thought it was work a mention. In my props, I just use a handy micro-controllers, such as an Arduino, along with sensors such as a PIR. The PIR (or pressure mat, or whatever sensor you choose) sends a signal to the microcontroller when it detects someone, and then your microcontroller can trigger a whole sequence of pre-programmed actions. I had two such props in my Halloween display this year. The first is a classic “Monster in a Box“. I use a PIR sensor to detect when someone comes near. When this happens,a Teensy sends out an output to a Power Switch Tail to turn on the power to a wall wart that delivers 12V power to the windshield wiper motor, as well as to a green light inside the box. I use a Power Switch Tail so that I don’t have to worry about any safety issues dealing with house current directly. The motor sequence has several stops and stop in it, of differing lengths, so that the action is more natural. After it triggers, there’s a dead time, so that it doesn’t keep restarting while trick-or-treaters are standing in front watching it.
Closed Monster in a box, showing the box with the PIR and Arduino that triggers the box.
Inside view of the Monster in a Box, showing the wiper motor and irregular cam.
The other prop where I use a PIR and an Arduino is my scarecrow skeletons, who do a little talking and singing routine when triggered. Here, an Arduino controls two Cowlacious audio boards that in turn drive the servo boards that control the jaw servo and lights in the skulls (also from Cowlacious). I’ve had the audio boards for some time. They work fine, and have a wide host of control options (including the ability to be triggered directly from a PIR). However if I was remaking this prop, I’d probably just wire up some really cheap mp3 players. The video shows the two skeletons doing their routine. Sorry for the quality, my video editor is refusing to save the edited version.