AI语音开发板AiPi-PalChatV1教程:二次开发

描述

AiPi-PalChatV1 是一款接入了小智AI智能体的微型语音交互开发板,专为轻量级智能语音场景设计。

基于安信可 Ai-WB2-12F 模组主控,具备高集成度、高性价比等特性,支持离线语音唤醒语音打断功能,结合2W/8Ω 扬声器与双供电模式(Type-C + 电池),适用于快速部署语音交互能力的硬件创新场景。

开发板

Linux 平台

请根据以下步骤逐步操作。

环境安装

sudo apt-get install git gcc make python3 python3-pip

克隆仓库

git clone https://gitee.com/Ai-Thinker-Open/xiaoan-ai_wb2.git

克隆完成实例

开发板

运行环境安装脚本

进入SDK

cd xiaoan-ai_wb2

运行脚本

./prebuild-check.sh

成功示例

开发板

编译测试

make -j

编译成功示例

开发板

Windows 平台

推荐使用WSL(Windows下的Linux 子系统)进行开发

安装Linxu 子系统

使用 以管理员身份运行 PowerShell。在 PowerShell 下方指令安装Linux 子系统

wsl --install

成功示例:

开发板

重启电脑(记得保存资料)

安装Ubtuntu20.04

按住 shift+鼠标右键 重新打开 PowerShell,运行下发指令安装 Ubutun20.04:

wsl --install -d Ubuntu-20.04

示例:

开发板

根据提示新建用户名和密码即可

VSCode 安装WSL 集成

在VSCode 集成中搜索 WSL,并且安装:

开发板

VSCode 打开WSL

在VSCode 的搜索栏输入:>WSL 选择 WSL:连接到WSL

开发板

在首次连接WSL时,会下载 VSCode 服务器,要保持电脑网路正常

连接成功示例

更换软件源

开发板

用 终端使用下方指令:

sudo vi /etc/apt/sources.list

把内容全部替换为下方的源地址:

清华源

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse #

以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换

deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse # deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse

阿里源

deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

中科大源

# 默认注释了源码仓库,如有需要可自行取消注释
deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

示例(阿里源)

更新源

开发板

sudo apt update

升级源

sudo apt upgrade

安装开发依赖

sudo apt-get install git gcc make python3 python3-pip

审核编辑 黄宇

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分