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/utils/postprocess_utils.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/funasr/utils/postprocess_utils.py b/funasr/utils/postprocess_utils.py
index 60ebb56..39a8a10 100644
--- a/funasr/utils/postprocess_utils.py
+++ b/funasr/utils/postprocess_utils.py
@@ -414,6 +414,8 @@
             continue
         if get_event(s_list[i]) == cur_ent_event and get_event(s_list[i]) != None:
             s_list[i] = s_list[i][1:]
+        if len(s_list[i]) == 0:
+            continue
         # else:
         cur_ent_event = get_event(s_list[i])
         if get_emo(s_list[i]) != None and get_emo(s_list[i]) == get_emo(new_s):

--
Gitblit v1.9.1