Overview

Below an overview of the content:

  • Project video
  • 3D Printing
  • Electronics
  • Training the AI - Dialogflow
  • Remo.tv
  • Result!

Project Video

The one device we all need, an AI Powered Bull**** Detector!

3D Printing

First things first, we need a container. In this case we chose to 3D print a nice colorful one. You can also use something else, as long as all the electronics fit.


Happy with our box, we can 3D print a poop emoji made by 3DCreatorPurzi. All we have to do is add a hollow space in the bottom to hold our NeoPixel ring.

All the model files are attached.

Electronics

It all starts with a Raspberry Pi 3B+.

Because we want to use Speech-To-Text we also have to add an AIY VoiceHat and the corresponding microphone. It's all documented right here.

Last but not least, we wire up the NeoPixel ring, here's a great tutorial for just that.

With everything set up we can test out the Speech-To-Text and NeoPixel ring, the test code is attached.

Training the AI - Dialogflow

For our AI we are going to use Dialogflow. Originally, it's meant to be used as chatbot software, we can slightly misuse it to train our bull**** detector.

We create two intents, one is our fallback, and the other bull****. Next we add all the content in the training phrases of our bull**** intent. You can really go nuts here.

After saving, our bot will be training to detect bull**** based on the given training phrases. Once done, we can use a bit of python code to connect to our freshly trained AI.

The data flow is as followed:

  • The microphone picks up someone speaking and records it.
  • This file is sent to the Google Cloud and transformed into text.
  • The generated text is sent back to the Raspberry Pi.
  • This text is then sent to Dialogflow.
  • Dialogflow tries to match the text with the content from our bull**** intent, and depending on the result it will either send back the bull**** intent or the default fallback one.
  • On our Pi we check the name of the intent, and if it's 'Default Fallback Intent' we tell the lights to flash green, meaning no bull***. Otherwise we flash red, indicating bull****.

The full code is attached.

Remo.tv

We can't keep something so powerful all to ourselves! So, we are going to make our detector available for everybody. To make this happen we are going to use Remo.tv, a robot streaming platform.

All we need to do is attach a Pi Camera and follow their setup instructions.

Once Remo.tv is set up, we will write our own chat handler. Instead of using Speech-To-Text we directly send the chat messages we receive on Remo.tv to Dialogflow. The rest of the logic remains the same. Just add a note in the background to tell visitors what they are looking at, and we're all done.

Result!


We successfully built a AI powered bull**** detector, which can learn from new input!

You can try it out yourself right here.

Now, where can we collect our nobel peace prize?