Skip to content

Commit

Permalink
Fix masking bug for TTS Aligner (NVIDIA#6677)
Browse files Browse the repository at this point in the history
Signed-off-by: Jocelyn Huang <[email protected]>
Signed-off-by: hsiehjackson <[email protected]>
  • Loading branch information
redoctopus authored and hsiehjackson committed Jun 2, 2023
1 parent 1b93141 commit d2938b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nemo/collections/tts/models/aligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def forward(self, *, spec, spec_len, text, text_len, attn_prior=None):
attn_soft, attn_logprob = self.alignment_encoder(
queries=spec,
keys=self.embed(text).transpose(1, 2),
mask=get_mask_from_lengths(text_len).unsqueeze(-1),
mask=get_mask_from_lengths(text_len).unsqueeze(-1) == 0,
attn_prior=attn_prior,
)

Expand Down

0 comments on commit d2938b9

Please sign in to comment.