hoorayman/xiaozhi-pi-mochi — explained in plain English
Analysis updated 2026-05-18
Build a physical ESP32 voice assistant that talks back using any of 30-plus supported LLM providers.
Give each connected device its own personality by setting a custom system prompt per device.
Add an animated emotional face on an OLED screen to a DIY voice robot project.
| hoorayman/xiaozhi-pi-mochi | division-36/z-jail | nogamble/rvos | |
|---|---|---|---|
| Stars | 25 | 25 | 25 |
| Language | C | C | C |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 4/5 | 3/5 | 4/5 |
| Audience | developer | ops devops | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Node.js 18+, Python 3.10+, ffmpeg, and a pi-agent installation plus a physical ESP32 device.
xiaozhi-pi-mochi is a backend server for the xiaozhi-esp32 project, which turns an ESP32 microcontroller (a small, inexpensive chip used in DIY electronics) into a voice chat robot. The server receives audio from the physical device over WebSocket, transcribes the speech, generates a reply with a language model, converts the reply back to audio, and sends it back to the device to play, completing the loop in a few seconds. The processing pipeline works as follows: the ESP32 records your voice and streams compressed Opus audio to the server. Google Speech Recognition transcribes the audio to text for free, without requiring an API key. A large language model connected through the pi-ai framework (which supports more than 30 providers including DeepSeek, OpenAI, and Claude) generates a reply. Microsoft's edge-tts converts the reply to speech using neural voices. Then ffmpeg converts the audio back to the Opus format the device expects, and the server sends it over WebSocket for playback. The "mochi" feature refers to an animated face displayed on a small OLED screen attached to the ESP32. The face cycles through eight emotional expressions based on the conversation state, giving the robot a visual personality alongside its voice. Each physical device connected to the server can have its own independent personality, set as a custom system prompt through the command interface. You could configure one device to respond warmly and another to be more blunt, and change these settings at runtime without restarting the server. The server is written in TypeScript and Python, with no compilation step required, and starts with a single command. It requires Node.js 18 or newer, Python 3.10 or newer, ffmpeg, and a pi-agent installation.
A backend server that turns an ESP32 microcontroller into a voice chat robot by handling speech-to-text, an AI reply, and text-to-speech in one loop.
Mainly C. The stack also includes TypeScript, Python, WebSocket.
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.