AI Voice Assistant

by Showblown in Circuits > Raspberry Pi

59 Views, 4 Favorites, 0 Comments

AI Voice Assistant

20240603_235045.jpg

For this contest I made an AI where if you press a button on a screen, you can get an answer within seconds!

Supplies

Amazon.com: FIYAPOO Mini Portable Speaker, 3W Mobile Phone Speaker Line-in Speaker with 3.5mm AUX Audio Interface for Smartphone/Tablet/Computer : Electronics


Amazon.com: Attom Tech Dual USB Output Super Slim Power Bank Ultra Thin, 3000mAh Portable Charger Mini External Phone Battery Pack Small Dual Outlet, Emergency Phone Power Backup (White) : Cell Phones & Accessories


Amazon.com: Micro USB Cable 0.5 Feet, 2.4A Fast Charging & Sync Android Charger, USB 2.0 A to Micro B 5-Pin Cord, Compatible with Samsung Galaxy S7 S6 Edge, Note 5 4, Sony, PS4, Kindle, Fire TV and More – Black : Electronics


Amazon.com: iPistBit 3.5 Inch Touchscreen Monitor, 480x320 LCD TFT SPI Display Compatible with Raspberry Pi 5/4/3/2/Zero/B/B+ (Not Support HDMI) : Electronics


Amazon.com: HomeSpot USB 2.0 to Short Micro USB Extension Cable Cord with Click Button Power On Off Compatible with Raspberry Pi Zero 3 Smartphone Tablet : Electronics


Amazon.com: (2-Pack) USB to 3.5mm Jack Audio Adapter, QimKero External Sound Card USB-A, for AUX Stereo Converter, Compatible for Headset, PC Windows, Laptop,Mac, Desktops, Linux, PS4andMore : Electronics


Amazon.com: LoveRPi MicroUSB to USB 4 Port Black OTG Hub for Raspberry Pi Zero : Electronics


Amazon.com: Lexar E-Series 32GB Micro SD Card, microSDHC UHS-I Flash Memory Card with Adapter, 100MB/s, C10, U1, A1, V10, Full HD, High Speed TF Card : Electronics


Raspberry Pi Zero 2 W (You can use any raspberry pi, but i used this one because it was one of the cheapest) along with GPIO pins to solder to it


A 3D printer that you can print CAD files on


A microphone

Get a Raspberry Pi

img_20240308_195537_720.jpg

The computer for this will be a Raspberry Pi. You can use any from the raspberry pi family (except for the Raspberry Pi Zero because it has no wif connection), but if your using one without a GPIO port, you'll have to solder it yourself.

Write the Code

Screenshot 2024-06-03 210918.png

For me this was fairly simple. The code I wrote was simple and got the job done. Essentially it recorded audio, then converted that to text, which goes through the chatGPT API, which then is converted back to speech, and then expelled to the reader. The code can be found here.


Showblown/Instructablecontestcode (github.com)

3D Print the Box

Screenshot 2024-06-03 211046.png

I designed the box in Fusion 360 in 3 main parts: The main box, the side plate, and the top plate. I designed it like this because I wanted space to put the electronics, then put everything else

Set Up the Pi

For this step, all you have to do is burn the software onto the pi and run the program (you can transfer it onto the pi via usb or scp transfer)

Get All the Hardware Together

fa.png

For this step I just connected all the electronics together

Running the Program

The way I ran the program was by connecting my computer to the Raspberry Pi via ssh, cding into the directory, and running the interface.py file. After that, you should just need to press the button and enjoy!