Skip to content

1. 基于Linux 平台

注意

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

▫️环境安装

shell
sudo apt-get install git gcc make python3 python3-pip python3-numpy ffmpeg libopus0 libopus-dev

▫️克隆仓库

shell
git clone https://gitee.com/Ai-Thinker-Open/aipi-palchatv1.git
克隆完成示例:

alt text

▫️运行环境安装脚本

  • 进入SDK
shell
cd aipi-palchatv1
  • 运行脚本
shell
./prebuild-check.sh
安装完成示例:

alt text

▫️编译测试

shell
make -j
编译完成示例:

alt text

2. Windows 平台

❤️温馨提示

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

▫️安装Linxu 子系统

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

shell
wsl --install
安装完成示例:

alt text

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

▫️安装Ubtuntu20.04

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

shell
 wsl --install -d Ubuntu-20.04
安装完成示例,根据提示新建用户名和密码即可:

alt text

▫️VSCode 安装WSL 集成

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

点击展开:

alt text

▫️VSCode 打开 WSL

VSCode 的搜索栏输入:>WSL 选择 WSL:连接到WSL,如图:

点击展开:

alt text

❤️在首次连接WSL时,会下载 VSCode 服务器,要保持电脑网路正常,连接成功示例,如下图:

alt text

▫️更换软件源

  • 用 终端使用下方指令:
shell
sudo vi /etc/apt/sources.list
  • 把内容全部替换为下方的源地址:
清华源:ubuntu20.04
shell
# 默认注释了源码镜像以提高 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
阿里源:ubuntu20.04
shell
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
中科大源:ubuntu20.04
shell
# 默认注释了源码仓库,如有需要可自行取消注释
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

▫️更新源

  • 更新源
shell
sudo apt update
  • 更新软件
shell
sudo apt upgrade

▫️安装依赖

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

▫️克隆仓库

请从 克隆仓库 开始

Released under the MIT License.