lmnt-com / diffwave

DiffWave is a fast, high-quality neural vocoder and waveform synthesizer.
Apache License 2.0
754 stars 111 forks source link

Error in version comparison in dataset.py #17

Closed m-hamza-mughal closed 2 years ago

m-hamza-mughal commented 2 years ago

Hi. Thankyou for your great work.

I believe, there can be a better way to compare versions of torchaudio. Instead of comparing strings, we can use packages like packaging and use functions like parse from packaging.version to properly compare versions.

To reproduce this error, you can use the installation of torchaudio==0.10.0 and run the training using that. '0.10.0' > '0.7.0' gives False which is incorrect.

https://github.com/lmnt-com/diffwave/blob/9ad64429b0052c8d51a5befd26354086c4ef47fe/src/diffwave/dataset.py#L39

sharvil commented 2 years ago

That's an excellent suggestion. Any chance you could send over a PR to fix this problem? If not, I'll eventually get to it. :)

sharvil commented 2 years ago

Fixed by updating min torchaudio to 0.9.0 and removing the version checks.