# 环境安装
1. sudo apt-get install libncurses5-dev
# 配置和编译
### 关键代码 和 npu模型 在 sram 中运行, 非关键代码在 flash 中运行, 可支持的 npu 模型大小可以到 160 KB
1. cp configs/grus_gx8002b_dev_1v_tmjl_demo.config .config
2. make menuconfig
3. make
# 公版耳机指令编译
1. 解压algorithmPackage目录内的zh_vui.zip或en_vui.zip到lvp_tws目录下, 下面举例编译中文版本的固件:(编译英文版本的固件仅2、3、4步有差异)
2. cd lvp_tws
3. cp zh_vui/libvui.a lib
4. cp zh_vui/vuiconf.h include/vui
5. cp zh_vui/.config .config
6. make novuiconfig 保存退出
7. make clean;make
中文指令:
1. 小爱同学
2. 接听电话
3. 挂掉电话
4. 挂断电话
5. 上一首
6. 下一首
7. 暂停播放
8. 停止播放
9. 播放音乐
10. 增大音量
11. 减小音量
英文指令:
1. hey siri
2. ok google
3. answer the phone
4. play music
5. play next song
6. play previous song
7. reject the call
8. stop playing
9. volume down
10. volume up
# 公版SED示例编译
## 婴儿哭声检测
1. cp configs/release/nationalchip/grus_gx8002b_dev_1v_sed_0_1_1.config .config
2. make menuconfig # 保存退出
3. make clean;make
4. 烧录运行后播放lvp/vui/sed/resource/Snoring_1_115.wav 可观察到相应的串口log和led1亮
## 鼾声检测
1. cp configs/release/nationalchip/grus_gx8002b_dev_1v_sed_1_0_2.config .config
2. make menuconfig # 保存退出
3. make clean;make
4. 烧录运行后播放lvp/vui/sed/resource/BabyCrying_test_0_1.wav 可观察到相应的串口log和led2亮
# 固件烧录
1. cd tools/bootx/
2. sudo ./bootx -m grus -c download 0x0 ../../output/mcu_nor.bin -d /dev/ttyUSB0
3. 重启设备,等待烧录完成
4. 打开串口终端,重启设备,查看串口输出
# 工具链下载和安装
### 工具链下载地址:https://ai.nationalchip.com/api/v1/assets/32/download
### 安装:
1. sudo mkdir -p /opt/csky-abiv2-elf/; cd /opt/csky-abiv2-elf/; 新建并进入路径
2. sudo tar xvf csky-elfabiv2-tools-x86_64-minilibc-*.tar.gz; 解压到当前路径
3. 然后需要编辑 ~/.profile或者 ~/.bashrc,将/opt/csky-abiv2-elf/bin加入到PATH路径中

1292

被折叠的 条评论
为什么被折叠?



