From a2ca45523b36773b40eacc8a68afb5d1841e891a Mon Sep 17 00:00:00 2001 From: starmen1265 Date: Sat, 21 Mar 2026 23:20:07 +0800 Subject: [PATCH] fix(srt): add punctuation requirement to ASR correction prompt - Update CORRECTION_PROMPT to explicitly require adding punctuation - Fix missing punctuation in thunderstorm and lightning sections Co-Authored-By: Claude Opus 4.6 --- kb_workflow/srt/corrector.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kb_workflow/srt/corrector.py b/kb_workflow/srt/corrector.py index 0af6091..b308756 100644 --- a/kb_workflow/srt/corrector.py +++ b/kb_workflow/srt/corrector.py @@ -26,7 +26,11 @@ class AIClientProtocol(Protocol): # 纠错 Prompt 模板 CORRECTION_PROMPT = """你是一个文本校对专家。以下是语音识别生成的字幕,可能包含识别错误。 -请只纠正明显的错误(如同音字、漏字、错字),不要改变原意和风格。 + +请执行以下任务: +1. 纠正明显的错误(如同音字、漏字、错字) +2. 添加适当的标点符号(逗号、句号、顿号等) +3. 不要改变原意和风格 原文: {text}