Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about training #16

Closed
chasing-ant opened this issue Sep 22, 2024 · 2 comments
Closed

about training #16

chasing-ant opened this issue Sep 22, 2024 · 2 comments

Comments

@chasing-ant
Copy link

chasing-ant commented Sep 22, 2024

Hi,thanks for your great work.
I'm having trouble running the following command in terminal:
python train.py -c configs/lj_16k_gt_dur.yaml -m lj_16k_gt_dur
But the following error occurs:

File "*/VoiceFlow-TTS-main/data_loader.py", line 22, in check_frame_length 
assert sum(dur) == mel.shape[1], f"Frame length mismatch: utt {utt}, dur: {sum(dur)}, mel: {mel.shape[1]}"                                          
AssertionError: Frame length mismatch: utt LJ043-0008, dur: 554, mel: 553

I changed this line of code to
abs(sum(dur) - mel.shape[1]) <= 1
and it works, but I don't know if it has any effect on the result.
Appears during operation

numpy/core/fromnumeric.py:3440: 
     RuntimeWarning: Mean of empty slice. return _methods._mean(a, axis=axis, dtype=dtype,

and

numpy/core/_methods.py:189: 
      RuntimeWarning: invalid value encountered in double_scalars ret = ret.dtype.type(ret / rcount)
@cantabile-kwok
Copy link
Member

A similar issue is:
#11 (comment)

@chasing-ant This length mismatch is a common phenomenon, and you can overcome this by truncating or padding the features to the same length. In your case, as mel is one frame shorter than durations, the recommended solution is to zero-pad the mel sequence by 1 frame. I am not sure whether the numpy RuntimeWarning will affect the result (intuitively it won't), but at least padding or truncating before training can avoid such warnings.

@chasing-ant
Copy link
Author

A similar issue is: #11 (comment)

@chasing-ant This length mismatch is a common phenomenon, and you can overcome this by truncating or padding the features to the same length. In your case, as mel is one frame shorter than durations, the recommended solution is to zero-pad the mel sequence by 1 frame. I am not sure whether the numpy RuntimeWarning will affect the result (intuitively it won't), but at least padding or truncating before training can avoid such warnings.

I'll give it a try, thank you for your detailed explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants