栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

NATspeech配置过程

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

NATspeech配置过程

git clone有时没反应,解决方法重新链接服务器

逐行运行install_mfa.sh的命令

pip install --ignore-requires-python git+https://github.com/MontrealCorpusTools/Montreal-Forced-Aligner.git@v2.0.0b3

报错

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/ssd6/other/lihongxi/miniconda3/envs/NAT/lib/python3.7/site-packages/montreal_forced_aligner/command_line/mfa.py", line 72, in history_save_handler
    update_command_history(history_data)
  File "/ssd6/other/lihongxi/miniconda3/envs/NAT/lib/python3.7/site-packages/montreal_forced_aligner/config/__init__.py", line 43, in update_command_history
    with open(path, 'w', encoding='utf8') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/lihongxi/Documents/MFA/command_history.yaml'

修改上面的路径即可

运行process

先将工作目录加入到sys.append,不然找不到utils包

缺少g2p_en包 pyloudnorm包 skimage(报错,安装scikit-image)

开始处理数据

mfa过程

Could not find 'fstcompile'.  Please ensure that you are in an environment that has the openfst conda package installed, or that the openfst binaries are on your path if you compiled them yourself.
Traceback (most recent call last):
  File "data_gen/tts/runs/train_mfa_align.py", line 49, in
    train_mfa_align()
  File "data_gen/tts/runs/train_mfa_align.py", line 31, in train_mfa_align
    subprocess.check_call(f'{env_str} bash mfa_usr/run_mfa_train_align.sh', shell=True)
  File "/ssd6/other/lihongxi/miniconda3/envs/NAT/lib/python3.7/subprocess.py", line 328, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'CORPUS=ljspeech NUM_JOB=56 MFA_OUTPUTS=mfa_outputs MFA_INPUTS=mfa_inputs MFA_CMD=train bash mfa_usr/run_mfa_train_align.sh' returned non-zero exit status 1.
(NAT) [lihongxi@gpu89.corp.yodao.com NATSpeech]$ pip install fstcompile
ERROR: Could not find a version that satisfies the requirement fstcompile (from versions: none)
ERROR: No matching distribution found for fstcompile

解决过程:把check_call里assert那句注释掉了 

错误 Could not find 'fstcompile'

conda install kaldi就能解决 不用大费周折编译

There was a problem locating libopenblas.so.0. Try installing openblas via system package manager?

conda install -c anaconda libopenblas

conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib

解决 

训练对齐模型,会缺少openblas,把路径export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/anaconda3/envs/aligner/lib/

There was a problem with the version of system libraries that Kaldi was linked against. Try compiling Kaldi on your machin
e and collecting the binaries via the `mfa thirdparty kaldi` command.

kaldi包不匹配,大致描述是 mfa thirdparty kaldi

用下面的命令重装mfa和kaldi

conda install -c conda-forge montreal-forced-aligner

最后python版本不兼容

conda install -n python==3.10 NAT 换成3.10

可以运行conda install -c conda-forge montreal-forced-aligner

少textgrid pip安装

二值化

 pip install resemblyzer pyloudnorm scikit-image pycwt praat-parselmouth

 rning: Pass sr=22050, n_fft=1024, n_mels=80, fmin=80, f
max=7600 as keyword args. From version 0.10 passing these as po

训练 

pandas g2p_en

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/864089.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号