bshall / UniversalVocoding

A PyTorch implementation of "Robust Universal Neural Vocoding"
https://bshall.github.io/UniversalVocoding/
MIT License
237 stars 41 forks source link

Question about preprocess.py #11

Closed wade3han closed 4 years ago

wade3han commented 4 years ago

Hello.

In preprocess.py line 17,

wav /= np.abs(wav).max() * 0.999

I'm wondering why you choose to use * 0.999. It leads wav to have value which gets over 1.0. Is it bug or intended code?

Thanks.

bshall commented 4 years ago

Hi @wade3han,

Thanks for picking that up. It is indeed a bug, should have been:

wav = wav / np.abs(wav).max() * 0.999

I don't think it makes a difference at the end of the day because the mu-law quantization would probably quantize the wav to the same values but I should fix it anyway.