Skip to content

A repo containing the code for Brodey AI - a wearable conversational AI

License

Notifications You must be signed in to change notification settings

borna471/Brodie-AI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Brodie AI

Brodie AI is a wearable conversational AI bot powered by the OpenAI completions API, as well as Azures TTS and STT APIs. This repo contains the code running on both the Raspberry Pi and server so that you can recreate it.

DISCLAIMER: This code is NOT perfect. It's buggy and we built this in 24 hours during a hackathon, but it works and you can probably do it better.

Pre-reqs (what we used)

  • Raspberry Pi 2B (you can use any model)
  • Any computer that can run a server + Ngrok to tunnel for local development and testing
  • A Rapsberry Pi kit, (the one we used) or a breadboard, button, some resistors/wires, and a way to connect to the GPIO on the Pi.

How does it work?

There's a python script running on the Rapsberry Pi listening for a button input on the board. Once a user has clicked, the microphone listens for the audio and saves a .WAV file into the directory on the second button click. The conversate function is called which pings the API with the .WAV file.

The API takes the file, pushes it to Azure Speech to Text API, sends the text to the OpenAI Completions API, and finally we send that to Azure's TTS API and send the .wav file back to the user, and the script plays the audio file back.

Please DM @ryan_haraki on Twitter if you need any help! You're free to re-use this code in your own projects.

Credits go to Borna Shani, Alison Hardy, and Ryan Haraki.

About

A repo containing the code for Brodey AI - a wearable conversational AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 65.3%
  • Python 34.7%