游雁
2024-01-04 36702d28297839f2b41be9a60e822a4059dbe3f6
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: