[fix] Fix a bug in seaco_paraformer model "inference" function (#1639)

This commit is contained in:
querryton 2024-04-20 16:07:13 +08:00 committed by GitHub
parent dee1354d0d
commit 01df8f330c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -350,7 +350,7 @@ class SeacoParaformer(BiCifParaformer, Paraformer):
pre_acoustic_embeds, pre_token_length = predictor_outs[0], predictor_outs[1]
pre_token_length = pre_token_length.round().long()
if torch.max(pre_token_length) < 1:
return []
return ([],)
decoder_out = self._seaco_decode_with_ASF(encoder_out,
encoder_out_lens,