当前位置:   article > 正文

ubuntu openvoice部署过程记录,解决python3 -m unidic download 时 unidic无法下载的问题_python -m unidic download

python -m unidic download

github给的安装顺序:

conda create -n openvoice python=3.9
conda activate openvoice
git clone git@github.com:myshell-ai/OpenVoice.git
cd OpenVoice
pip install -e .
  • 1
  • 2
  • 3
  • 4
  • 5

安装MeloTTS:

pip install git+https://github.com/myshell-ai/MeloTTS.git
python -m unidic download
  • 1
  • 2

到python -m unidic download就会卡住,下载不了unidic。解决方案:
链接: link

1, manaul download the unidic.zip from https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip,
2, cp unidic-3.1.0.zip to /usr/local/lib/python3.9/site-packages/unidic/ and rename it to unidic.zip
3, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 93 , function download_version, comment all except download_and_clean(),
4, change the download_and_clean two parameter anything you want
5, change /usr/local/lib/python3.9/site-packages/unidic/download.py line 63, comment the download_process
then execut python -m unidic download again , it will be OK
翻译一下:
1.手动下载unidic.zip,可以用迅雷,连接:https://cotonoha-dic.s3-ap-northeast-1.amazonaws.com/unidic-3.1.0.zip
2.下载好的unidic-3.1.0.zip文件拷贝到目录:/usr/local/lib/python3.9/site-packages/unidic/,并且重命名它为unidic.zip
3.打开文件 /usr/local/lib/python3.9/site-packages/unidic/download.py,找到93行的download_version函数,将函数里除了download_and_clean()以外的代码全部注释掉。[HTML]: 实操代码在92行
4.把download_and_clean()函数的两个参数改掉,自己想用啥用啥。最后会打印出来一个和版本号相关的字符串。
5.再把63行里的download_process注释掉。
[HTML]: 实操在62行
文件保存之后运行python -m unidic download。
修改92行代码
修改62行代码
修改过后解决问题

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/648991
推荐阅读
相关标签
  

闽ICP备14008679号