Skip to main content

kara-templater

Build animated karaoke scenes in Python, write custom effects in WGSL, and preview them live in a browser.

Japanese lyrics and their readings fill with gold as the highlight sweeps across each syllable

Documentation overview · Quickstart · Core concepts · Example scripts · API reference · 简体中文文档

What it does

kara-templater reads timed ASS lyrics (\k tags, ruby readings, and cues), shapes real font glyphs with FreeType and HarfBuzz, and lets you author reusable karaoke templates in Python.

Every template follows the same four-step pipeline:

  1. Document holds your script resolution (PlayRes), styles, and timed lyric lines.
  2. Track selects a vocal part (such as lead or harmony), places rows or columns, and applies built-in or custom effects.
  3. Scene collects the measured lyric lines and any extra text, shapes, or groups into one renderable composition.
  4. Preview or export compiles WGSL materials to GLSL with Naga. Open a real-time WebGL 2 preview, package the shader and its textures for mpv or FFmpeg, or compile standard ASS for subtitle compatibility.

Quick install and first export

Install Python 3.12 or newer along with the platform build prerequisites listed in Development setup, then install from the repository root inside a virtual environment:

python -m venv .venv
source .venv/bin/activate
python -m pip install .

Apply the built-in CLI preset to the bundled sample lyrics to export a 60 fps Hook:

kara-templater examples/karaoke.ass karaoke.hook

Or build a Scene in Python to control colors, placement, ruby readings, and animations:

from kara_templater import (
    Color,
    Document,
    KaraokeEffects,
    Layout,
    Line,
    Style,
    Track,
    Vec2,
    build_lyric_scene,
)

song = Document.create(
    width=640,
    height=360,
    styles=(Style(fontsize=72, bold=True, outline=3, shadow=0),),
)
song.records.append(
    Line(start_time=0, end_time=3000, text=r"{\k90}星|ほし{\k45}に{\k165}届け|とどけ")
)
gold = KaraokeEffects.duotone(
    before_fill=Color.hex("#281C26"),
    after_fill=Color.hex("#FFE09A"),
)
vocal = Track(id="vocal", layout=Layout(position=Vec2(80, 180)), effects=(gold,))
scene = build_lyric_scene(song, tracks=(vocal,))
scene.export("chorus.hook", fps=30)

Call scene.preview() to open the scene in your browser. The exported .hook can play over video in mpv or be rendered into a video with FFmpeg. See the Quickstart and Preview and export.

Explore the docs

Contributing · MIT license · Third-party notices

Metadata

Release files for kara-templater 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kara-templater 1.2.1
File Size Uploaded Provenance Actions
kara_templater-1.2.1.tar.gz 5.6 MB With provenance Details for kara_templater-1.2.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for kara-templater 1.2.1
File Actions
kara_templater-1.2.1-cp315-cp315-win_amd64.whl CPython 3.15 CPython 3.15 Windows x86-64 Details for kara_templater-1.2.1-cp315-cp315-win_amd64.whl
kara_templater-1.2.1-cp315-cp315-manylinux_2_28_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.28+ x86-64 Details for kara_templater-1.2.1-cp315-cp315-manylinux_2_28_x86_64.whl
kara_templater-1.2.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for kara_templater-1.2.1-cp314-cp314-win_amd64.whl
kara_templater-1.2.1-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details for kara_templater-1.2.1-cp314-cp314-manylinux_2_28_x86_64.whl
kara_templater-1.2.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for kara_templater-1.2.1-cp313-cp313-win_amd64.whl
kara_templater-1.2.1-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for kara_templater-1.2.1-cp313-cp313-manylinux_2_28_x86_64.whl
kara_templater-1.2.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for kara_templater-1.2.1-cp312-cp312-win_amd64.whl
kara_templater-1.2.1-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for kara_templater-1.2.1-cp312-cp312-manylinux_2_28_x86_64.whl

Total release size: 50.5 MB

Release files / kara_templater-1.2.1.tar.gz

