Trying out new technologies with a pun-telling teddy bear
I was excited to try my hand at it but as it was a potential case, there was no budget for it. To save the day, in comes Exove Labs – an internal project for trying new and cool technologies. The goal of Exove Labs is to create and test prototypes and proof of concepts to bring new opportunities and value to our customers. Finally, I was given the go ahead to see what I could make.
Readymade libraries can get you a long way
With the plug and play library I was able to detect a person’s face and, with some trigonometry to rotate the model’s head as if it were sitting further into the screen. Hence, we had a model that would look at a person sitting in front of it. I had tried to work with projected depth to get a more accurate reaction but sadly the library that I was using made that all but impossible. The trigonometry, however, provided a perfectly workable solution due to the fact that the model wasn’t trying to focus on the user. It was a teddy bear after all.
Next was to add a bit more magic, I wanted the bear to have some idle animations and some other trigger based animations too. Thankfully ThreeJS made this quite easy. I needed to have the teddy bear’s head separated from its body to have both the animations and head tracking at the same time, but he didn’t seem to mind that too much.
Why not have a little fun?
Now this was truly an adorable little demo but you know what makes everything better? Puns and dad jokes! Making use of the Web Speech API and its implementation in Google Chrome I was able to have the teddy bear “hear” what I was saying thanks to the SpeechRecognition part of the API. With the SpeechSynthesis part of the API I was able to have the teddy speak to me, of course I needed to make its voice super high pitch. Finally, with the help of some various websites I was able to amass a large number of just awful jokes. “All” it took to put it together was some regex, but, after dealing with that problem, my adorable, horribly annoyingly voiced, hilarious demo was complete!
This demo actually helped lead to some proper client work that turned out to be the best ~6 months of my working life to date. One of the most interesting and challenging projects that I have had the pleasure to work on. I got to work with some amazing people and in general it makes me super thankful that I was able to experiment and assist sales in winning the project.