← all repositories
yihong0618/xiaogpt

Turning Xiaomi’s Smart Speaker Into a Voice GPT Client

It turns a Xiaomi AI Speaker into a voice terminal for ChatGPT and other LLMs by hijacking its queries and piping back smarter answers.

6.9k stars Python Chat AssistantsLanguage Models
xiaogpt
Not currently ranked — collecting fresh signals.
star history

What it does

xiaogpt is a Python bridge that sits between your Xiaomi AI Speaker and a roster of large language models. When you ask the speaker for help, it intercepts the query, forwards it to an external LLM API—such as OpenAI, Gemini, or Moonshot—and pushes the generated response back to the device for text-to-speech playback. In short, it replaces the stock Xiao Ai brain with whatever model you prefer.

The interesting bit

The project avoids rooting the hardware entirely; it simply logs into your Xiaomi account and piggybacks on the existing cloud conversation traffic, using either the internal ubus RPC or a fallback command channel to inject answers. The author also wired up third-party TTS engines like Microsoft Edge, Fish Audio, and Azure, presumably because the stock voice is better suited for weather updates than reading long LLM essays.

Key highlights

  • Backend agnostic: supports ChatGPT, New Bing, Gemini, ChatGLM, Doubao, Moonshot, 01, Llama3 via Groq, and Tongyi Qianwen.
  • Can mute the native Xiao Ai response entirely, so only the LLM voice replies.
  • Continuous conversation mode and streaming responses for faster, more natural dialogue.
  • Optional LangChain integration with SerpAPI for live web search and math (stream mode only).
  • Swappable TTS providers including Edge, OpenAI, Azure, and Fish Audio.

Caveats

  • Setup is fiddly: you need your speaker’s hardware ID, Xiaomi account credentials or a manually sniffed cookie, plus separate API keys for every LLM backend.
  • The documentation is almost entirely in Chinese, so non-readers will be relying on translation tools.
  • Feature support varies by device; some speakers need the --use_command fallback instead of the default ubus channel, and LangChain mode currently requires streaming to be enabled.

Verdict

A fun weekend project for Chinese-speaking tinkerers who already own a Xiaomi speaker and want a cheap, ambient LLM terminal. Everyone else should probably just buy a dedicated smart display or use their phone.

Frequently asked

What is yihong0618/xiaogpt?
It turns a Xiaomi AI Speaker into a voice terminal for ChatGPT and other LLMs by hijacking its queries and piping back smarter answers.
Is xiaogpt open source?
Yes — yihong0618/xiaogpt is open source, released under the MIT license.
What language is xiaogpt written in?
yihong0618/xiaogpt is primarily written in Python.
How popular is xiaogpt?
yihong0618/xiaogpt has 6.9k stars on GitHub.
Where can I find xiaogpt?
yihong0618/xiaogpt is on GitHub at https://github.com/yihong0618/xiaogpt.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.