try and make repeated failures recover better

This commit is contained in:
James Betker 2022-05-23 08:50:27 -06:00
parent 2270c89fdc
commit 1d758c3bc8

View File

@ -139,7 +139,7 @@ class UnsupervisedAudioDataset(torch.utils.data.Dataset):
except:
if self.debug_loading_failures:
print(f"Error loading audio for file {self.audiopaths[index]} {sys.exc_info()}")
return self[index+1]
return self[random.randint(0,len(self))]
# When generating resampled clips, skew is a bias that tries to spread them out from each other, reducing their
# influence on one another.