Image in article

Step-by-step guide to freely integrate AI large models into Xiaomi smart speakers, no coding required, beginner-friendly detailed tutorial!

Step-by-step guide to freely integrate AI large models into Xiaomi smart speakers, no coding required, beginner-friendly detailed tutorial!

字数 1026阅读时长 3 分钟
2024-11-9
2026-3-19
type
status
date
summary
tags
category
slug
icon
password
公众号
关键词
小宇宙播客
小红书
数字人视频号
笔记

Step-by-Step Guide: Connect AI Large Language Models to Xiaomi Smart Speaker for Free - No Coding Required, Beginner-Friendly Detailed Tutorial!

- This article is from Equity AI
notion image
This tutorial covers how to integrate Large Language Models (AI) into Xiaoai Smart Speaker.
This tutorial comes from a contribution by @䦜, who has no computer science or coding background whatsoever, but with the help of large language models, completed the entire integration process.
From a beginner's perspective, they've summarized the steps into a practical beginner-level tutorial, lowering the barrier to entry.
Plus, they repeated the process twice following these exact steps to ensure it works.
So if you're interested but worried about your technical background, go ahead and give it a try - we're confident you can do it too!
This tutorial takes about 35 minutes once you're familiar with it. We recommend following and bookmarking first so you don't lose it.
Original Tutorial:

Official Project Description:
Project address:
Official tutorial video: (not very beginner-friendly) https://www.bilibili.com/video/BV1N1421y7qn/?share_source=copy_web&vd_source=5d4e78ff2a0dc6a661baa65f479199c1
Video companion PPT file on Lanzou Cloud: https://www.lanzout.com/iLHm2238xf5c
Aliyun Drive: https://www.alipan.com/s/Yf2RQvN961T

Supported Xiaomi speaker device models

✅ Runs perfectly

Known Xiaoai speaker models that can run Mi-GPT perfectly:
名称
型号
ttsCommand
wakeUpCommand
playingCommand
streamResponse
反馈来源
小爱音箱 Pro
LX06
\[5, 1\]
\[5, 3\]
-
TRUE
@idootop
小爱音箱 mini
LX01
\[5, 1\]
\[5, 2\]
\[4, 1, 1\]
TRUE
@gsscsd
小爱音箱 Play(2019 款)
LX05
\[5, 1\]
\[5, 3\]
\[3, 1, 1\]
TRUE
@wt666666
小爱音箱 万能遥控版
LX5A
\[5, 1\]
\[5, 3\]
-
TRUE
@imhsz
小米 AI 音箱
S12
\[5, 1\]
\[5, 3\]
-
TRUE
微信: CMSJ
小米 AI 音箱(第二代)
L15A
\[7, 3\]
\[7, 1\]
\[3, 1, 1\]
TRUE
微信: 龙之广
小爱智能家庭屏 10
X10A
\[7, 3\]
\[7, 1\]
-
TRUE
@IDarkBoss
Xiaomi Sound Pro
L17A
\[7, 3\]
\[7, 1\]
-
TRUE
微信: eof

? Runs normally

Some models' MIoT interface doesn't support querying device playback status or has abnormal status queries, such as the Xiaomi Speaker Play Enhanced Edition (L05C), which will cause some MiGPT functions to be abnormal and unable to use continuous conversation, etc. In this case, you need to disable streamResponse.
Xiaoai speaker models that can run Mi-GPT normally but don't support continuous conversation:
名称
型号
ttsCommand
wakeUpCommand
playingCommand
streamResponse
反馈来源
小爱音箱
L06A
\[5, 1\]
\[5, 2\]
-
FALSE
@zhanglc
小爱音箱 Play
L05B
\[5, 3\]
\[5, 1\]
-
FALSE
@BiuBiu2323
小米小爱音箱 Play 增强版
L05C
\[5, 3\]
\[5, 1\]
-
FALSE
@lyddias
Xiaomi 智能家庭屏 6
X6A
\[7, 3\]
\[7, 1\]
-
FALSE
@Hongwing
Redmi 小爱触屏音箱 Pro 8 英寸
X08E
\[7, 3\]
\[7, 1\]
-
FALSE
@shangjiyu
小爱音箱 Art
L09A
\[3, 1\]
\[3, 2\]
-
FALSE
@zwsn
小爱触屏音箱
LX04
\[5, 1\]
\[5, 2\]
-
FALSE
@ilovesouthpark

❌ Not supported

Xiaoai speaker models that are completely incompatible with MiGPT:
名称
型号
反馈来源
小米小爱音箱 HD
SM4
@romantech
小米小爱蓝牙音箱随身版
-
微信: 明天

Example devices: I'm using the Xiaomi AI Speaker Gen 1, S12

  • First, just look at the model number and check if your Xiaomi speaker model is in the list above

Local Deployment Tutorial (Node.js)

  • This solution requires your computer to keep the migpt service running at all times. Once you turn off the computer, the large language model stops working. You can think of Xiaoai as your computer speaker, but one that can answer questions anytime - actually pretty interesting

Preparation complete, deployment begins:

Step 1: Software and environment configuration needed on your computer:

  • Python 3.8 or above (https://www.python.org/)
  • Github account required (https://github.com/)
  • GitHub is often inaccessible. You can download Steam++, https://steampp.net/
  • For installation instructions, refer to Teacher Dayu's tutorial: Install VSCode, NodeJS, Git, etc. on your local computer
Please install the above software on your own (link: https://waytoagi.feishu.cn/wiki/EJuiwrcJCi8uW1kTutrcBtBlnyc) **Important! After installation, you need to configure the environment, otherwise errors will occur during the deployment process**
  1. Search for windows powershell
notion image
  1. Run as administrator to enter the command line tool page
notion image
notion image
  1. Enter the following command and press Enter
notion image
The first time you run it, the following window will pop up. When the execution policy change confirmation appears, enter A and press Enter to confirm, then close the run window
notion image
  • In this step, we're installing software and configuring the basic environment

Step 2: Prepare the Xiaomi speaker

  1. Check the model of your Xiaomi speaker
  1. Model 1: Xiaomi AI Speaker (1st Generation), according to the table mentioned above, the model code is S12 (if the bottom label is inconsistent, please refer to the model code in the table)
notion image
notion image
  1. Model 2: Xiaomi AI Speaker (2nd Generation), model code is L15A (check the bottom label)
notion image
notion image
  1. Download the Mi Home APP or Xiaoai Speaker APP on your phone. Here are a few parameters to remember:
  • Xiaomi Account: After logging into Mi Home or Xiaoai Speaker APP, you can see the ID in the "My" interface. Mine here is a string of numbers starting with 9
notion image
notion image
  • Remember the password for logging into your Xiaomi account: Make sure to log in using the password, as you'll need it for configuration later
  • Configure the speaker device through Mi Home APP or Xiaoai Speaker APP, connect it to your home network. Please ensure the network you're connected to is on the same LAN as your computer
  • Remember the speaker's name: Mine here is Xiaomi AI Speaker
notion image
notion image
  • At this step, the parameters we need are: Xiaomi UID, login password, and the speaker's bound name. The name I bound here is Xiaomi AI Speaker

Step 3: Apply for the large model's API interface, using Silicon as an example

  • Official tutorial documentation for API integration:
  • Taking the silicon API I typically use as an example, there are numerous open-source models (Yi, Qwen, Llama, Gemma, etc.) available for free. It also comes with a 14 yuan trial credit with an unknown expiration date - in my opinion, this is the most convenient and affordable API interface out there
  • silicon registration and usage URL: