From 646c188f7854ca5c585fbcdc0b51983694552b8f Mon Sep 17 00:00:00 2001 From: Killua777 <1223086337@qq.com> Date: Wed, 22 May 2024 10:04:07 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BF=AE=E6=94=B9=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=B8=8E=E4=BE=9D=E8=B5=96=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 79 +++++++++++++++++++++++++++++++++++++++++++----- requirements.txt | 6 +++- 2 files changed, 77 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 450d713..5d8f07c 100644 --- a/README.md +++ b/README.md @@ -69,19 +69,76 @@ git clone http://43.132.157.186:3000/killua/TakwayPlatform.git 创建虚拟环境 ``` shell -conda create -n takway +conda create -n takway python=3.9 conda activate takway ``` -安装pytorch和依赖 +安装依赖 ``` shell -cd TakwayAI/ -pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118 +cd TakwayPlatform/ 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的基础上做了一些修改 @@ -91,14 +148,22 @@ cd FunASR/ pip install -v -e . ``` -#### (4) 修改配置 +#### (5) 修改配置 1. 安装mysql,在mysql中创建名为takway的数据库 2. 安装redis,将密码设置为takway 3. 打开config中的development.py文件修改mysql和redis连接字符串 -#### (5) 导入vits模型 +#### (6) 导入vits模型 在utils/tts/目录下,创建vits_model文件夹 从[链接](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 +``` + diff --git a/requirements.txt b/requirements.txt index ad87f6e..cee01bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,4 +17,8 @@ torch numba soundfile webrtcvad -apscheduler \ No newline at end of file +apscheduler +aiohttp +faster_whisper +whisper_timestamped +modelscope \ No newline at end of file