SRT Script Proofreader
Overview
Correct an ASR-generated SRT by treating its timestamps as fixed and the supplied narration script as a semantic and terminology reference. Produce a corrected SRT that follows what was actually spoken instead of blindly replacing the subtitles with the prewritten script.
Required Inputs
- Require one uploaded
.srtfile and one narration script included in the prompt or an attached text file. - Identify the intended SRT unambiguously when multiple subtitle files are present. Ask for clarification only when selection cannot be inferred safely.
- Request the missing SRT or script when either input is absent; do not fabricate it.
Correction Priorities
Apply this evidence order:
- Preserve every cue index and timestamp exactly as written in the source SRT.
- Preserve locally coherent wording that reflects spontaneous additions, omissions, repetitions, reordered ideas, or other deviations in the actual recording.
- Use the narration script to resolve obvious ASR errors, especially homophones, similar-sounding words, incorrect capitalization, English words, product names, personal names, technical terms, abbreviations, and numbers.
- Use neighboring cues and the overall meaning to repair garbled fragments when a direct cue-to-script match is unavailable.
- Preserve the speaker's intended language, tone, and natural spoken phrasing. Correct recognition mistakes without rewriting the speech into polished written prose.
- Avoid inserting script content merely because it is absent from the SRT. Treat a script-only passage as unspoken unless surrounding ASR evidence strongly indicates an omission caused by recognition failure.
- Avoid deleting an SRT-only passage merely because it is absent from the script. Retain it when it is meaningful in context and plausibly spoken.
Workflow
- Read the full narration script to establish topic, structure, terminology, names, capitalization, and number formats.
- Parse the SRT into cue indices, timestamp ranges, and text. Keep an untouched source copy for validation.
- Align SRT passages to the script by meaning rather than exact string matching. Use broader paragraph-level alignment when the actual recording changes order or wording.
- Correct each cue conservatively according to the correction priorities. Move a word between adjacent cue texts only when needed to keep the spoken phrase aligned with its existing time range; never move or alter timestamps.
- Preserve cue count, cue order, cue indices, timestamp strings, and valid SRT structure. Keep subtitle line breaks readable; do not add notes, uncertainty markers, Markdown, or commentary inside subtitle text.
- Remove all punctuation from the semantic end of every cue, including Chinese and English commas, periods, semicolons, colons, question marks, exclamation marks, enumeration commas, ellipses, and dashes. Preserve punctuation inside a cue. When one or more closing quotation marks or brackets end the cue, remove punctuation immediately before them but retain the closing marks.
- Save the result beside the source or in the requested output location as
<source-stem>_corrected.srt. Encode as UTF-8 and preserve a source UTF-8 BOM when present. - Run
python3 scripts/validate_srt_preservation.py <source.srt> <corrected.srt>from the skill root. - Fix all reported structural, index, timestamp, empty-cue, or terminal-punctuation errors, then rerun validation until it passes.
- Return a link to the corrected SRT and briefly state that timestamps were preserved. Mention unresolved ambiguity only outside the file and only when it could materially affect accuracy.
Quality Standard
- Favor a confident correction when the script and local phonetic or semantic evidence agree.
- Favor the actual SRT wording when it forms a coherent spoken alternative to the script.
- Review cue boundaries around every substantial correction to prevent duplicated or dropped words.
- Keep internal punctuation consistent and natural without changing meaning, but never leave sentence-ending punctuation at the end of a cue.
- Deliver only after the bundled validator succeeds.
Example Trigger
Trigger on requests such as: “这是机器识别的 SRT,时间戳是准的;请参考下面这份口播稿校正错字和专有名词,但实际录音和稿子不完全一样,最后给我一份修正后的 SRT。”
Resources
scripts/
validate_srt_preservation.py: Compare a corrected SRT with its source and fail when cue count, indices, timestamps, structure, nonempty text, or terminal-punctuation requirements differ.