From 6abf68388ce81bb8aa8dfa29f5f68b10d88cae05 Mon Sep 17 00:00:00 2001 From: hnluo Date: Thu, 27 Apr 2023 01:15:59 +0800 Subject: [PATCH] Update asr_inference_paraformer_streaming.py --- funasr/bin/asr_inference_paraformer_streaming.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/funasr/bin/asr_inference_paraformer_streaming.py b/funasr/bin/asr_inference_paraformer_streaming.py index 939ffe99f..63ef3a34a 100644 --- a/funasr/bin/asr_inference_paraformer_streaming.py +++ b/funasr/bin/asr_inference_paraformer_streaming.py @@ -202,9 +202,9 @@ class Speech2Text: assert check_argument_types() results = [] cache_en = cache["encoder"] - if speech.shape[1] < 16 * 60 and cache["is_final"]: - cache["last_chunk"] = True - feats = cache["feats"] + if speech.shape[1] < 16 * 60 and cache_en["is_final"]: + cache_en["last_chunk"] = True + feats = cache_en["feats"] feats_len = torch.tensor([feats.shape[1]]) else: if self.frontend is not None: