QC

ESP32 Offline Voice Assistant with Gemini AI

A button-controlled AI device that responds (no microphone needed!)

Devices and components

MUST ESP32 DevKit v1

Red Led Diode 5mm

Breadboard 100x160

MAX98357A

Breadboard Jumper Wire Pack (200mm & 100mm)

5mm green LED

0.96 OLED SSD1306

3W 4 ohm speaker

Software and tools

Google Gemini

Project description

Story

Pinout and connection diagram

Instructions

Step 1 The Build: Follow the diagram above to connect all your components on the breadboard. Pay particular attention to the I2C and I2S pinouts of the ESP32.

Step 2: Flash the Arduino Code

Follow the steps in the arduino_firmware.ino file comments to install the ESP32 board manager and required libraries. Select your board and port, then upload the code to your ESP32.

Step 3 Configure AI Server: This Python server acts as the brains of the operation.

Install Dependencies: Run pip install -r requirements.txt to get all the necessary Python libraries.

Get Your API Key: Obtain a GEMINI_API_KEY from the Google AI Studio.

Run the Server: Run python server.py to start the server.

Operation

Power on: Connect power to your ESP32. It should connect to Wi-Fi and the OLED will display “Ready” with the solid green LED.

“Next” button: Press this button to cycle through the preset phrases on the OLED screen.

“Speak” button: When you find the phrase you want, press “Speak”.

The OLED will display "Thinking..." (solid red LED) when the ESP32 contacts the server.

Once the server responds, it switches to "Talking..." mode (solid green LED, flashing red LED) during audio playback.

After reading, it returns to “Ready”.

Conclusion

Code Repo

get the full code from here

Downloadable files

Pinout

Refer to this for ESP32 pinout connections

pinout.jpg

Connection diagram

refer to this to connect everything together

fritz.png




Note: Content and images are from: https://projecthub.arduino.cc/, with some modifications.
If you want it removed due to copyright reasons, please leave a comment. Thank you.
I want to share this article more widely so that everyone knows about Arduino and your project.

SendData

Điều khiển trạng thái qua Firebase Trạng thái hiện tại: Đang tải... ĐỔI TRẠNG THÁI