Skip to content
HALOWERK

Tonwerk

escalation moments

Each segment gets a disclosed score: keyword families (German/English cue patterns, weights 1–2, at most three hits per segment), text emphasis (≥ 2 exclamation marks or ≥ 2 all-caps words, +0.5), speech rate ≥ 1.35 × the speaker's median words per second (segments ≥ 1 s and ≥ 4 words, +1) and, if the call audio is supplied (mono mix, up to 600 s, ffmpeg 6.1), RMS level ≥ 6 dB (+1.5) or ≥ 10 dB (+2) above the speaker's median segment level. Speaker baselines need three segments. Segments.

POST https://ton.halowerk.com/v1/escalation-moments

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
transcriptstring, object, arrayNoTranscript as WebVTT or SRT text (speakers from <v Name> voice tags or "Name:" prefixes), or JSON (text or object) with a list of segments, utterances, turns, cues or words carrying start, end, speaker and text – e.g. the output of medienwerk /v1/stt or /v1/diarize, Whisper, AssemblyAI or Deepgram.
segmentsarrayNoAlternative to transcript: segments with start/end in seconds, speaker and text.
time_unitstringNoUnit of start/end in JSON transcripts; auto treats integer values with a median segment length above 60 as milliseconds.
audio_base64stringNoOptional call audio for loudness as base64 (at most 10 MiB decoded; a data: URL prefix is accepted). Formats: WAV/RF64/W64, AIFF, FLAC, MP3/MP2, AAC (ADTS, M4A/MP4), ALAC, Ogg Vorbis/Opus, WebM/Matroska, CAF, WavPack, APE, TTA, AMR, AU, AC-3/E-AC-3, DTS, WMA (ASF), AVI, MPEG-TS/PS, FLV; for video containers the first audio track is used.
audio_urlstringNoPublic http(s) URL of the optional call audio for loudness (at most 10 MiB; private and local addresses are refused).
agent_speakersarrayNoSpeaker labels of the company side (agent, IVR). Rules that concern what the company says are then checked only in these speakers' segments.
thresholdnumberNoSegment score that marks an escalation (default 2).
merge_snumberNoMoments closer than this are merged (default 15 s).
extra_keywordsarrayNoOwn words or phrases, weight 1 each (matched case-insensitively as whole words).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "transcript": {
      "type": [
        "string",
        "object",
        "array"
      ],
      "minLength": 1,
      "maxLength": 3000000,
      "description": "Transcript as WebVTT or SRT text (speakers from <v Name> voice tags or \"Name:\" prefixes), or JSON (text or object) with a list of segments, utterances, turns, cues or words carrying start, end, speaker and text – e.g. the output of medienwerk /v1/stt or /v1/diarize, Whisper, AssemblyAI or Deepgram."
    },
    "segments": {
      "type": "array",
      "minItems": 1,
      "maxItems": 5000,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "start",
          "end",
          "text"
        ],
        "properties": {
          "start": {
            "type": "number",
            "minimum": 0,
            "maximum": 86400,
            "description": "Start time in seconds."
          },
          "end": {
            "type": "number",
            "minimum": 0,
            "maximum": 86400,
            "description": "End time in seconds."
          },
          "speaker": {
            "type": "string",
            "maxLength": 100,
            "description": "Speaker label as delivered by diarisation, e.g. \"A\", \"SPEAKER_00\" or \"Agent\"."
          },
          "text": {
            "type": "string",
            "maxLength": 5000,
            "description": "Text of the segment."
          }
        }
      },
      "description": "Alternative to transcript: segments with start/end in seconds, speaker and text."
    },
    "time_unit": {
      "type": "string",
      "enum": [
        "auto",
        "s",
        "ms"
      ],
      "default": "auto",
      "description": "Unit of start/end in JSON transcripts; auto treats integer values with a median segment length above 60 as milliseconds."
    },
    "audio_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "Optional call audio for loudness as base64 (at most 10 MiB decoded; a data: URL prefix is accepted). Formats: WAV/RF64/W64, AIFF, FLAC, MP3/MP2, AAC (ADTS, M4A/MP4), ALAC, Ogg Vorbis/Opus, WebM/Matroska, CAF, WavPack, APE, TTA, AMR, AU, AC-3/E-AC-3, DTS, WMA (ASF), AVI, MPEG-TS/PS, FLV; for video containers the first audio track is used."
    },
    "audio_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "Public http(s) URL of the optional call audio for loudness (at most 10 MiB; private and local addresses are refused)."
    },
    "agent_speakers": {
      "type": "array",
      "maxItems": 20,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100
      },
      "description": "Speaker labels of the company side (agent, IVR). Rules that concern what the company says are then checked only in these speakers' segments."
    },
    "threshold": {
      "type": "number",
      "minimum": 0.5,
      "maximum": 10,
      "default": 2,
      "description": "Segment score that marks an escalation (default 2)."
    },
    "merge_s": {
      "type": "number",
      "minimum": 0,
      "maximum": 120,
      "default": 15,
      "description": "Moments closer than this are merged (default 15 s)."
    },
    "extra_keywords": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 60
      },
      "description": "Own words or phrases, weight 1 each (matched case-insensitively as whole words)."
    }
  }
}

Open original schema

Published input example

{
  "transcript": "WEBVTT\n\n00:00:00.000 --> 00:00:04.000\n<v Agent>Thank you for calling, how can I help?\n\n00:00:04.000 --> 00:00:09.000\n<v Customer>I am calling for the third time about this invoice!\n\n00:00:09.000 --> 00:00:13.000\n<v Customer>This is unacceptable, I want to speak to your manager!!\n"
}

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 →