kan-bayashi / PytorchWaveNetVocoder

WaveNet-Vocoder implementation with pytorch.
https://kan-bayashi.github.io/WaveNetVocoderSamples/
Apache License 2.0
297 stars 57 forks source link

Potential bug in feature_extract.py #25

Closed julianzaidi closed 6 years ago

julianzaidi commented 6 years ago

I think there is a bug in the method convert_continuos_f0(f0) in feature_extract.py (line 122 - 124):

if f0.all() == 0: print("WARNING: all of the f0 values are 0.") return uv, f0

if I understand, you want to avoid converting F0 to continuous F0 if all the F0 values are equal to 0. However, f0.all() check if ALL the values in the array are True (i.e are different from 0). If only one value is equal to 0, it will return False and f0.all() == 0 will then return True.

I don't know if it is wanted, but in most of the cases your F0 curve will not be continuous.

kan-bayashi commented 6 years ago

Thank you for your kind comments! I misunderstood .all() function. It should be (f0 == 0).all(), right? I will fix it.

kan-bayashi commented 6 years ago

@julianzaidi I've fixed. Thank you.

julianzaidi commented 6 years ago

Yes exactly @kan-bayashi ! No problem, it's a pleasure to help you.