r9y9 / wavenet_vocoder

WaveNet vocoder
https://r9y9.github.io/wavenet_vocoder/
Other
2.31k stars 499 forks source link

Fix lengths in train.py #171

Closed bajibabu closed 5 years ago

bajibabu commented 5 years ago

When we create the data using 'wavallin.py', we have to find the lengths of the files. Otherwise train.py raise an error.

r9y9 commented 5 years ago

If you use preprocess.py (and wavallin.py) to prepare dataset, train.txt should be created. https://github.com/r9y9/wavenet_vocoder/blob/8cc0c2dc28b2e7e0e6cafa02995b18be9e955df9/preprocess.py#L28-L37

What was the use case that you don't have train.txt?

bajibabu commented 5 years ago

Thanks for the clarification. I didn't see the preprocess.py. Since the code is not raising any error when there is no 'train.txt', I attempted to run the code without 'train.txt'. It raised an error and the message is not very informative. I spent some time to understand where the error is coming from. Maybe it's a good idea to raise an error when there is no 'train.txt' or calculate the lengths explicitly in such cases.

r9y9 commented 5 years ago

wavallin.py itself doesn't contain __main__. I'm not sure how you invoked it without using preprocess.py... Anyway, sorry for the confusion. The code when there is no train.txt is actually used at inference time (https://github.com/espnet/espnet/pull/1186), but I agree that it should raise an error or handle the cases carefully.