ass_karaoke_template
Expand a karaoke template line into one generated ASS subtitle line per syllable, substituting $syl and $sdur while copying override tags verbatim.
Instructions
Expand a karaoke template line into one generated line per syllable.
This is a documented subset of the Aegisub karaoke templater. Only
$syl (the syllable text) and $sdur (the syllable duration in
centiseconds) are substituted; the template's other override tags (including
\t transforms) are copied verbatim into every generated line. Classes,
code/once/mixin lines, the rest of the variable set and the
effect library are not supported — see unsupported in the result.
Arguments
selection the lines whose syllables are expanded.
template_line / template_index
the template: a raw string, or a 0-based line index. With a
real template index the generated lines are inserted directly
after it and copy its Layer, Actor, Effect, kind, style and
margins; with a raw string they are appended after the last
selected line.
style style for the generated lines (default: the template's style,
else the Karaoke style).
mode how to split the target line when it has no karaoke tags yet
(marker / char / word / regex).
replace_existing
remove previously generated lines (same Effect marker) that sit
immediately after the template line before inserting.
create_styles
create the standard karaoke styles when style names one
that does not exist yet.
dry_run report the lines that would be generated without inserting.
Returns
{"doc_id", "template_subset": True, "subset_of_aegisub_karaoke_templater": True, "supported": [...], "unsupported": [...], "variables_used": [...], "unknown_variables": [...], "template": {...}, "dry_run", "inserted_count": n, "replaced_lines": n, "generated": [{"target_index", "syllable_index", "text", "syllable", "duration_cs", "start_ms", "end_ms", "start", "end", "layer", "actor", "style", "kind", "inserted_index"}], "generated_indices": [...]}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | marker | |
| style | No | ||
| doc_id | No | ||
| dry_run | No | ||
| selection | Yes | ||
| create_styles | No | ||
| template_line | No | ||
| template_index | No | ||
| replace_existing | No |