Steve Li
2024-11-15 8cd0d4aab71939e56539ff6c1027b37ad4324433
Add bounds check for postprocess_utils.py abbr_dispose() (#2209)

"/Users/{USER}/.pyenv/versions/funasr_usage/lib/python3.12/site-packages/funasr/utils/postprocess_utils.py", line 127, in abbr_dispose
end = time_stamp[ts_nums[num]][1]
~~~~~~~~~~^^^^^^^^^^^^^^
IndexError: list index out of range
1个文件已修改
2 ■■■ 已修改文件
funasr/utils/postprocess_utils.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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: