About xiaogpt
Xiaogpt is an open-source Python tool that enables users to interact with Xiaomi AI Speakers using various large language models (LLMs) such as ChatGPT, Google Gemini, Moonshot, Llama3, and more. It supports multiple TTS engines (Edge, Fish Audio, OpenAI, Azure) for natural voice responses, streaming for faster interactions, and optional muting of Xiaoai's default replies. The tool requires a Xiaomi account and device ID for setup, and can be configured via command-line arguments. It is designed to be flexible, allowing users to choose their preferred LLM backend and TTS provider.
Key Features
Supports multiple AI backends: ChatGPT, New Bing, ChatGLM, Gemini, Doubao, Moonshot, Yi (01), Llama3, Tongyi Qianwen
Multiple TTS engines: Edge, Fish Audio, OpenAI, Azure
Streaming mode for faster responses
Option to mute Xiaoai's default replies
LangChain integration for internet search and computations
Command-line interface with environment variable configuration
Continuous conversation mode (start/stop)
Docker support
Open-source under MIT license
Pros & Cons
Pros
- Open-source and free to use
- Supports a wide range of popular LLMs and TTS engines
- Active development with frequent updates (6.9k stars on GitHub)
- Easy to set up with pip installation and command-line usage
- Flexible configuration for advanced users (custom API base, LangChain, etc.)
Cons
- Requires a Xiaomi account and device DID, which may involve some initial setup and network troubleshooting
- Dependent on third-party LLM API keys and services (e.g., OpenAI, Gemini)
- Limited to Xiaomi AI Speaker hardware
Best For
Enhance Xiaomi AI Speaker with ChatGPT or other LLMs for smarter voice interactionsVoice-controlled conversational AI for home automation and personal assistantPrototyping and experimenting with different LLMs and TTS services on smart speakers
FAQ
How do I get my Xiaomi speaker's DID?
Run `micli list` after installing the required miservice_fork package and setting MI_USER and MI_PASS environment variables. If you encounter errors, try switching your Wi-Fi network.
What AI models does xiaogpt support?
It supports ChatGPT, New Bing, ChatGLM, Gemini, Doubao, Moonshot, Yi (01), Llama3, and Tongyi Qianwen.
Can I use xiaogpt without a ChatGPT API key?
Yes, you can use other supported LLMs like Gemini, Moonshot, or Llama3 by providing their respective API keys.
How do I enable continuous conversation?
You can say '开始持续对话' to start continuous conversation mode and '结束持续对话' to end it.