daniilrobnikov/vits2

AssertionError: min value is nan

wlz987 opened this issue · 5 comments

wlz987 commented

Traceback (most recent call last):
File "/home/work/miniconda3/envs/vits2/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap
fn(i, *args)
File "/home/work/语音相关/文字转语音/vits2/train_ms.py", line 92, in run
train_and_evaluate(rank, epoch, hps, [net_g, net_d], [optim_g, optim_d], [scheduler_g, scheduler_d], scaler, [train_loader, eval_loader], logger, [writer, writer_eval])
File "/home/work/语音相关/文字转语音/vits2/train_ms.py", line 131, in train_and_evaluate
y_hat_mel = wav_to_mel(y_hat.squeeze(1), hps.evaluate.n_fft, hps.evaluate.n_mels, hps.data.sample_rate, hps.evaluate.hop_length, hps.evaluate.win_length, hps.evaluate.f_min, hps.evaluate.f_max)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/work/语音相关/文字转语音/vits2/utils/mel_processing.py", line 64, in wav_to_mel
assert torch.min(y) >= -1.0, f"min value is {torch.min(y)}"
^^^^^^^^^^^^^^^^^^^^
AssertionError: min value is nan

/home/work/语音相关/文字转语音/vits2/datasets/custom_base/filelists/train.txt:的一条数据
/home/work/语音相关/音频数据/Genshin_zh/barbara/vo_ABDLQ001_3_barbara_01.wav|0|yua˧˥n yua˧˥n la˧˥i ni˧ za˨˩˦i zhe˨˩˦ li˧ , luo˧˥ sha˥ li˨˩˦ ya˨˩˦ xia˧o jie˧ , cha˨˩˦nɡ shi˥ ba˥n de huo˧˥ do˨˩˦nɡ ma˧ sha˨˩˦nɡ jiu˨˩˦ …

这条数据的原文:
/home/work/语音相关/音频数据/Genshin_zh/barbara/vo_ABDLQ001_3_barbara_01.wav|barbara|原、原来你在这里,罗莎莉亚小姐,唱诗班的活动马上就…

wlz987 commented

˧,˨˩˦是声调,拼音的四个声调

Hi @longzewei!

I seems that the file /Genshin_zh/barbara/vo_ABDLQ001_3_barbara_01.wav is out of range from [-1 to 1].
One probable answer is that the file is corrupted

Can you send me this file for further assessment?

wlz987 commented

你这拉的新的代码就没有这个问题了

wlz987 commented

应该是 你改了 preprocess/mel_process.py 原来是 preprocess/aul_mel.py 还是什么的, 也没太仔细看

Yes, recently, I refactored the code, so the naming of some files have changed as well

You should try to use:

cd vits2 # make sure you are in the project root
python preprocess/mel_transform.py --data_dir /path/to/custom_dataset -c datasets/custom_base/config.yaml