Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

fix #2587: Resolve VAD multithreading issue (#2613)

majic315115a066c971
diff --git a/funasr/models/fsmn_vad_streaming/model.py b/funasr/models/fsmn_vad_streaming/model.py
index bfffca88d..f62e36a2c 100644
--- a/funasr/models/fsmn_vad_streaming/model.py
+++ b/funasr/models/fsmn_vad_streaming/model.py
@@ -652,10 +652,11 @@ class FsmnVADStreaming(nn.Module):
key: list = None,
tokenizer=None,
frontend=None,
- cache: dict = {},
+ cache: dict = None,
**kwargs,
):
-
+ if cache is None:
+ cache = {}
if len(cache) == 0:
self.init_cache(cache, **kwargs)