--- name: vietnamese-transcript-cleaner description: Clean raw Vietnamese speech-to-text output (Whisper, YouTube auto captions, Zoom, Google Meet, SRT or VTT files) into readable text. Restores missing diacritics and punctuation, merges broken caption lines into paragraphs, labels speakers, keeps timestamps, then writes a summary, key decisions and action items. Use when the user shares a transcript, subtitle file, meeting recording notes, "bản ghi", "phụ đề", "bóc băng", "gỡ băng", "chép lời", "tóm tắt cuộc họp", or asks to fix Vietnamese text without dấu. license: MIT metadata: author: ducpt homepage: https://ducpt.com version: "1.0.0" --- # Vietnamese Transcript Cleaner Raw Vietnamese captions are hard to read: lines break mid sentence, diacritics are missing, names are misheard and there is no punctuation. This skill turns them into a clean document plus a useful summary. ## Step 1. Normalize the file If the input is an `.srt` or `.vtt` file, run the bundled script first. It strips numbering and cue timing, merges short cues into paragraphs and keeps one timestamp per paragraph: ```bash python scripts/clean_subs.py input.srt > merged.txt python scripts/clean_subs.py input.vtt --gap 2.5 --max-chars 600 > merged.txt ``` `--gap` starts a new paragraph when the silence between cues is longer than N seconds (default 2.0). If the input is plain text, skip this step. ## Step 2. Clean the language (work paragraph by paragraph) 1. Restore diacritics only when the intended word is unambiguous from context. If two readings are plausible (for example "ban" could be "bạn", "bán" or "bàn"), pick the one that fits the sentence and mark truly unclear spots with `[?]`. 2. Add punctuation and capitalization. Vietnamese sentences in speech are long; split at natural pauses. 3. Remove fillers that carry no meaning: "ờ", "ừm", "à thì", "kiểu như là" when repeated, "đúng không" used as a tic. Keep them only if the user wants a verbatim transcript. 4. Fix misheard proper nouns using a glossary. Ask the user once for names of people, brands and products if many are garbled. 5. Never change numbers, prices, dates or commitments. If a number is unclear, keep it and flag `[?]`. ## Step 3. Speakers If the source has no speaker labels, infer turns from context (questions and answers, "anh", "em", self-introductions) and label them `Người 1`, `Người 2` unless names are known. Say clearly that labels are inferred. ## Step 4. Output format ``` #