语音摘要
语音摘要系统包括两个部分组成,第一个部分是whisper引擎,第二个部分是webui。下面介绍如何安装语音摘要系统。
下载项目
cd /data进入data目录,在此目录下安装whisper引擎。git clone -b release https://github.com/JKay0327/whisper-TPU_py拉取最新的whisper引擎。- 从百度网盘下载whisper所需的bmodel文件
https://pan.baidu.com/s/1IakvYn9dWkg3mmxEo9medA?pwd=k4ih,然后将bmodel文件夹移动到/data/whisper-TPU_py/下。 - 从百度网盘下载chatglm2所需的bmodel文件
https://pan.baidu.com/s/1i5r1RLnWRXbSL1KbDnqq-A?pwd=nffa,然后将chatglm-int8-1024文件夹拷贝到/data/下。 cd /data进入data目录,在此目录下安装webui。git clone https://github.com/zhengorange/Whisper-WebUI.git拉取最新的webui。
新建虚拟环境
cd /data/whisper-TPU_py进入项目文件夹。- 若当前pip环境没有virtualenv,请先安装virtualenv,执行
pip3 install virtualenv -i https://pypi.tuna.tsinghua.edu.cn/simple,若当前环境已有virtualenv,跳过此步骤。 virtualenv whisper新建一个名叫whisper的虚拟环境。source whisper/bin/activate激活whisper环境。
安装依赖
cd /data/whisper-TPU_py进入项目文件夹。pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simplepython setup.py installexport LOG_LEVEL=-1cd /data/Whisper-WebUI进入项目文件夹。pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
启动项目
请检查当前终端是否激活whisper虚拟环境,若没有,请执行
source ../whisper-TPU_py/whisper/bin/activate
激活whipser环境。
执行 python main.py 启动项目。
退出当前环境
deactivate