The Swear Bear

About the project

Do you also swear too much? Don't worry, this artificial intelligence powered, internet of things enabled swear jar is here to help!

Items used in this project

Hardware components

Wires Wires x 1
Teddy Bear Teddy Bear x 1
Google AIY Kit Google AIY Kit x 1
LifePO4WERED Pi+ LifePO4WERED Pi+ x 1
Raspberry Pi Zero Raspberry Pi Zero x 1

Software apps and online services

ThingSpeak API ThingSpeak API

Hand tools and fabrication machines

Google Cloud Platform Google Cloud Platform x 1

Story

Introduction

How does it work? Well, it listens to your every word and detects profanity (AI). When caught, it instantly tells on you to a very public data stream (IoT), not only revealing the committed crime but also providing timestamped proof.

Project Video

Hardware

It all starts with a Raspberry Pi, an AIY Voice kit and the LifePO4WERED Pi+. The Raspberry Pi orchestrates the data flow between the different platforms and provides computing power to our dirty language detection.

On top of our Raspberry Pi we add the LifePO4WERED Pi+, this module takes care of our power needs, and adds much appreciated portability.

Last but not least, we also add a Google AIY Voice Kit which supplies a microphone for recording and speakers for some interaction.

Both components have great support, here's guide on setting up the LifePO4WERED Pi+ and here's one on setting up the AIY Kit.

AI and IoT

With all the hardware set up, we move on to the software.To get the ball rolling, we first follow this guide on how to set up a custom voice interface using the AIY kit.

Next up, detecting profanity in the recorded text. Fortunately, a fantastic python library exists with, again, great documentation.

With the above all ready, we are now able to convert speech to text, and reliably catch any obscenity. This is a tremendous milestone, the artificial intelligence part is complete!

But, we also want to save all this data, and that's where ThingsSpeak comes to its own. As an open source Internet of Things platform it contains everything we need. It not only stores our results, but also allows for public sharing. And as luck would have it, they also have a superb tutorial.

Last not but least, just to make life a tad easier, you can find the full Python code in this article.

Bear

Looks can matter, and our creation should look as cute as it is evil.And what better fit than a teddy bear? As luck would have it, we found a sweet little teddy waiting for us in the thrift store. It's cute as can be and, after removing the heating pad from its insides, it has a just enough space for all the electronics.

It is quite a fiddly job to get everything to fit, but once done, it does look absolutely adorable!

This step is very much optional, you can put these electronics in any vessel you like.

Result

To test our great innovation, we activated it during filming, and the results are in!You can browse all the data gathered during this 15 minute session right here.

And now, lets finish this questionable project with a fun fact:

28% of the recorded conversation contained profanity.

Well ****.

Code

swearBearClean.py

Credits

Photo of 8BitsAndAByte

8BitsAndAByte

We’re Dane & Nicole, two makers that create tremendously terrible tech, which we happily share with you on our channel! https://www.youtube.com/c/8bitsandabyte

   

Leave your feedback...