游雁
2024-01-04 e82bd3d226e392190fc5152b3b063137e76b6005
funasr/models/paraformer/model.py
@@ -495,6 +495,8 @@
      results = []
      b, n, d = decoder_out.size()
      if isinstance(key[0], (list, tuple)):
         key = key[0]
      for i in range(b):
         x = encoder_out[i, :encoder_out_lens[i], :]
         am_scores = decoder_out[i, :pre_token_length[i], :]
@@ -535,7 +537,8 @@
               text = tokenizer.tokens2text(token)
               
               text_postprocessed, _ = postprocess_utils.sentence_postprocess(token)
               result_i = {"key": key[i], "text_postprocessed": text_postprocessed}
               result_i = {"key": key[i], "text": text_postprocessed}
               
               if ibest_writer is not None: