ass_karaoke_set_timings
Write explicit per-syllable durations or absolute times for ASS karaoke lines, enabling accurate timing without stretching to fit.
Instructions
Write explicit per-syllable durations or absolute times.
Arguments
timings list of durations, list of {"duration_ms"|"duration_cs"|"start_ms"+ "end_ms"} dicts, or — when unit is an absolute spelling —
one start time per syllable, a list of [start, end] pairs, or
n + 1 boundary times.
unit "ms" / "cs" (values are durations), or
"absolute_ms" / "absolute_cs" / "absolute" /
"times" (values are absolute times). Absolute times must
be monotonically increasing.
kind force every syllable to this kind; None (default) keeps each
syllable's existing kind.
strict True (default): a count mismatch raises :class:ToolError
naming both counts. False pads with zeros / drops extras.
mode/marker/pattern
how to split a line that has no karaoke tags yet.
Returns
{"text_source": "line", "doc_id", "unit", "kind", "strict", "lines": [{"index", "syllable_count", "timing_count", "padded", "old_text", "text", "syllables": [{"text", "kind", "duration_cs", "duration_ms"}], "duration_sum_cs", "line_duration_cs", "discrepancy_cs", "matches_line_duration", "message"}], "lines_changed": n, "reported_not_stretched": True}
Durations that do not add up to the line duration are reported in
discrepancy_cs/message; they are never stretched to fit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| mode | No | marker | |
| unit | No | ms | |
| index | No | ||
| doc_id | No | ||
| marker | No | | | |
| strict | No | ||
| pattern | No | ||
| timings | No | ||
| selection | No |