From 528f92f7a2a26cade1c57ccf26b0ba6524e7cae5 Mon Sep 17 00:00:00 2001
From: TnR2 <115166373+TnR2@users.noreply.github.com>
Date: 星期三, 01 十月 2025 14:45:17 +0800
Subject: [PATCH] fix: handle empty strings after event removal in transcription processing (def rich_transcription_postprocess(s)) (#2681)
---
funasr/models/fsmn_vad_streaming/model.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/funasr/models/fsmn_vad_streaming/model.py b/funasr/models/fsmn_vad_streaming/model.py
index bfffca8..f62e36a 100644
--- a/funasr/models/fsmn_vad_streaming/model.py
+++ b/funasr/models/fsmn_vad_streaming/model.py
@@ -652,10 +652,11 @@
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)
--
Gitblit v1.9.1