fix longer phoneme seqs

This commit is contained in:
erogol 2020-11-26 15:05:03 +01:00
parent 7b0a93d2f8
commit a757b203bc
1 changed files with 6 additions and 0 deletions

View File

@ -138,6 +138,12 @@ class MyDataset(Dataset):
if "attn_file" in locals():
attn = np.load(attn_file)
if len(text) > self.max_seq_len:
# return a different sample if the phonemized
# text is longer than the threshold
# TODO: find a better fix
return self.load_data(100)
sample = {
'text': text,
'wav': wav,