Ai Powered Bull**** Detector

About the project

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

Items used in this project

Hardware components

Google AIY Voice Kit for Raspberry Pi Google AIY Voice Kit for Raspberry Pi x 1
NeoPixel Ring RGB LED 24 x WS2812 NeoPixel Ring RGB LED 24 x WS2812 x 1
Raspberry Pi Camera Module Raspberry Pi Camera Module x 1
Raspberry Pi 3 Model B Raspberry Pi 3 Model B x 1

Software apps and online services

Remo.tv Remo.tv
Google Dialogflow Google Dialogflow
Raspberry Pi Raspbian Raspberry Pi Raspbian

Hand tools and fabrication machines

3D Printer (generic) 3D Printer (generic) x 1
TinkerCad TinkerCad x 1

Story

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?

Schematics, diagrams and documents

Dataflow

CAD, enclosures and custom parts

BoxWall

Go to download

BoxBaseplate

Go to download

BoxTop

Go to download

BoxCorner

Go to download

BoxHolewall

Go to download

Poop

Go to download

Code

TestCodeNeoVoice.py

chat_custom.py

TestCodeDialogflow.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...