update: 修改部署文档与依赖文档
This commit is contained in:
parent
5b3205e1b7
commit
646c188f78
79
README.md
79
README.md
|
@ -69,19 +69,76 @@ git clone http://43.132.157.186:3000/killua/TakwayPlatform.git
|
||||||
创建虚拟环境
|
创建虚拟环境
|
||||||
|
|
||||||
``` shell
|
``` shell
|
||||||
conda create -n takway
|
conda create -n takway python=3.9
|
||||||
conda activate takway
|
conda activate takway
|
||||||
```
|
```
|
||||||
|
|
||||||
安装pytorch和依赖
|
安装依赖
|
||||||
|
|
||||||
``` shell
|
``` shell
|
||||||
cd TakwayAI/
|
cd TakwayPlatform/
|
||||||
pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118
|
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
#### (3)安装FunASR
|
#### (3) 安装openvoice
|
||||||
|
|
||||||
|
如果你的本地环境可以科学上网,则直接运行下面两行指令
|
||||||
|
|
||||||
|
``` shell
|
||||||
|
pip install git+https://github.com/myshell-ai/MeloTTS.git
|
||||||
|
python -m unidic download
|
||||||
|
```
|
||||||
|
|
||||||
|
如果不能科学上网
|
||||||
|
|
||||||
|
则先运行
|
||||||
|
|
||||||
|
``` shell
|
||||||
|
pip install git+https://github.com/myshell-ai/MeloTTS.git
|
||||||
|
```
|
||||||
|
|
||||||
|
1. unidic安装
|
||||||
|
|
||||||
|
然后手动下载[unidic.zip](https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip),并手动改名为unidic.zip
|
||||||
|
|
||||||
|
这边以miniconda举例,如果用的是conda应该也是一样的
|
||||||
|
|
||||||
|
将unidic.zip拷贝入~/miniconda3/envs/takway/lib/python3.9/site-packages/unidic
|
||||||
|
|
||||||
|
cd进入~/miniconda3/envs/takway/lib/python3.9/site-packages/unidic
|
||||||
|
|
||||||
|
vim download.py
|
||||||
|
|
||||||
|
将函数download_version()中除了最后一行全部注释掉,并且把最后一行的download_and_clean()的两个参数任意修改,比如"hello","world"
|
||||||
|
|
||||||
|
再将download_and_clean()函数定义位置,注释掉该函数中的download_process()行
|
||||||
|
|
||||||
|
运行`python -m unidic download`
|
||||||
|
|
||||||
|
2. huggingface配置
|
||||||
|
|
||||||
|
运行命令
|
||||||
|
|
||||||
|
```shell
|
||||||
|
pip install -U huggingface_hub
|
||||||
|
export HF_ENDPOINT=https://hf-mirror.com
|
||||||
|
```
|
||||||
|
|
||||||
|
最好把`export HF_ENDPOINT=https://hf-mirror.com`写入~/.bashrc,不然每次重启控制台终端就会失效
|
||||||
|
|
||||||
|
3. nltk_data下载
|
||||||
|
|
||||||
|
在/miniconda3/envs/takway/下创建nltk_data文件夹
|
||||||
|
|
||||||
|
在nltk_data文件夹下创建corpora和taggers文件夹
|
||||||
|
|
||||||
|
手动下载[cmudict.zip](https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/corpora/cmudict.zip)和[averaged_perceptron_tragger.zip](https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/taggers/averaged_perceptron_tagger.zip)
|
||||||
|
|
||||||
|
将cmudict.zip放入corpora文件夹下
|
||||||
|
|
||||||
|
将averaged_perceptron_tragger.zip放入taggers文件夹下
|
||||||
|
|
||||||
|
#### (4) 安装FunASR
|
||||||
|
|
||||||
本项目使用的FunASRE在github上的FunASR的基础上做了一些修改
|
本项目使用的FunASRE在github上的FunASR的基础上做了一些修改
|
||||||
|
|
||||||
|
@ -91,14 +148,22 @@ cd FunASR/
|
||||||
pip install -v -e .
|
pip install -v -e .
|
||||||
```
|
```
|
||||||
|
|
||||||
#### (4) 修改配置
|
#### (5) 修改配置
|
||||||
|
|
||||||
1. 安装mysql,在mysql中创建名为takway的数据库
|
1. 安装mysql,在mysql中创建名为takway的数据库
|
||||||
2. 安装redis,将密码设置为takway
|
2. 安装redis,将密码设置为takway
|
||||||
3. 打开config中的development.py文件修改mysql和redis连接字符串
|
3. 打开config中的development.py文件修改mysql和redis连接字符串
|
||||||
|
|
||||||
#### (5) 导入vits模型
|
#### (6) 导入vits模型
|
||||||
|
|
||||||
在utils/tts/目录下,创建vits_model文件夹
|
在utils/tts/目录下,创建vits_model文件夹
|
||||||
|
|
||||||
从[链接](https://huggingface.co/spaces/zomehwh/vits-uma-genshin-honkai/tree/main/model)下载 vits_model并放入该文件夹下,只需下载config.json和G_953000.pth即可
|
从[链接](https://huggingface.co/spaces/zomehwh/vits-uma-genshin-honkai/tree/main/model)下载 vits_model并放入该文件夹下,只需下载config.json和G_953000.pth即可
|
||||||
|
|
||||||
|
#### (7) 启动程序
|
||||||
|
|
||||||
|
``` shell
|
||||||
|
cd TakwayPlatform
|
||||||
|
python main.py
|
||||||
|
```
|
||||||
|
|
||||||
|
|
|
@ -18,3 +18,7 @@ numba
|
||||||
soundfile
|
soundfile
|
||||||
webrtcvad
|
webrtcvad
|
||||||
apscheduler
|
apscheduler
|
||||||
|
aiohttp
|
||||||
|
faster_whisper
|
||||||
|
whisper_timestamped
|
||||||
|
modelscope
|
Loading…
Reference in New Issue