Skip to content

Commit 9d95791

Browse files
authored
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 09b744a commit 9d95791

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
@@ -805,6 +805,7 @@ def __getitem__(self, index):
805805
if LMTokens in self.sup_data_types_set:
806806
lm_tokens = torch.tensor(self.id2lm_tokens[index]).long()
807807

808+
# Note: Please change the indices in _collate_fn if any items are added/removed.
808809
return (
809810
audio,
810811
audio_length,
@@ -826,8 +827,8 @@ def __getitem__(self, index):
826827

827828
def _collate_fn(self, batch):
828829
batch = list(zip(*batch))
829-
data_dict = self.general_collate_fn(list(zip(*batch[:13])))
830-
lm_tokens_list = batch[13]
830+
data_dict = self.general_collate_fn(list(zip(*batch[:15])))
831+
lm_tokens_list = batch[15]
831832

832833
if LMTokens in self.sup_data_types_set:
833834
lm_tokens = torch.full(

0 commit comments

Comments
 (0)