Skip to content

Commit d44bdd7

Browse files
redoctopusXuesongYang
authored andcommitted
Fix index error from addition of voiced_mask and p_voiced (#4811)
Signed-off-by: Jocelyn Huang <[email protected]> Signed-off-by: Jocelyn Huang <[email protected]>
1 parent 212ede2 commit d44bdd7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nemo/collections/tts/torch/data.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@ def __getitem__(self, index):
798798
if LMTokens in self.sup_data_types_set:
799799
lm_tokens = torch.tensor(self.id2lm_tokens[index]).long()
800800

801+
# Note: Please change the indices in _collate_fn if any items are added/removed.
801802
return (
802803
audio,
803804
audio_length,
@@ -819,8 +820,8 @@ def __getitem__(self, index):
819820

820821
def _collate_fn(self, batch):
821822
batch = list(zip(*batch))
822-
data_dict = self.general_collate_fn(list(zip(*batch[:13])))
823-
lm_tokens_list = batch[13]
823+
data_dict = self.general_collate_fn(list(zip(*batch[:15])))
824+
lm_tokens_list = batch[15]
824825

825826
if LMTokens in self.sup_data_types_set:
826827
lm_tokens = torch.full(

0 commit comments

Comments
 (0)