Skip to content

Main content

Closed Caption Speaker Label Budget

Count an explicit caption speaker-label prefix against a supplied Unicode code-point budget without truncating text or assuming display width.

Loading tool…

Description

Count supplied speaker-label and separator code points against a budget.

Communication measurements depend on clock alignment, content units and interval boundaries. Pause time divided by word time differs from pause share of the whole interval, and touching time intervals have no positive overlap. Character budgets must state whether they count code points, code units or another measure.

Count supplied speaker-label and separator code points against a budget.

When to use this tool

Use Closed Caption Speaker Label Budget when you already have maximumCodePoints, speakerLabel, separator and need to count supplied speaker-label and separator code points against a budget.

How to use the tool and how it works

  1. Enter maximumCodePoints, speakerLabel, separator. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read labelCodePoints, remainingCodePoints, fits. Inspect fits before interpreting the associated values.

Require maximumCodePoints a nonnegative safe integer; count Array.from(speakerLabel+separator), return maximum-count and count<=maximum.1

Input fieldMeaning and unitsAccepted input
maximumCodePointsMaximum Code PointsRequired. Safe integer; minimum 0.
speakerLabelSpeaker LabelRequired. Text; maximum UTF-16 length 8192.
separatorSeparatorRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
labelCodePointsCode points in speakerLabel plus separator together; not a byte or grapheme count.Required. Safe integer.
remainingCodePointsRemaining Code PointsRequired. Safe integer.
fitsFitsRequired. Boolean.
json
{
  "input": {
    "maximumCodePoints": 32,
    "speakerLabel": "Speaker A",
    "separator": ": "
  },
  "output": {
    "labelCodePoints": 11,
    "remainingCodePoints": 21,
    "fits": true
  }
}

Limitations and assumptions

  • The separator counts too and negative remainder is retained. Code points differ from graphemes, bytes and rendered width; no caption readability or format compliance is established.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Inspect the original message, recording, transcript and timing or display specification. Use the complete analysis and audience context for communication outcomes; a local delay, overlap or length calculation does not measure comprehension, effectiveness or intent.

References

  1. Calculation and input contract: communication/closed-caption-speaker-label-budget — tool.io

Similar or alternative tools