Skip to content
HALOWERK

Medienwerk

subtitles

Takes the list of speaking turns as /v1/diarize returns it, with start, end and text per entry, and renders a ready subtitle file in SRT or WebVTT. Lines are wrapped at a configurable width, a turn too long for one cue is split into several with timings interpolated across the split, and speaker labels can be prefixed. No audio file goes in and no recogniser is called: whoever already holds a transcript should not have to pay for recognition a second time just to get an SRT file, which is.

POST https://medien.halowerk.com/v1/subtitles

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
segmentsarrayYesThe segment list, exactly as /v1/diarize returns it under "turns". Extra fields such as index, words or duration_seconds are accepted and ignored.
formatstringNoOutput format. srt is the widest supported, vtt is what a browser reads directly.
speaker_labelsbooleanNoPrefix each cue with its speaker, as "Speaker 0: ". Segments without a speaker stay unlabelled.
max_line_charsintegerNoMaximum characters per line. 42 is the usual value for broadcast and streaming subtitles.
max_lines_per_cueintegerNoMaximum lines per cue. A turn needing more is split into several cues with interpolated timings.
Show full input schema
{
  "type": "object",
  "required": [
    "segments"
  ],
  "additionalProperties": false,
  "properties": {
    "segments": {
      "type": "array",
      "minItems": 1,
      "maxItems": 5000,
      "description": "The segment list, exactly as /v1/diarize returns it under \"turns\". Extra fields such as index, words or duration_seconds are accepted and ignored.",
      "items": {
        "type": "object",
        "required": [
          "start",
          "end",
          "text"
        ],
        "additionalProperties": true,
        "properties": {
          "start": {
            "type": "number",
            "minimum": 0,
            "description": "Start of the segment in seconds."
          },
          "end": {
            "type": "number",
            "minimum": 0,
            "description": "End of the segment in seconds."
          },
          "text": {
            "type": "string",
            "maxLength": 20000,
            "description": "Spoken text of the segment."
          },
          "speaker": {
            "type": [
              "integer",
              "string",
              "null"
            ],
            "description": "Speaker label as returned by /v1/diarize. Used only when speaker_labels is true."
          }
        }
      }
    },
    "format": {
      "type": "string",
      "enum": [
        "srt",
        "vtt"
      ],
      "default": "srt",
      "description": "Output format. srt is the widest supported, vtt is what a browser reads directly."
    },
    "speaker_labels": {
      "type": "boolean",
      "default": false,
      "description": "Prefix each cue with its speaker, as \"Speaker 0: \". Segments without a speaker stay unlabelled."
    },
    "max_line_chars": {
      "type": "integer",
      "minimum": 20,
      "maximum": 120,
      "default": 42,
      "description": "Maximum characters per line. 42 is the usual value for broadcast and streaming subtitles."
    },
    "max_lines_per_cue": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4,
      "default": 2,
      "description": "Maximum lines per cue. A turn needing more is split into several cues with interpolated timings."
    }
  }
}

Open original schema

Published input example

{
  "segments": [
    {
      "start": 0.5,
      "end": 3.2,
      "text": "Guten Morgen, schoen dass Sie da sind.",
      "speaker": 0
    },
    {
      "start": 3.4,
      "end": 6.1,
      "text": "Danke fuer die Einladung.",
      "speaker": 1
    }
  ],
  "format": "srt",
  "speaker_labels": true
}

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 →