# py-xiaozhi

A cross-platform Python framework for real-time voice AI, vision-language tasks and IoT device control, evolved from the xiaozhi-esp32 firmware project.

py-xiaozhi is a lightweight, cross-platform multi-modal AI interaction framework built on Python's async architecture. It supports real-time voice streaming, vision-language tasks and IoT device control, and deploys across Windows, macOS and Linux desktops as well as ARM embedded platforms such as Raspberry Pi, Horizon Robotics RDK and Jetson Nano.

Its real-time voice pipeline uses the Opus codec with automatic frame detection and async streaming for sub-20ms latency, and a camera-driven vision-language pipeline handles image understanding and scene perception. An MCP tool ecosystem exposes a modular JSON-RPC 2.0 tool server covering music playback, camera control, screenshots, application management, weather and volume control, and the project offers PySide6/QML GUI, CLI and GPIO interfaces for desktop, headless server and embedded use.

It evolved from the xiaozhi-esp32 firmware project and has been adopted by D-Robotics as an upstream dependency for xiaozhi-in-rdk. It is written in Python under the MIT license.

Website: https://huangjunsen0406.github.io/py-xiaozhi/
