fix decoding_ind none bug

This commit is contained in:
haoneng.lhn 2023-09-12 13:00:16 +08:00
parent eed5cbb945
commit 2165d5de05

View File

@ -430,9 +430,7 @@ class Speech2TextParaformer:
# b. Forward Encoder
if decoding_ind is None:
decoding_ind = self.decoding_ind
if self.decoding_ind is None:
decoding_ind = 0
decoding_ind = 0 if self.decoding_ind is None else self.decoding_ind
enc, enc_len = self.asr_model.encode(**batch, ind=decoding_ind)
if isinstance(enc, tuple):
enc = enc[0]