From 2b6eb001a97d2d6ec9a9179bee3303f3e8004e3c Mon Sep 17 00:00:00 2001 From: 18922260930 Date: Wed, 4 Dec 2024 15:37:28 +0800 Subject: [PATCH 1/3] Fix crash in ASR tasks when lm is set to none in #2237 --- runtime/onnxruntime/src/funasrruntime.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/runtime/onnxruntime/src/funasrruntime.cpp b/runtime/onnxruntime/src/funasrruntime.cpp index 628641268..f2d0a73dd 100644 --- a/runtime/onnxruntime/src/funasrruntime.cpp +++ b/runtime/onnxruntime/src/funasrruntime.cpp @@ -297,10 +297,12 @@ //timestamp if(msg_vec.size() > 1){ std::vector msg_stamp = funasr::split(msg_vec[1], ','); - for(int i=0; i 0){ + for(int i=0; i Date: Sun, 27 Jul 2025 18:41:25 +0800 Subject: [PATCH 2/3] fix #2587: Resolve VAD multithreading issue --- funasr/models/fsmn_vad_streaming/model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/funasr/models/fsmn_vad_streaming/model.py b/funasr/models/fsmn_vad_streaming/model.py index bfffca88d..a674c44fe 100644 --- a/funasr/models/fsmn_vad_streaming/model.py +++ b/funasr/models/fsmn_vad_streaming/model.py @@ -652,10 +652,11 @@ def inference( key: list = None, tokenizer=None, frontend=None, - cache: dict = {}, + cache: dict = None, **kwargs, ): - + if not cache: + cache = {} if len(cache) == 0: self.init_cache(cache, **kwargs) From 16b0b9d41a68ea6cd1c632b5964695af740a9ce9 Mon Sep 17 00:00:00 2001 From: majic31 Date: Sun, 27 Jul 2025 18:56:12 +0800 Subject: [PATCH 3/3] Update funasr/models/fsmn_vad_streaming/model.py ok Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- funasr/models/fsmn_vad_streaming/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/funasr/models/fsmn_vad_streaming/model.py b/funasr/models/fsmn_vad_streaming/model.py index a674c44fe..f62e36a2c 100644 --- a/funasr/models/fsmn_vad_streaming/model.py +++ b/funasr/models/fsmn_vad_streaming/model.py @@ -655,7 +655,7 @@ def inference( cache: dict = None, **kwargs, ): - if not cache: + if cache is None: cache = {} if len(cache) == 0: self.init_cache(cache, **kwargs)