Skip to content
HALOWERK

Tonwerk

accessible transcript html

Parses SRT or WebVTT (voice tags <v Name>, "NAME:" prefixes and ">>" speaker changes) or a segments array, merges consecutive cues of the same speaker into turns (a new paragraph after a pause longer than paragraph_gap_s), and writes semantic HTML5: html lang (WCAG 3.1.1), title (2.4.2), h1/h2 structure and lists (1.3.1), each turn as a paragraph with a stable id and a link to media_url#t=<seconds> (W3C Media Fragments) whose visible text is the time code, sound and music cues in square or.

POST https://ton.halowerk.com/v1/accessible-transcript-html

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
captionsstringNoCaptions or subtitles as SRT or WebVTT text.
captions_formatstringNoFormat of captions; auto detects WEBVTT headers, otherwise SRT.
segmentsarrayNoAlternative to captions: timed transcript segments.
titlestringNoTitle of the media; used in title and h1.
langstringNoBCP 47 language tag of the transcript (html lang).
media_urlstringNoURL of the audio or video; time links point to media_url#t=<seconds>. Without it, links point to the paragraph anchors.
paragraph_gap_snumberNoA pause longer than this starts a new paragraph even if the speaker does not change.
speaker_prefixesbooleanNoTreat "Name:" at the start of a cue as the speaker.
full_documentbooleanNotrue: complete HTML document with head and stylesheet; false: only the <section> fragment.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "captions": {
      "type": "string",
      "minLength": 10,
      "maxLength": 400000,
      "description": "Captions or subtitles as SRT or WebVTT text."
    },
    "captions_format": {
      "type": "string",
      "enum": [
        "auto",
        "srt",
        "vtt"
      ],
      "default": "auto",
      "description": "Format of captions; auto detects WEBVTT headers, otherwise SRT."
    },
    "segments": {
      "type": "array",
      "minItems": 1,
      "maxItems": 5000,
      "description": "Alternative to captions: timed transcript segments.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "start_s",
          "text"
        ],
        "properties": {
          "start_s": {
            "type": "number",
            "minimum": 0,
            "maximum": 360000
          },
          "end_s": {
            "type": "number",
            "minimum": 0,
            "maximum": 360000
          },
          "speaker": {
            "type": "string",
            "maxLength": 80
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          }
        }
      }
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "default": "Transcript",
      "description": "Title of the media; used in title and h1."
    },
    "lang": {
      "type": "string",
      "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
      "default": "en",
      "description": "BCP 47 language tag of the transcript (html lang)."
    },
    "media_url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://",
      "maxLength": 2048,
      "description": "URL of the audio or video; time links point to media_url#t=<seconds>. Without it, links point to the paragraph anchors."
    },
    "paragraph_gap_s": {
      "type": "number",
      "minimum": 0.5,
      "maximum": 60,
      "default": 4,
      "description": "A pause longer than this starts a new paragraph even if the speaker does not change."
    },
    "speaker_prefixes": {
      "type": "boolean",
      "default": true,
      "description": "Treat \"Name:\" at the start of a cue as the speaker."
    },
    "full_document": {
      "type": "boolean",
      "default": true,
      "description": "true: complete HTML document with head and stylesheet; false: only the <section> fragment."
    }
  }
}

Open original schema

Published input example

{
  "captions": "1\n00:00:01,000 --> 00:00:03,500\nHOST: Warehouse stock review.\n\n2\n00:00:04,000 --> 00:00:06,000\nTECHNICIAN: Two crates are ready.\n",
  "title": "Episode 1"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’