修复断句之间时间戳bug (#1863)

This commit is contained in:
wuhongsheng 2024-07-01 13:41:06 +08:00 committed by GitHub
parent 92b14aaa2a
commit d8c1b46daf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -156,6 +156,7 @@ def timestamp_sentence(
punc_id = int(punc_id) if punc_id is not None else 1
sentence_end = timestamp[1] if timestamp is not None else sentence_end
sentence_start = timestamp[0] if timestamp is not None else sentence_start
sentence_text_seg = (
sentence_text_seg[:-1] if sentence_text_seg[-1] == " " else sentence_text_seg
)
@ -183,7 +184,6 @@ def timestamp_sentence(
sentence_text = ""
sentence_text_seg = ""
ts_list = []
sentence_start = sentence_end
return res