mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
Update firmware-build.md
This commit is contained in:
parent
93588db604
commit
38b8211dcc
1 changed files with 56 additions and 56 deletions
|
|
@ -1,62 +1,62 @@
|
||||||
# esp32固件编译
|
# esp32 firmware compilation
|
||||||
|
|
||||||
## 第1步 准备你的ota地址
|
## Step 1 Prepare your OTA address
|
||||||
|
|
||||||
如果你,使用的是本项目0.3.12版本,不管是简单Server部署还是全模块部署,都会有ota地址。
|
If you are using version 0.3.12 of this project, whether it is a simple server deployment or a full module deployment, there will be an ota address.
|
||||||
|
|
||||||
由于简单Server部署和全模块部署的OTA地址设置方式不一样,请你选择下面的具体方式:
|
Since the OTA address setting methods for simple server deployment and full module deployment are different, please choose the specific method below:
|
||||||
|
|
||||||
### 如果你用的是简单Server部署
|
### If you are using simple server deployment
|
||||||
此刻,请你用浏览器打开你的ota地址,例如我的ota地址
|
At this moment, please use your browser to open your OTA address, for example my OTA address
|
||||||
```
|
```
|
||||||
http://192.168.1.25:8003/xiaozhi/ota/
|
http://192.168.1.25:8003/xiaozhi/ota/
|
||||||
```
|
```
|
||||||
如果显示“OTA接口运行正常,向设备发送的websocket地址是:ws://xxx:8000/xiaozhi/v1/
|
If it displays "OTA interface is running normally, the websocket address sent to the device is: ws://xxx:8000/xiaozhi/v1/
|
||||||
|
|
||||||
你可以使用项目自带的`test_page.html`测试一下,是否能连上ota页面输出的websocket地址。
|
You can use the `test_page.html` that comes with the project to test whether you can connect to the websocket address output by the ota page.
|
||||||
|
|
||||||
如果访问不到,你需要到配置文件`.config.yaml`里修改`server.websocket`的地址,重启后再重新测试,直到`test_page.html`能正常访问。
|
If you cannot access it, you need to modify the address of `server.websocket` in the configuration file `.config.yaml`, restart and test again until `test_page.html` can be accessed normally.
|
||||||
|
|
||||||
成功后,请往下进行第2步
|
After success, please proceed to step 2
|
||||||
|
|
||||||
### 如果你用的是全模块部署
|
### If you are using full module deployment
|
||||||
此刻,请你用浏览器打开你的ota地址,例如我的ota地址
|
At this moment, please use your browser to open your OTA address, for example my OTA address
|
||||||
```
|
```
|
||||||
http://192.168.1.25:8002/xiaozhi/ota/
|
http://192.168.1.25:8002/xiaozhi/ota/
|
||||||
```
|
```
|
||||||
|
|
||||||
如果显示“OTA接口运行正常,websocket集群数量:X”。那就往下进行2步。
|
If it displays "OTA interface is running normally, number of websocket clusters: X", proceed to step 2.
|
||||||
|
|
||||||
如果显示“OTA接口运行不正常”,大概是你还没在`智控台`配置`Websocket`地址。那就:
|
If it shows "OTA interface is not running properly", it is probably because you have not configured the `Websocket` address in the `Smart Console`. Then:
|
||||||
|
|
||||||
- 1、使用超级管理员登录智控台
|
- 1. Log in to the smart console as a super administrator
|
||||||
|
|
||||||
- 2、顶部菜单点击`参数管理`
|
- 2. Click `Parameter Management` in the top menu
|
||||||
|
|
||||||
- 3、在列表中找到`server.websocket`项目,输入你的`Websocket`地址。例如我的就是
|
- 3. Find the `server.websocket` item in the list and enter your `Websocket` address. For example, mine is
|
||||||
|
|
||||||
```
|
```
|
||||||
ws://192.168.1.25:8000/xiaozhi/v1/
|
ws://192.168.1.25:8000/xiaozhi/v1/
|
||||||
```
|
```
|
||||||
|
|
||||||
配置完后,再使用浏览器刷新你的ota接口地址,看看是不是正常了。如果还不正常就,就再次确认一下Websocket是否正常启动,是否配置了Websocket地址。
|
After configuration, use the browser to refresh your OTA interface address to see if it is normal. If it is still not normal, please confirm again whether the Websocket is started normally and whether the Websocket address is configured.
|
||||||
|
|
||||||
## 第2步 配置环境
|
## Step 2 Configure the environment
|
||||||
先按照这个教程配置项目环境[《Windows搭建 ESP IDF 5.3.2开发环境以及编译小智》](https://icnynnzcwou8.feishu.cn/wiki/JEYDwTTALi5s2zkGlFGcDiRknXf)
|
First, configure the project environment according to this tutorial ["Building ESP IDF 5.3.2 Development Environment and Compiling Xiaozhi on Windows"](https://icnynnzcwou8.feishu.cn/wiki/JEYDwTTALi5s2zkGlFGcDiRknXf)
|
||||||
|
|
||||||
## 第3步 打开配置文件
|
## Step 3 Open the configuration file
|
||||||
配置好编译环境后,下载虾哥iaozhi-esp32项目源码,
|
After configuring the compilation environment, download the source code of the iaozhi-esp32 project.
|
||||||
|
|
||||||
从这里下载虾哥[xiaozhi-esp32项目源码](https://github.com/78/xiaozhi-esp32)。
|
Download the xiaozhi-esp32 project source code from here.
|
||||||
|
|
||||||
下载后,打开`xiaozhi-esp32/main/Kconfig.projbuild`文件。
|
After downloading, open the `xiaozhi-esp32/main/Kconfig.projbuild` file.
|
||||||
|
|
||||||
## 第4步 修改OTA地址
|
## Step 4 Modify the OTA address
|
||||||
|
|
||||||
找到`OTA_URL`的`default`的内容,把`https://api.tenclass.net/xiaozhi/ota/`
|
Find the `default` content of `OTA_URL` and replace `https://api.tenclass.net/xiaozhi/ota/`
|
||||||
改成你自己的地址,例如,我的接口地址是`http://192.168.1.25:8002/xiaozhi/ota/`,就把内容改成这个。
|
Change it to your own address. For example, my interface address is `http://192.168.1.25:8002/xiaozhi/ota/`, so change the content to this.
|
||||||
|
|
||||||
修改前:
|
Before modification:
|
||||||
```
|
```
|
||||||
config OTA_URL
|
config OTA_URL
|
||||||
string "Default OTA URL"
|
string "Default OTA URL"
|
||||||
|
|
@ -64,7 +64,7 @@ config OTA_URL
|
||||||
help
|
help
|
||||||
The application will access this URL to check for new firmwares and server address.
|
The application will access this URL to check for new firmwares and server address.
|
||||||
```
|
```
|
||||||
修改后:
|
After modification:
|
||||||
```
|
```
|
||||||
config OTA_URL
|
config OTA_URL
|
||||||
string "Default OTA URL"
|
string "Default OTA URL"
|
||||||
|
|
@ -73,66 +73,66 @@ config OTA_URL
|
||||||
The application will access this URL to check for new firmwares and server address.
|
The application will access this URL to check for new firmwares and server address.
|
||||||
```
|
```
|
||||||
|
|
||||||
## 第4步 设置编译参数
|
## Step 4 Set compilation parameters
|
||||||
|
|
||||||
设置编译参数
|
Set compilation parameters
|
||||||
|
|
||||||
```
|
```
|
||||||
# 终端命令行进入xiaozhi-esp32的根目录
|
# Enter the root directory of xiaozhi-esp32 in the terminal command line
|
||||||
cd xiaozhi-esp32
|
cd xiaozhi-esp32
|
||||||
# 例如我使用的板子是esp32s3,所以设置编译目标为esp32s3,如果你的板子是其他型号,请替换成对应的型号
|
# For example, the board I use is esp32s3, so set the compilation target to esp32s3. If your board is other models, please replace it with the corresponding model
|
||||||
idf.py set-target esp32s3
|
idf.py set-target esp32s3
|
||||||
# 进入菜单配置
|
# Enter menu configuration
|
||||||
idf.py menuconfig
|
idf.py menuconfig
|
||||||
```
|
```
|
||||||
|
|
||||||
进入菜单配置后,再进入`Xiaozhi Assistant`,将`BOARD_TYPE`设置你板子的具体型号
|
After entering the menu configuration, enter `Xiaozhi Assistant` and set `BOARD_TYPE` to the specific model of your board
|
||||||
保存退出,回到终端命令行。
|
Save and exit, returning to the terminal command line.
|
||||||
|
|
||||||
## 第5步 编译固件
|
## Step 5 Compile the firmware
|
||||||
|
|
||||||
```
|
```
|
||||||
idf.py build
|
idf.py build
|
||||||
```
|
```
|
||||||
|
|
||||||
## 第6步 打包bin固件
|
## Step 6: Pack the bin firmware
|
||||||
|
|
||||||
```
|
```
|
||||||
cd scripts
|
cd scripts
|
||||||
python release.py
|
python release.py
|
||||||
```
|
```
|
||||||
|
|
||||||
上面的打包命令执行完成后,会在项目根目录下的`build`目录下生成固件文件`merged-binary.bin`。
|
After the above packaging command is executed, the firmware file `merged-binary.bin` will be generated in the `build` directory under the project root directory.
|
||||||
这个`merged-binary.bin`就是要烧录到硬件上的固件文件。
|
This `merged-binary.bin` is the firmware file to be burned to the hardware.
|
||||||
|
|
||||||
注意:如果执行到第二命令后,报了“zip”相关的错误,请忽略这个错误,只要`build`目录下生成固件文件`merged-binary.bin`
|
Note: If a "zip" related error is reported after executing the second command, please ignore this error and just generate the firmware file `merged-binary.bin` in the `build` directory
|
||||||
,对你没有太大影响,请继续。
|
, it won’t have much impact on you, please continue.
|
||||||
|
|
||||||
## 第7步 烧录固件
|
## Step 7 Burn the firmware
|
||||||
将esp32设备连接电脑,使用chrome浏览器,打开以下网址
|
Connect the ESP32 device to the computer and use the Chrome browser to open the following URL
|
||||||
|
|
||||||
```
|
```
|
||||||
https://espressif.github.io/esp-launchpad/
|
https://espressif.github.io/esp-launchpad/
|
||||||
```
|
```
|
||||||
|
|
||||||
打开这个教程,[Flash工具/Web端烧录固件(无IDF开发环境)](https://ccnphfhqs21z.feishu.cn/wiki/Zpz4wXBtdimBrLk25WdcXzxcnNS)。
|
Open this tutorial, [Flash Tool/Web-based Firmware Burning (Without IDF Development Environment)](https://ccnphfhqs21z.feishu.cn/wiki/Zpz4wXBtdimBrLk25WdcXzxcnNS).
|
||||||
翻到:`方式二:ESP-Launchpad 浏览器WEB端烧录`,从`3. 烧录固件/下载到开发板`开始,按照教程操作。
|
Go to Method 2: ESP-Launchpad Web-based Programming and follow the instructions starting from 3. Programming/Downloading the Firmware to the Development Board.
|
||||||
|
|
||||||
烧录成功且联网成功后,通过唤醒词唤醒小智,留意server端输出的控制台信息。
|
After the program is successfully burned and the network is successfully connected, wake up Xiaozhi using the wake-up word and pay attention to the console information output by the server.
|
||||||
|
|
||||||
## 常见问题
|
## Frequently Asked Questions
|
||||||
以下是一些常见问题,供参考:
|
Here are some frequently asked questions for your reference:
|
||||||
|
|
||||||
[1、为什么我说的话,小智识别出来很多韩文、日文、英文](./FAQ.md)
|
[1. Why does Xiaozhi recognize a lot of Korean, Japanese, and English in my words?](./FAQ.md)
|
||||||
|
|
||||||
[2、为什么会出现“TTS 任务出错 文件不存在”?](./FAQ.md)
|
[2. Why does the error "TTS task error file does not exist" appear?](./FAQ.md)
|
||||||
|
|
||||||
[3、TTS 经常失败,经常超时](./FAQ.md)
|
[3. TTS often fails and times out](./FAQ.md)
|
||||||
|
|
||||||
[4、使用Wifi能连接自建服务器,但是4G模式却接不上](./FAQ.md)
|
[4. I can connect to my own server using Wi-Fi, but not 4G](./FAQ.md)
|
||||||
|
|
||||||
[5、如何提高小智对话响应速度?](./FAQ.md)
|
[5. How can I improve Xiaozhi's conversational response speed?](./FAQ.md)
|
||||||
|
|
||||||
[6、我说话很慢,停顿时小智老是抢话](./FAQ.md)
|
[6. I speak very slowly, and Xiaozhi always interrupts me when I pause.](./FAQ.md)
|
||||||
|
|
||||||
[7、我想通过小智控制电灯、空调、远程开关机等操作](./FAQ.md)
|
[7. I want to use Xiaozhi to control lights, air conditioning, remote power on and off, etc.](./FAQ.md)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue