hackers365/xiaozhi-esp32-server-golang

golang版本的小智后端服务,支持websocket和mqtt+udp协议,支持声纹识别/声音克隆/知识库/mcp远程调用/主动音频下发/openclaw等功能

What it solves

It provides a high-performance, full-streaming AI backend specifically designed for IoT and smart voice scenarios, enabling ESP32 devices and other edge terminals to perform real-time AI voice interactions with low latency.

How it works

The server is built with Go and implements an end-to-end streaming pipeline: Voice Activity Detection (VAD) $\rightarrow$ Automatic Speech Recognition (ASR) $\rightarrow$ Large Language Model (LLM) $\rightarrow$ Text-to-Speech (TTS). It uses a transport abstraction layer to support multiple protocols (WebSocket, MQTT, UDP) and employs message queues for asynchronous processing of LLM and TTS tasks. It integrates various AI engines via the Eino framework and includes a web-based management console for configuration and monitoring.

Who it’s for

Developers building AI-powered voice assistants or smart home devices using ESP32 hardware who need a scalable, modular backend to handle voice processing and agent logic.

Highlights

  • Full-Streaming Pipeline: Low-latency real-time interaction from speech input to audio output.
  • Speaker Identification: Automatically switches TTS voices based on the identified speaker's identity.
  • Modular Architecture: Plug-and-play modules for VAD, ASR, LLM, TTS, and vision capabilities.
  • Broad Integration: Supports multiple engines including FunASR, OpenAI, Ollama, Doubao, EdgeTTS, and CosyVoice.
  • Advanced AI Features: Includes RAG support via Dify/RAGFlow, voice cloning, and MCP (Model Context Protocol) for tool calling and resource management.
  • Comprehensive Management: A web console for visual configuration, latency monitoring, and OTA verification.

Related

  • Project
  • Project
  • Project
  • Dispatch
  • Project