美文网首页
Wetts文字转语音安装部署

Wetts文字转语音安装部署

作者: starskye | 来源:发表于2023-08-04 23:05 被阅读0次
1.wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh 下载conda环境
2.chmod 777 Miniconda3-latest-Linux-x86_64.sh  设置执行权限
3.bash Miniconda3-latest-Linux-x86_64.sh 运行后会在当前文件夹内创建一个conda可执行文件
4.vim /etc/profile 编辑配置文件 将conda配置到PATH中 export PATH=/root/miniconda3/bin:$PATH 
5.source /etc/profile 加载配置文件
6.git clone https://github.com/wenet-e2e/wetts.git 下载代码
7.conda create -n wetts python=3.8 -y 创建环境
8.conda activate wetts 激活环境 若提示当前shell不支持可以使用bash切换
9.pip install -r requirements.txt 安装环境变量 可以修改数据源加速下载或者 -i https://mirrors.aliyun.com/pypi/simple 指定
10.conda install -n wetts pytorch=1.11 torchaudio cudatoolkit=10.2 -c pytorch -c conda-forge -y 继续安装环境
11.https://www.data-baker.com/data/index/TNtts/ 下载数据集
12.https://wenet.org.cn/downloads?models=wetts&version=baker_bert_exp.tar.gz  https://wenet.org.cn/downloads?models=wetts&version=baker_bert_onnx.tar.gz 下载运行时数据集
13. https://wenet.org.cn/downloads?models=wetts&version=baker_vits_v1_exp.tar.gz  https://wenet.org.cn/downloads?models=wetts&version=baker_vits_v1_onnx.tar.gz下载运行时数据集
14.wget https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-linux-x86_64.sh 下载安装cmake 与Miniconda3一样操作重复3-5
15.cd runtime/onnxruntime/ 切换到运行时目录
16.cmake CMakeLists.txt 编译onnxruntime
17.cd ../core/bin 切换到core
18.make 16步已经构建了Makefile所以此处直接make即可,make会出错cannot find ../fc_base-GNU...,此文件夹在onnxruntime下,将其拷贝到runtime/core即可,再次执行make。
19.最后将12/13步内容解压出baker_bert_onnx/baker_vits_v1_onnx中需要的文件参考20步命令中的
20. ./tts_main \
  --tagger baker_bert_onnx/zh_tn_tagger.fst \
  --verbalizer baker_bert_onnx/zh_tn_verbalizer.fst \
  --vocab baker_bert_onnx/vocab.txt \
  --char2pinyin baker_bert_onnx/pinyin_dict.txt \
  --pinyin2id baker_bert_onnx/polyphone_phone.txt \
  --pinyin2phones baker_bert_onnx/lexicon.txt \
  --g2p_prosody_model baker_bert_onnx/19.onnx \
  --speaker2id baker_vits_v1_onnx/speaker.txt \
  --sname baker \
  --phone2id baker_vits_v1_onnx/phones.txt \
  --vits_model baker_vits_v1_onnx/G_250000.onnx \
  --text "你好,我是小明。" \
  --wav_path audio.wav
运行命令即可

相关文章

网友评论

      本文标题:Wetts文字转语音安装部署

      本文链接:https://www.haomeiwen.com/subject/hvlbpdtx.html