Code librariesReviewed · huangjunsen0406

py-xiaozhi

py-xiaozhi is a Python framework and client for developers building voice, camera and device-control AI assistants, but the README leaves online AI service configuration and costs unspecified. It describes desktop and ARM deployment, graphical and terminal interfaces, streamed audio, MCP tools and local wake-word detection.

Researched 13 Nov 2026

In short.

py-xiaozhi is a Python framework for developers building desktop or embedded AI assistants, but online AI features depend on services whose configuration and pricing are not established by the README. It combines asynchronous audio streaming, optional camera input, local tools and graphical, terminal or GPIO interfaces. Sherpa-ONNX provides the documented local wake-word capability; fully offline conversation is not established. Performance, security and hardware compatibility remain unassessed.

Researched and written by an AI model and checked by a second AI model. How it works

The scope is the complete README.md at [https://github.com/huangjunsen0406/py-xiaozhi/blob/main/README.md], represented by its captured contents at revision d3705207de777409ee4634d454e8602c38daad9f, plus the accompanying LICENSE notice. Linked pages and projects, implementation files, dependencies, demonstrations, release packages and CI logs are excluded. No commands or software were executed. Performance, security, platform compatibility and complete AI or hardware interactions remain unassessed. Distribution covers the captured README and accompanying licence notice, without adding application code or other repository files.

The overview

What it is

py-xiaozhi presents itself as a Python framework for real-time voice interaction, vision-language tasks and device control. It also provides runnable client interfaces. The source address is [https://github.com/huangjunsen0406/py-xiaozhi/blob/main/README.md].

The README identifies xiaozhi-esp32 as its firmware origin and describes desktop and ARM embedded deployments. This is an application framework and client, rather than a supplied language model or a documented hosted AI service.

Practical fit

Its practical appeal is bringing audio, optional vision, assistant tools and hardware interfaces into one extensible Python application. Concrete installation commands and separate interface options give developers a starting point for desktop assistants and embedded projects.

The README is insufficient for predicting a complete deployment effort. It does not explain the required AI service configuration, identify supported backend models or establish a working microphone-to-response journey. Beginners should expect additional documentation and configuration work.

Who it suits

The strongest fit is Python developers building voice assistants, camera-enabled applications or hardware projects that need an AI conversation interface. Desktop developers can investigate the graphical or terminal interfaces; embedded developers have documented GPIO support and advertised Raspberry Pi, Horizon Robotics RDK and Jetson Nano targets.

Developers extending it will need familiarity with asynchronous Python, dependency installation and service configuration. A beginner seeking an immediately usable assistant will need guidance beyond this README, particularly for activation, audio dependencies and backend access.

Documented capabilities

The README describes streamed voice using Opus audio encoding, real-time resampling, camera capture for vision-language services and local wake-word recognition through Sherpa-ONNX. Interface choices include a PySide6/QML graphical application, a Textual terminal application and a GPIO interface.

Its MCP tool system uses JSON-RPC 2.0 for structured tool calls. Listed tools cover music, camera capture, screenshots, application management, weather and volume. WebSocket and MQTT communication, automatic reconnection and an extensible plugin architecture are also documented. These are documented capabilities, without supplied runtime results.

Using it

Requirements

The stated baseline is Python 3.10–3.12 on Windows 10 or later, macOS 10.15 or later, or Linux, with microphone and speaker devices. Online AI services and online features require a stable internet connection.

The recommended configuration lists at least 4 GB RAM, preferably 8 GB or more, 2 GB available storage and audio devices supporting 16 kHz sampling. It also recommends an AVX-capable CPU without explaining an equivalent requirement for its advertised ARM boards.

Wake-word support needs appropriate Sherpa-ONNX model files. Camera features need a camera and OpenCV. Graphical and terminal interfaces require their respective installation extras. For wheel installations, the README says FFmpeg is resolved from the system PATH.

How it works

An asyncio event loop coordinates components through an event-driven architecture. A bootstrap container manages component lifecycles, while plugins provide audio, interfaces, wake-word handling and MCP tools. Application, protocol and interface layers are separated.

The documented conversation flow enters LISTENING after a wake or button action succeeds and the protocol accepts the listening request. Incoming synthesized speech moves it to SPEAKING; after playback finishes, it resumes listening or returns to IDLE. Server notifications use a separate NOTIFYING state.

Local keyword recognition can initiate interaction, while the README associates online AI features with external services. It does not establish that speech transcription, language-model inference or speech generation can operate entirely offline.

Documented setup

The source setup begins by cloning the repository and entering its directory. The README gives uv sync for the base installation, described as GPIO mode on Linux. For a terminal interface, it gives uv sync --extra tui followed by python main.py --mode tui. The default graphical launch, python main.py, requires uv sync --extra gui first.

pip alternatives include pip install -e . for the base installation and pip install -e '.[tui]' or pip install -e '.[gui]' for interface extras. WebSocket is the default transport; --protocol mqtt selects MQTT. Installed entry points include xiaozhi --mode tui and python -m src --mode tui.

Backend endpoints, credentials and activation procedures are not explained in the supplied README. It directs readers to the project documentation at [https://huangjunsen0406.github.io/py-xiaozhi/] and advises reinstalling dependencies after updates.

Illustrative use

An illustrative application is a Linux terminal assistant that wakes on a local keyword and accepts a question about the view from a connected camera. This combines the README's documented wake-word, audio-streaming and camera capabilities.

That design would need the terminal extra, suitable wake-word models, microphone, speaker, camera and a configured AI service supporting the intended interaction. The README does not supply a complete implementation or demonstrate an answer for this scenario.

Assessment & evidence

Limits and unknowns

The README claims sub-20 ms latency and 5 ms audio processing, but supplies no measurement method, hardware conditions or benchmark results. These figures do not establish end-to-end conversation response time.

Encrypted transport, certificate verification, device authentication and tool permission management are described without implementation evidence. Provider data retention, exact data destinations and detailed tool permission boundaries are not specified.

The documented wheel check covers entry points and resources with only platformdirs installed alongside the wheel. The README explicitly excludes audio hardware, GUI rendering and the full runtime dependency set from that check. Its CI descriptions therefore do not establish a complete working assistant on any particular device.

Adoption tradeoffs

The architecture fits projects that need several interaction methods within one Python application and whose developers can manage services, dependencies and hardware integration. Documented extension points include adding MCP tool modules, implementing the Protocol abstraction and extending plugins.

The evidence is insufficient for requirements such as fully offline conversation, guaranteed response times or a complete hosted-service setup. A project depending on those properties would need additional technical evidence before treating py-xiaozhi as a suitable foundation.

Related options

The README identifies xiaozhi-desktop at [https://xiaozhi.junsen.online] as a related Electron client and attributes echo cancellation, Live2D, floating windows and Windows/macOS installers to it. This makes it a lead for readers seeking a packaged desktop interface, although its installation quality and feature parity are not established here.

It also names xiaozhi-esp32 at [https://github.com/78/xiaozhi-esp32] as its firmware predecessor, making that a lead for ESP32-focused projects. Neither related project's implementation, compatibility or costs are covered by the supplied evidence.

Evidence and source limits

The technical evidence is the complete README captured at repository revision d3705207de777409ee4634d454e8602c38daad9f, available at [https://raw.githubusercontent.com/huangjunsen0406/py-xiaozhi/d3705207de777409ee4634d454e8602c38daad9f/README.md]. The accompanying LICENSE supplies the rights evidence.

Implementation files, dependency manifests, linked guides, demonstrations, release artifacts and CI results are not supplied. Documentation establishes what the project describes, while actual behavior, performance and implementation quality remain unassessed.

Access & freshness

Costs

The supplied material gives no AI service prices, usage allowances, rate limits or operating-cost estimates. Exact service costs remain unknown. Sponsor advertisements do not establish which provider the application requires or what using it costs.

The MIT licence permits use and commercial distribution, but does not establish that connected services, hardware or other components are free. Computer or board costs, optional peripherals, network access and any provider charges are not quantified.

Licence and reuse

The accompanying MIT License names Junsen as the 2025 copyright holder. It permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notices remain in copies or substantial portions.

The licence disclaims warranties and limits the authors' liability. Separate terms for third-party native libraries, model files and connected services are not supplied, so their redistribution and usage conditions remain unknown.

Version and freshness

The supplied snapshot was captured on 13 November 2026 at 22:24:46.953 UTC and is pinned to revision d3705207de777409ee4634d454e8602c38daad9f. That identifies the documented source state; it is not a release version or evidence of a release date.

The README links to the latest release and describes main as containing the latest code, but the supplied text does not resolve a release number. Later changes, current dependency compatibility and whether the moving main address still matches this snapshot are unknown.

Before adopting

Choose the intended interface, transport and target hardware, then confirm Python and native audio dependency compatibility. Establish which AI service to use, its endpoint and activation requirements, supported models, prices and data-handling terms. These details are necessary to resolve the README's main deployment gaps.

Use the linked project documentation for configuration details, and evaluate microphone capture, speech playback, camera access and reconnection on the intended device before relying on them. For redistribution, retain the MIT notice and establish the separate terms of any bundled dependencies or model files.

Evidence for this report

LICENSEnotice · checked 2026-11-13
README.mdselected · checked 2026-11-13