AI Talking Robot Using ESP32 | ChatGPT Voice Assistant Robot | Xiaozhi AI

Back to blog
DIY AI Friend · ESP32

Build Your Own XiaoZhi AI Voice Chatbot Using ESP32

Easy step-by-step ESP32 AI voice assistant tutorial with components, wiring guide, firmware flashing, Wi-Fi setup and device pairing.

✓ Beginner friendly ✓ ESP32 + XiaoZhi AI ✓ Step-by-step guide ✓ Browser firmware flasher
🤖XiaoZhi AI Voice ChatbotReplace this placeholder with your Shopify-hosted project image

1 Introduction / What is XiaoZhi AI?

XiaoZhi AI is an open-source voice assistant project that runs on compatible ESP32 hardware and connects to an online AI service. An I2S microphone captures your voice, an amplifier and speaker play replies, and an OLED can show device status or pairing information. It is a practical demonstration for students, educators and electronics hobbyists.

🎙️
AI Voice Chatbot on ESP32Talk, ask questions and explore embedded AI.

2 Required Components

Typical parts for a XiaoZhi AI ESP32 voice assistant. Check your exact firmware and board before wiring.

ComponentPurposeQty
ESP32 development boardMain Wi-Fi / Bluetooth microcontroller1
INMP441 microphoneI2S digital voice input1
MAX98357A amplifierI2S audio output and speaker driver1
4Ω speakerAI voice audio output; rating must suit amplifier1
0.96-inch OLEDI2C status display, if supported by firmware1
BreadboardPrototyping and wiringAs needed
Jumper wiresModule connectionsAs needed
USB data cable / suitable power supplyFlashing and powering the device1
📦

Get the Ready-Made Kit

Prefer a completed project for your demonstration? Explore the Skynet Robotics ready-made XiaoZhi AI ESP32 kit.

4 Circuit Diagram

Use the wiring diagram that matches your actual ESP32 board, modules and firmware build. GPIO assignments are firmware-specific.

🔌 Add your verified circuit diagram using a Shopify Files image URL.
Important: Do not rely on a generic pinout. Verify ESP32 pins, power voltage, microphone I2S pins, amplifier I2S pins and OLED I2C pins against the firmware configuration. Never connect a single Li-ion cell directly to an input that expects regulated 5V.

5 Breadboard Assembly Guide

🛠️ Add your assembled project photo using a Shopify Files image URL.
  1. Position the ESP32 and other modules securely on the breadboard.
  2. Connect power and ground according to each module's rated voltage.
  3. Wire the INMP441 microphone to the firmware's assigned I2S pins.
  4. Connect the MAX98357A amplifier and speaker correctly.
  5. Connect the OLED to the designated I2C pins, if used.
  6. Double-check polarity and every connection before applying power.

6 Flash XiaoZhi AI Firmware

Flash only firmware designed for your exact ESP32 chip and connected hardware. Use a desktop browser with Web Serial support and a USB data cable.

  1. Connect the ESP32 to your computer using a data-capable USB cable.
  2. Click the installation button below, then select the ESP32 serial port.
  3. Follow the installer prompts and do not disconnect power while flashing.
  4. Restart the board after the installation completes.
XiaoZhi AI Web Flasher
⚡

Install ESP32 Firmware

Use a compatible desktop browser with Web Serial support (for example, Chrome or Edge). Open this Shopify page over HTTPS to enable firmware flashing. ⚠ Flashing can erase existing firmware and settings.

7 Wi-Fi Configuration

  1. Restart the ESP32 after successful flashing.
  2. Connect to the temporary Wi-Fi hotspot created by your firmware, if available.
  3. Open the configuration address shown by your device or firmware instructions.
  4. Select your 2.4 GHz Wi-Fi network, enter the password and save.

8 Create XiaoZhi Account

  1. Open the official XiaoZhi website.
  2. Create an account or log in using an available method.
  3. Open the agent or device management area in your dashboard.
🔐 Keep account credentials private. An internet connection is needed for cloud AI features.

9 Pair Your Device

  1. Open the add-device flow in your XiaoZhi dashboard.
  2. Read the pairing code shown on the device screen or serial output.
  3. Enter the code and confirm the device pairing.

10 Configure AI Personality

Give your assistant a name, select an available voice, and add a role prompt using the XiaoZhi dashboard.

SettingExample
NameSkynet AI
RoleFriendly electronics learning assistant
LanguageHindi / English (if supported)
Response styleSimple and concise

11 Features & Voice Commands

🎙️Voice Chat

Interact with an AI using speech.

💡Ask Questions

Learn about science, electronics and more.

🌐Connected AI

Cloud-assisted responses over Wi-Fi.

🖥️OLED Status

Show status or pairing data, depending on firmware.

12 Frequently Asked Questions

Do I need to write Arduino code?

Not when you have compatible ready-made firmware. For custom hardware, firmware changes might still be required.

Can I use any ESP32 board?

No. Use firmware matched to your exact chip family, flash size, peripherals, pin connections and display.

Why does my computer not detect the ESP32?

Check the USB data cable, serial driver, browser permissions and board boot mode.

Will XiaoZhi work without the internet?

Cloud AI conversation generally needs a working internet connection.

Can I configure Hindi or English?

Language and voice options depend on the account, backend and firmware version.

Build Your Own AI Talking Robot

Learn with the tutorial, or explore a ready-made XiaoZhi AI project kit.

Explore the Kit →