Skip to content
HardwareLab

XiaoZhi ESP32 Server

Backend service for the open-source xiaozhi-esp32 hardware project, implemented in Python, Java and Vue according to the Xiaozhi Communication Protocol.

Hardware:
ESP32 XiaoZhi device, server (2 cores, 2-4GB for the simplified install)
Difficulty:
Intermediate
Creator:
xinnan-tech

Run your own backend for XiaoZhi ESP32 voice devices

XiaoZhi ESP32 Server
No photo in the source; GitHub repository card, served from HardwareLab.The creators’ demo videos are on bilibili, linked from the README; we only embed YouTube, X, Reddit or Vimeo.

By xinnan-tech

What it does

Backend service for the open-source xiaozhi-esp32 hardware project, implemented in Python, Java and Vue according to the Xiaozhi Communication Protocol. It supports MQTT+UDP, WebSocket, an MCP access point, voiceprint recognition and a knowledge base, with a choice of ASR, LLM, vision and TTS providers.

  • Backend service for the open-source xiaozhi-esp32 hardware project, implemented in Python, Java and Vue according to the Xiaozhi Communication Protocol.
  • Supports MQTT+UDP, WebSocket, an MCP access point, voiceprint recognition and a knowledge base.
  • Voice interaction: streaming ASR, streaming TTS and VAD, with multi-language recognition.
  • Tool calling through the client IOT protocol, client and server MCP, the MCP endpoint protocol and custom tool functions.
  • A web management interface for users, system configuration and devices, in Simplified Chinese, Traditional Chinese and English.

What you need

Skill level
Intermediate
License
No license stated

Parts

  • ESP32 hardware device already connected to Brother Xia's deployed backend service
AI model or service
configurable ASR / LLM / VLLM / TTS providers

Prices, notes and sources: Parts and requirements

Parts and requirements

PartSpec / notesNeededPrice
ESP32 hardware device already connected to Brother Xia's deployed backend service Required
  • Computer for setup: Simplified install: 2 cores 4GB if using FunASR, 2 cores 2GB if all APIs. Full module install: 4 cores 8GB if using FunASR, 2 cores 4GB if all APIs.

Full build guide

Steps

Skill level
Intermediate
  1. Choose the Simplified or Full Module installation
  2. Deploy with Docker or from source, following the linked deployment docs
  3. Pick Entry Level Free Settings or the Streaming Configuration for ASR, LLM, VLLM and TTS

Full instructions: View original

How it works

ESP32 devices running xiaozhi-esp32 connect to this server, which handles streaming ASR, an LLM, TTS and voice activity detection through the providers you configure.

LayerComponentRuns on
ServerMQTT+UDP gateway, WebSocket and HTTP servers with console management and authentication Docker or local deployment
ASRFunASR(Local) in the Entry Level Free Settings Local
VADSileroVAD Local use
LLMAny LLM that supports OpenAI interface calls, Ollama and others Interface calls

Setup effort

Skill level
Intermediate

Pick the simplified install (config files, no database) or the full module install (database, multi-user web console); both run via Docker or from source.

Limits and caveats

  • Not complete and has not passed a network security assessment; the authors say not to use it in production.
  • No commercial partnership with the third-party API providers it connects to, and no guarantee of their service quality or financial security.

Like this build? Get the weekly builds

Every Thursday: the 5 best gadget hacks you can copy. Free.

Built something? Submit a build

The creator's config

Copied word for word from the creator's repository, at the commit linked in each source.

  • Entry Level Free Settings vs Streaming Configuration (README table)

    | Module Name | Entry Level Free Settings | Streaming Configuration |
    |:---:|:---:|:---:|
    | ASR(Speech Recognition) | FunASR(Local) | 👍XunfeiStreamASR(Xunfei Streaming) |
    | LLM(Large Model) | glm-4-flash(Zhipu) | 👍qwen-flash(Alibaba Bailian) |
    | VLLM(Vision Large Model) | glm-4v-flash(Zhipu) | 👍qwen3.5-flash(Alibaba Bailian) |
    | TTS(Speech Synthesis) | EdgeTTS(Microsoft) | 👍HuoshanDoubleStreamTTS(Volcano Streaming) |
    | Intent(Intent Recognition) | function_call(Function calling) | function_call(Function calling) |
    | Memory(Memory function) | mem_local_short(Local short-term memory) | mem_local_short(Local short-term memory) |

Use-case ideas

  • Entry Level Free Settings: for personal and home use, with free solutions for every component.
  • Streaming Configuration: for demonstrations, training or more than 2 concurrent users, with faster responses.

Why it's interesting

This is the piece you need if you want XiaoZhi devices to talk to your own backend instead of Brother Xia's deployed service. It is written in Python, Java and Vue, follows the Xiaozhi Communication Protocol, and supports MQTT+UDP, WebSocket, an MCP access point, voiceprint recognition and a knowledge base. The README offers two installs: a simplified one that keeps data in config files with no database, and a full module install with multi-user management and a web console, each via Docker or from source. Sizing: the simplified install wants 2 cores and 4GB if using FunASR, or 2 cores and 2GB if all models are APIs. The authors warn it is not complete, has not passed a network security assessment and should not be used in production.

Source: github.com/xinnan-tech/xiaozhi-esp32-server#readme

Hardware

  • ESP32 XiaoZhi device
  • server (2 cores, 2-4GB for the simplified install)

More ESP32 builds

Credits and links

This page is a short summary written by HardwareLab. Build steps, code and photos belong to the creator; follow “View original” for the full project.

Featured? Add this badge

Built this? Paste the badge into your README. It links back to this page.

Featured on HardwareLab

Markdown

[![Featured on HardwareLab](https://hardwarelab.dev/badge.svg)](https://hardwarelab.dev/projects/xiaozhi-esp32-server/?utm_source=badge&utm_medium=referral&utm_campaign=launch_2w)

HTML

<a href="https://hardwarelab.dev/projects/xiaozhi-esp32-server/?utm_source=badge&utm_medium=referral&utm_campaign=launch_2w"><img src="https://hardwarelab.dev/badge.svg" alt="Featured on HardwareLab" width="188" height="20"></a>

Sources

  1. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L6-L8
  2. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L9
  3. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L224
  4. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L231
  5. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L233
  6. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L196-L203
  7. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L190
  8. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L192
  9. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L48
  10. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L170-L171
  11. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L223-L235
  12. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L196-L198
  13. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L291
  14. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L254-L264
  15. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L165-L203
  16. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L157
  17. github.com/xinnan-tech/xiaozhi-esp32-server/blob/eb9dc8ca0fc8a30bc8afb0f302dcfc1578f76a7b/docs/readme/README_en.md?plain=1#L155