From 28ccfbfc51068a663a80764e14074df5edf2b5ba Mon Sep 17 00:00:00 2001
From: kongdeqiang <kongdeqiang960204@163.com>
Date: 星期五, 13 三月 2026 17:41:41 +0800
Subject: [PATCH] 提交
---
funasr/utils/postprocess_utils.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/funasr/utils/postprocess_utils.py b/funasr/utils/postprocess_utils.py
index dcc713f..39a8a10 100644
--- a/funasr/utils/postprocess_utils.py
+++ b/funasr/utils/postprocess_utils.py
@@ -122,7 +122,7 @@
abbr_word += words[num].upper()
num += 1
word_lists.append(abbr_word)
- if time_stamp is not None:
+ if time_stamp is not None and ts_nums[num] < len(time_stamp):
end = time_stamp[ts_nums[num]][1]
ts_lists.append([begin, end])
else:
@@ -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