Download URL kara_templater-1.2.1.tar.gz
Size 5.6 MB
Tags Source
SHA-256 checksum
How to use checksums
33b865a369e43043be98882ec0442f44b6c24ad840044330916f1a02df123e48
BLAKE2b-256 checksum
How to use checksums
bbba82e9594f5d681b7d44dbbc11c7ac6e6c5f001baa9a84242d43a14decd7b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kara_templater-1.2.1-cp315-cp315-win_amd64.whl

Download URL kara_templater-1.2.1-cp315-cp315-win_amd64.whl
Size 8.2 MB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
d0f4ecb043daeb7b41915a38aa915bb3d31f11b47dd670898a40e753324fdbe5
BLAKE2b-256 checksum
How to use checksums
e1070c1ef57398b43bc0429acf825c1f11285043f930596cf55660fe8f9a4793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kara_templater-1.2.1-cp315-cp315-manylinux_2_28_x86_64.whl

Download URL kara_templater-1.2.1-cp315-cp315-manylinux_2_28_x86_64.whl
Size 3.1 MB
Tags CPython 3.15 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5f9d31a4cc418f29a505a66ff6f976686e6bea875e7d6753d3039cd0ff028496
BLAKE2b-256 checksum
How to use checksums
135c89b570d1e10fa80d07e589312e6c69df8b9069dd69ba50ee2aad691339a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kara_templater-1.2.1-cp314-cp314-win_amd64.whl

Download URL kara_templater-1.2.1-cp314-cp314-win_amd64.whl
Size 8.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
64f74b1589ba20f89e528d1b5bb05e9087ddae2f910f7ddac4a4cd1139cd69fa
BLAKE2b-256 checksum
How to use checksums
f4e61da177c57419805edc41b0ca9a4225a8bcc891fe9b0f0b18c70b167a43e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kara_templater-1.2.1-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL kara_templater-1.2.1-cp314-cp314-manylinux_2_28_x86_64.whl
Size 3.1 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f62adfa5965809af5bba5c864bb6a6e923d2fc8ccfaaf1a2b729d9f94eb29902
BLAKE2b-256 checksum
How to use checksums
7194bb9ccdfec75d938a6ab003662f213a8bf3b7e943a8876ea801cf451f51e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kara_templater-1.2.1-cp313-cp313-win_amd64.whl

Download URL kara_templater-1.2.1-cp313-cp313-win_amd64.whl
Size 8.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b4b34319abf29943101cecace420c8d4b219c6ec42ded42cd275980db6480317
BLAKE2b-256 checksum
How to use checksums
c5e251f6c5d1245602edc4b31aabfe6d24cba374881f64d7f22ac9ebafd60263
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kara_templater-1.2.1-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL kara_templater-1.2.1-cp313-cp313-manylinux_2_28_x86_64.whl
Size 3.1 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d606817a7b8f1eb0fd95e768e719a2435529b93ef9c62181bacc6cd3404d03d4
BLAKE2b-256 checksum
How to use checksums
1870d86d3aedf4fc5df15ed34d1654155e520658f2a054fed5cd16b618ddf86e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kara_templater-1.2.1-cp312-cp312-win_amd64.whl

Download URL kara_templater-1.2.1-cp312-cp312-win_amd64.whl
Size 8.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
5b4df86630c281fc33938dde9d034481801f75aa86a048f7373e5dafed42b1cb
BLAKE2b-256 checksum
How to use checksums
f7d85b49fd7dab438a3cb28089052e9d7026b12f4d73fbcc7612da8c8547921b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kara_templater-1.2.1-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL kara_templater-1.2.1-cp312-cp312-manylinux_2_28_x86_64.whl
Size 3.1 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2e1b5a738caf71cb54e521c4e4dd3d511fba870885b3d4085d24ebe734ab92dc
BLAKE2b-256 checksum
How to use checksums
0186f53aea53a08de122c04586ce2772ecd7abe118b4516d156e2bce62a70bef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for kara-templater 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for kara_templater-1.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page