3.6 KiB
一、相关文档
二、部署
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)
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
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服务地址
D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32\main\Kconfig.projbuild
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
设定目标板
d:
cd D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32
idf.py set-target esp32s3
进入配置界面
idf.py menuconfig
进入Xiaozhi Assistant选项 配置一下
Board Type: BOARD_TYPE_BREAD_COMPACT_WIFI
DISPLAY_OLED_TYPE:OLED_SSD1306_128X32
编译固件
idf.py build
打包bin固件
cd scripts
python release.py
打包后的产物 D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32\build\merged-binary.bin