ESP32 + ChatGPT: Type a Question, Hear the AI Answer (TTS Project)

Опубликовано: 12 Июль 2026
на канале: Kidz Science Korner
2,760
87

In this project, I built a system where an ESP32 connects to ChatGPT, sends a question typed via the Serial Monitor, and plays the AI-generated answer out loud through a speaker using Text-to-Speech (TTS).

The ESP32 connects to WiFi, communicates with OpenAI’s ChatGPT API, parses the JSON response, and streams the spoken answer using an amplifier and speaker setup — no extra hardware beyond an ESP32, amplifier, and speaker.

What this project covers:
• Connecting an ESP32 to WiFi and APIs
• Sending questions to ChatGPT and receiving responses
• Using free Text-to-Speech to play responses via a speaker
• Building a simple AI-powered talking device

Technologies Used:
• ESP32 with WiFi
• OpenAI ChatGPT API
• Arduino IDE and programming
• Audio streaming over I2S protocol

Libraries:
• WiFi.h
• HTTPClient.h
• ArduinoJson.h
• ESP32 Audio.h

This is a first step towards a full voice-interactive system — future updates will add Speech-to-Text capabilities.

If you enjoy creative electronics and AI projects, subscribe for more builds and upgrades!

Code: https://github.com/kidzsciencekorner/...

Internet Radio:    • Build Your Own Internet Radio with ESP32 &...