You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
3.6 KiB

3 months ago
### 一、相关文档
1. [视频教程:小智$ai$服务端本地部署完整教程,支持$DeepSeek$接入](https://www.bilibili.com/video/BV1GvQWYZEd2/)
2. [固件开源地址](https://github.com/78/xiaozhi-esp32)
3. [服务端开源地址](https://github.com/xinnan-tech/xiaozhi-esp32-server)
4. [Windows搭建 ESP IDF 5.3.2开发环境以及编译小智](https://icnynnzcwou8.feishu.cn/wiki/JEYDwTTALi5s2zkGlFGcDiRknXf)
5. [小智 AI 聊天机器人百科全书](
https://ccnphfhqs21z.feishu.cn/wiki/F5krwD16viZoF0kKkvDcrZNYnhb)
6. [购买店铺链接](https://docs.qq.com/sheet/DWmRhbnVHSnRWc2xz?tab=vajqu5)
### 二、部署
```shell
conda remove -n xiaozhi-esp32-server --all -y
conda create -n xiaozhi-esp32-server python=3.10 -y
conda activate xiaozhi-esp32-server
# 音频的编码解码库
conda install libopus -y
conda install ffmpeg -y
# 安装音频处理工具,录制,转码,剪辑等
https://opus-codec.org/downloads/
下载 Windows 版本的 DLL 文件(通常是 opus.dll
将下载的 DLL 文件放在以下位置之一:
系统目录(如 C:\Windows\System32
```
``` python
if lib_location is None:
lib_location = r'D:\anaconda3\envs\xiaozhi-esp32-server\Lib\site-packages\libopus_v1.4_msvc17\bin\x64\opus.dll'
```
进入到你的项目根目录再进入main/xiaozhi-server
```powershell
d:
cd D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32-server\main\xiaozhi-server
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip install -r requirements.txt
```
**下载语音识别模型文件**
> 下载地址https://pan.baidu.com/share/init?surl=QlgM58FHhYv1tFnUT_A8Sg&pwd=qvna
将model.pt 放到
D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32-server\main\xiaozhi-server\models\SenseVoiceSmall
**配置项目**
如果你的xiaozhi-server目录没有data你需要创建data目录。如果你的data下面没有.config.yaml文件你可以把源码目录下的config.yaml文件复制一份重命名为.config.yaml
### 三、注册
http://10.10.21.20:8001/#/home
huanghai
DsideaL@123
### 四、修改固件
编译esp32固件
https://github.com/TOM88812/xiaozhi-esp32-server/blob/main/docs/firmware-build.md
**实验材料**
处理器型号 ESP32-S3-N16R8
屏幕 128*32
**步骤1**
双击桌面上的ESP-IDF 5.3 PowerShell 快捷方式
**步骤2**
**修改WEB服务地址**
3 months ago
3 months ago
```
D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32\main\Kconfig.projbuild
```
```yaml
config WEBSOCKET_URL
depends on CONNECTION_TYPE_WEBSOCKET
string "Websocket URL"
default "ws://192.168.1.20:8000/xiaozhi/v1/"
help
Communication with the server through websocket after wake up.
# 清空OTA地址
config OTA_VERSION_URL
string "OTA Version URL"
default ""
help
The application will access this URL to check for updates.
# 修改默认连接方式
choice CONNECTION_TYPE
prompt "Connection Type"
default CONNECTION_TYPE_WEBSOCKET
help
网络数据传输协议
config CONNECTION_TYPE_MQTT_UDP
bool "MQTT + UDP"
config CONNECTION_TYPE_WEBSOCKET
bool "Websocket"
endchoice
```
**设定目标板**
```
3 months ago
d:
cd D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32
3 months ago
idf.py set-target esp32s3
```
**进入配置界面**
```
idf.py menuconfig
```
进入Xiaozhi Assistant选项
配置一下
3 months ago
Board Type: BOARD_TYPE_BREAD_COMPACT_WIFI
DISPLAY_OLED_TYPE:OLED_SSD1306_128X32
3 months ago
**编译固件**
```
idf.py build
```
**打包bin固件**
3 months ago
3 months ago
```
cd scripts
python release.py
```
**打包后的产物**
D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32\build\merged-binary.bin