在Monster上.
先跑通GitHub
1.数据下载.
unzip ali…zip
先跳过pre data LJ, 明天和标贝的一起准备.
直接都是用pre-model:
前两个gdown
ckpt用
百度网盘:
wget -c --referer=https://pan.baidu.com/s/1by3-8t3A6uihK8K9IFZ7rg -O Baidu.thing "百度云实际下载地址"
不过这里我是在windows先下载, 然后传过去的.
Put Nvidia pretrained Tacotron2 model in the Tacotron2/pre_trained_model;
Put Nvidia pretrained waveglow model in the waveglow/pre_trained_model;
2.尝试合成
这里用NVIDIA版本那里的docker:
NV_GPU='6,7' nvidia-docker run --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 -it --rm --ipc=host -v $PWD:/apex/ tacotron2-nvd-git bash
python synthesis.py
(可以忽略了, 启用了docker: 不知道为啥synthesis.py里面改gpu选择会OOM.
所以在外面选)
可以合成, 可以改alpha.
2.0 替换为v100训练的
1.替换Tacotron-2模型. 测试可以, 但是和git上模型哪一个好, 说不清楚.
2.替换waveGlow模型. 不行, 但想想好像可以.超越代码.
版本链接:
https://ngc.nvidia.com/catalog/model-scripts/nvidia:tacotron_2_and_waveglow_for_pytorch/quickStartGuide
现在就是用LJSpeech完整训练出来的WaveGlow来作为解码器:
3.尝试训练Fast Speech
目的是让1.5~1.8倍的音质好一点.
先预处理数据:
python preprocess.py
alignment很浪费时间, 存在文件夹的话说明用预处理的.
if not os.path.exists(hp.alignment_path):
os.mkdir(hp.alignment_path)
else:
return
正式训练:
python train.py
如果意外退出来, 则直接用这个, 接着上一次的bash就进去了.
docker attach
恢复训练:
# Load checkpoint if exists
try:
checkpoint = torch.load(os.path.join(
hp.checkpoint_path, 'checkpoint_%d.pth.tar' % args.restore_step))
model.load_state_dict(checkpoint['model'])
optimizer.load_state_dict(checkpoint['optimizer'])
print("\n---Model Resto