九耳
2023-04-07 79007d36f1636eb51e0cead6bc0e6b18ff1f8253
funasr/export/models/vad_realtime_transformer.py
@@ -66,7 +66,7 @@
        length = 10
        text_indexes = torch.tensor([[266757, 266757, 266757, 266757, 266757, 266757, 266757, 266757, 266757, 266757]], dtype=torch.int32)
        text_lengths = torch.tensor([length], dtype=torch.int32)
        vad_masks = vad_mask(10, 3, dtype=torch.float32)[None, None, :, :]
        vad_masks = vad_mask(10, 2, dtype=torch.float32)[None, None, :, :]
        sub_masks = torch.ones(length, length, dtype=torch.float32)
        sub_masks = torch.tril(sub_masks).type(torch.float32)
        return (text_indexes, text_lengths, vad_masks, sub_masks[None, None, :, :])