xiaozhi-esp32-server在linux下源码安装
一、安装conda
wget https://repo.anaconda.com/archive/Anaconda3-2023.07-2-Linux-x86_64.sh
bash Anaconda3-2023.07-2-Linux-x86_64.sh
二、重启终端,安装依赖
conda remove -n xiaozhi-esp32-server --all -y
conda create -n xiaozhi-esp32-server python=3.10 -y
conda activate xiaozhi-esp32-server
# 添加清华源通道 不添加也行
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda install libopus -y
conda install ffmpeg -y
三、下载源码,并安装依赖
git clone https://github.com/xinnan-tech/xiaozhi-esp32-server.git
# 继续使用conda环境,已激活的可以不用再激活
conda activate xiaozhi-esp32-server
cd xiaozhi-esp32-server/main/xiaozhi-server
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip install -r requirements.txt
四、下载语音识别模型文件到项目里models/SenseVoiceSmall
cd models/SenseVoiceSmall/
wget https://modelscope.cn/models/iic/SenseVoiceSmall/resolve/master/model.pt
五、配置
#先回到xiaozhi-server
cd ../../
mkdir -p data && \
cp -n config.yaml data/.config.yaml
vim data/.config.yaml
默认接入是智普的大模型平台,要换成自己的api_key。
六、启动测试
python app.py