Skip to content

Main content

Random Subtitle Timing Practice Set Generator

Draw supplied plain caption text and inclusive positive millisecond durations, then delegate characters/second and words/minute. Characters are JavaScript code points with explicit whitespace inclusion/exclusion; words are nonempty whitespace-separated tokens, not linguistic segmentation. Compare only caller-supplied limits, without claiming readability or stripping markup.

Loading tool…

Description

Draw supplied plain caption text and inclusive positive millisecond durations, then delegate characters/second and words/minute. Characters are JavaScript code points with explicit whitespace inclusion/exclusion; words are nonempty whitespace-separated tokens, not linguistic segmentation. Compare only caller-supplied limits, without claiming readability or stripping markup.

A parser corpus pairs literal input spellings or structured documents with observable parser results or explicitly constructed expectations. Successful parsing, semantic validity, and exact round-trip preservation are separate properties, so test records retain the relevant evidence.

Draw supplied plain caption text and inclusive positive millisecond durations, then delegate characters/second and words/minute. Characters are JavaScript code points with explicit whitespace inclusion/exclusion; words are nonempty whitespace-separated tokens, not linguistic segmentation. Compare only caller-supplied limits, without claiming readability or stripping markup.

When to use this tool

Use this generator to create reproducible subtitle timing practice set cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply captions, minimumMilliseconds, maximumMilliseconds, characterMode, characterLimit, wordLimit, count in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read cases. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.

Draw supplied captions and inclusive integer durations in milliseconds. Count characters as Unicode code points with the chosen whitespace policy and words by nonempty whitespace splitting. Delegate characters per second and words per minute, then compare strictly with caller limits.1

Delegated operations used for this result: subtitle characters per second; subtitle reading speed. Their calculation or parsing conventions apply to the corresponding result fields.2, 3

Input fieldMeaning and unitsAccepted input
captionsCaptionsRequired. Array of Text; maximum UTF-16 length 2048.; minimum items 1; maximum items 64.
minimumMillisecondsMinimum MillisecondsRequired. Safe integer; minimum 1; maximum 9007199254740991.
maximumMillisecondsMaximum MillisecondsRequired. Safe integer; minimum 1; maximum 9007199254740991.
characterModeCharacter ModeRequired. Text; one of "include-whitespace", "exclude-whitespace".
characterLimitCharacter LimitRequired. Finite number; minimum 0.
wordLimitWord LimitRequired. Finite number; minimum 0.
countRequested count; the mechanics explain whether one draw expands into several returned records.Required. Safe integer; minimum 1; maximum 64.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
casesCasesRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 64.
cases[].captionIndexCaption IndexRequired. Safe integer; minimum 0; maximum 63.
cases[].textTextRequired. Text; maximum UTF-16 length 2048.
cases[].durationMillisecondsDuration MillisecondsRequired. Safe integer; minimum 1; maximum 9007199254740991.
cases[].durationSecondsDuration SecondsRequired. Finite number; strictly above 0.
cases[].characterCountCharacter CountRequired. Safe integer; minimum 0; maximum 2048.
cases[].wordCountWord CountRequired. Safe integer; minimum 0; maximum 2048.
cases[].charactersPerSecondCharacters Per SecondRequired. Finite number; minimum 0.
cases[].wordsPerMinuteWords Per MinuteRequired. Finite number; minimum 0.
cases[].exceedsCharacterLimitExceeds Character LimitRequired. Boolean.
cases[].exceedsWordLimitExceeds Word LimitRequired. Boolean.
randomnessReplay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source.Required. Object; no unknown keys.
randomness.seedOptional numeric replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "captions": [
      "Hello world!",
      "Hi 😀"
    ],
    "minimumMilliseconds": 1000,
    "maximumMilliseconds": 3000,
    "characterMode": "include-whitespace",
    "characterLimit": 4,
    "wordLimit": 60,
    "count": 3,
    "seed": 42
  },
  "output": {
    "cases": [
      {
        "captionIndex": 1,
        "text": "Hi 😀",
        "durationMilliseconds": 1897,
        "durationSeconds": 1.897,
        "characterCount": 4,
        "wordCount": 2,
        "charactersPerSecond": 2.1085925144965736,
        "wordsPerMinute": 63.257775434897205,
        "exceedsCharacterLimit": false,
        "exceedsWordLimit": true
      },
      {
        "captionIndex": 1,
        "text": "Hi 😀",
        "durationMilliseconds": 2340,
        "durationSeconds": 2.34,
        "characterCount": 4,
        "wordCount": 2,
        "charactersPerSecond": 1.7094017094017095,
        "wordsPerMinute": 51.282051282051285,
        "exceedsCharacterLimit": false,
        "exceedsWordLimit": false
      },
      {
        "captionIndex": 0,
        "text": "Hello world!",
        "durationMilliseconds": 2053,
        "durationSeconds": 2.053,
        "characterCount": 12,
        "wordCount": 2,
        "charactersPerSecond": 5.845104724792986,
        "wordsPerMinute": 58.45104724792986,
        "exceedsCharacterLimit": true,
        "exceedsWordLimit": false
      }
    ],
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Caption markup is not removed and whitespace-based words are not linguistic segmentation. Rate thresholds are caller settings rather than a guarantee of readability or subtitle-standard compliance.
  • A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Subtitle Timing Practice Set Generator — tool.io

  2. Calculation or validation: film/subtitle-characters-per-second — tool.io

  3. Calculation or validation: film/subtitle-reading-speed — tool.io

Similar or alternative tools

  • Random Text Encoding Detection Practice Cards Generator

    Encode supplied well-formed messages with selected existing UTF-8 base32/base64/Ascii85 or five-character HTML-entity encoders and sample practice cards; accepted labels include every source/encoding pair in that supplied bank yielding the same display, not universal encoding detection, and no-replacement applies to pairs rather than distinct prompts.

  • Random Linear Congruence Practice Set Generator

    Generate bounded linear congruences with exact delegated residue/period keys and enumerate every solution class modulo the supplied generated modulus.