Skip to content
HALOWERK

Tonwerk

lecture slide sync

Slide text comes from the PDF text layer (pdf.js, Mozilla) or from slides; words of at least three letters are lower-cased, Snowball stop words (German and English, BSD-3-Clause) dropped and plural -s stripped. Slides and segments become TF-IDF vectors with IDF over the slides; cosine similarity scores every segment against every slide. A Viterbi pass picks a slide sequence that maximises total similarity with small costs for moving on (0.02), skipping slides (0.05 + 0.02 per skipped slide).

POST https://ton.halowerk.com/v1/lecture-slide-sync

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
slides_pdf_base64stringNoSlide deck as PDF, base64 (at most 8 MiB, 300 pages); one page = one slide.
slidesarrayNoAlternative to the PDF: the text of each slide in order.
segmentsarrayNoTimed transcript segments {start, end, text} in seconds.
captionsstringNoAlternative transcript: WebVTT or SRT captions.
audio_base64stringNoAlternative transcript source: lecture audio, at most 30 s, as base64 (max 10 MiB): WAV, FLAC, MP3, AAC/M4A, Ogg Vorbis/Opus, WebM and other common formats.
audio_urlstringNoInstead of base64: public http(s) URL of the file (max 10 MiB).
languagestringNoWhisper language code (ISO 639-1 such as en, de, fr; haw for Hawaiian). Omit to detect.
allow_backtrackbooleanNoAllow returning to an earlier slide.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "slides_pdf_base64": {
      "type": "string",
      "minLength": 20,
      "maxLength": 11200000,
      "description": "Slide deck as PDF, base64 (at most 8 MiB, 300 pages); one page = one slide."
    },
    "slides": {
      "type": "array",
      "minItems": 1,
      "maxItems": 300,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 4000
      },
      "description": "Alternative to the PDF: the text of each slide in order."
    },
    "segments": {
      "type": "array",
      "minItems": 1,
      "maxItems": 3000,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "start",
          "end",
          "text"
        ],
        "properties": {
          "start": {
            "type": "number",
            "minimum": 0
          },
          "end": {
            "type": "number",
            "minimum": 0
          },
          "text": {
            "type": "string",
            "maxLength": 2000
          }
        }
      },
      "description": "Timed transcript segments {start, end, text} in seconds."
    },
    "captions": {
      "type": "string",
      "minLength": 10,
      "maxLength": 500000,
      "description": "Alternative transcript: WebVTT or SRT captions."
    },
    "audio_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "Alternative transcript source: lecture audio, at most 30 s, as base64 (max 10 MiB): WAV, FLAC, MP3, AAC/M4A, Ogg Vorbis/Opus, WebM and other common formats."
    },
    "audio_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "Instead of base64: public http(s) URL of the file (max 10 MiB)."
    },
    "language": {
      "type": "string",
      "pattern": "^[a-z]{2,3}$",
      "description": "Whisper language code (ISO 639-1 such as en, de, fr; haw for Hawaiian). Omit to detect."
    },
    "allow_backtrack": {
      "type": "boolean",
      "default": true,
      "description": "Allow returning to an earlier slide."
    }
  }
}

Open original schema

Published input example

{
  "slides": [
    "Photosynthesis in the chloroplast",
    "Krebs cycle in the mitochondria"
  ],
  "segments": [
    {
      "start": 0,
      "end": 4,
      "text": "Photosynthesis happens in the chloroplast."
    },
    {
      "start": 4,
      "end": 9,
      "text": "The Krebs cycle runs in the mitochondria."
    }
  ]
}

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 โ†’