DiffSinger icon indicating copy to clipboard operation
DiffSinger copied to clipboard

Proposing a fix for inconsistent f0 length caused by different versions of parselmouth

Open yuxinyuan opened this issue 3 years ago • 0 comments

Hi, I noticed that different versions of parselmouth would result in different length of the computed f0. This is also mentioned in the comment of your code. https://github.com/MoonInTheRiver/DiffSinger/blob/ae3e8f05e04ea28bd6d68ff8eb2a6ae882f7d9c0/data_gen/tts/data_gen_utils.py#L176

I think the reason for this is that, in parselmouth v0.4.0, the default value of the very_accurate parameter of Sound.to_pitch_ac was changed to False, matching Praat's default (See https://github.com/YannickJadoul/Parselmouth/releases). Though I didn't make a rigorous test, I think adding very_accurate=True in get_pitch would fix the inconsistent length issue and make your code more compatible.

yuxinyuan avatar Feb 24 '22 03:02 yuxinyuan