caption_check
Preflight one caption or subtitle file before delivery. Attach a WebVTT (.vtt), SRT (.srt), or TTML/IMSC (.ttml/.xml) caption file in chat or give a publicly fetchable URL and it downloads the artifact under an SSRF-guarded, 2 MB-capped fetch, detects the format by content and the byte encoding and BOM, then parses it with the real spec engine (the WebVTT spec parser, a dedicated SRT parser, or the imscJS TTML/IMSC profile engine) and returns deterministic evidence: pass/fail, cue count, structural spec and IMSC profile-conformance errors, overlapping / negative / out-of-order / empty cues, per-line length, and per-cue and summary reading speed (CPS) against a named platform profile (netflix-adult-20, netflix-children-17, youtube, ebu-tt). It reports only source-file conformance, timing, encoding, and reading-speed facts against a dated profile. It does not judge translation quality, transcription accuracy, or synchronization against the video. An arbitrary XML or text file that is not a caption track returns an explicit unsupported-format error. Fetching and parsing a full-length track can take up to 60 seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A publicly fetchable HTTP(S) URL of a WebVTT, SRT, or TTML/IMSC caption file, detected by content not extension. Provide either this or an attached file, never both. Query strings are allowed but never logged. Pasted caption bodies, data URLs, FTP/SFTP, and URLs needing credentials, headers, or cookies are not supported. STRICT RULE: Caption check failed — provide either a caption URL or an attached caption file, not both STRICT RULE: Caption check failed — provide a public caption URL or attach the caption file | |
| file | No | A caption file attached in chat (WebVTT, SRT, or TTML/IMSC), detected by content not extension. Provide either this or url, never both. | |
| profile | No | Named reading-speed profile to judge CPS and line length against. netflix-adult-20 (default, 20 CPS) and netflix-children-17 (17 CPS) are spec-backed; youtube and ebu-tt are advisory ~17 CPS heuristics. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bom | Yes | Byte-order-mark detected: utf-8, utf-16le, utf-16be, or none | |
| cps | Yes | Per-cue and summary reading-speed measurements | |
| url | Yes | The checked caption source: the submitted URL query- and fragment-stripped, or the attached file's name | |
| pass | Yes | True when the file passes all checked format, timing, line-length and reading-speed criteria for the selected profile. False can include an advisory readability threshold breach, not just a specification error; this is not a platform-acceptance verdict | |
| timing | Yes | Measured cue timing and empty-text findings | |
| profile | Yes | Reading-speed and line-length profile applied to the caption checks | |
| cueCount | Yes | Number of caption cues retained for checking | |
| encoding | Yes | Detected byte encoding of the caption file | |
| specUsed | Yes | The dated spec identifier the detected format was checked against | |
| checkedAt | Yes | ISO timestamp when the caption result was produced | |
| lineLength | Yes | Per-line character counts checked against the profile limit | |
| truncation | Yes | Markers identifying checks truncated by configured limits | |
| rawCueCount | Yes | Cues parsed before the 20,000-cue cap | |
| ttmlProfile | No | IMSC/TTML profile designator declared in the file, when present | |
| detectedFormat | Yes | webvtt, srt, or ttml (covers IMSC), detected by content | |
| structuralErrors | Yes | Spec-parser and IMSC/TTML profile-conformance findings | |
| structuralErrorCounts | Yes | Counts of structural findings grouped by severity |