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.0

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.0
File Size Uploaded Provenance Actions
kara_templater-1.2.0.tar.gz 5.6 MB With provenance Details for kara_templater-1.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for kara-templater 1.2.0
File Actions
kara_templater-1.2.0-cp315-cp315-win_amd64.whl CPython 3.15 CPython 3.15 Windows x86-64 Details for kara_templater-1.2.0-cp315-cp315-win_amd64.whl
kara_templater-1.2.0-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.0-cp315-cp315-manylinux_2_28_x86_64.whl
kara_templater-1.2.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for kara_templater-1.2.0-cp314-cp314-win_amd64.whl
kara_templater-1.2.0-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.0-cp314-cp314-manylinux_2_28_x86_64.whl
kara_templater-1.2.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for kara_templater-1.2.0-cp313-cp313-win_amd64.whl
kara_templater-1.2.0-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.0-cp313-cp313-manylinux_2_28_x86_64.whl
kara_templater-1.2.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for kara_templater-1.2.0-cp312-cp312-win_amd64.whl
kara_templater-1.2.0-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.0-cp312-cp312-manylinux_2_28_x86_64.whl

Total release size: 50.5 MB

Release files / kara_templater-1.2.0.tar.gz

Download URL kara_templater-1.2.0.tar.gz
Size 5.6 MB
Tags Source
SHA-256 checksum
How to use checksums
cf67fb0549872644a02b94f3a0321a6668c848b411b6dfc29d530969f9ae2331
BLAKE2b-256 checksum
How to use checksums
2c18f2e32c8b1981849cc8be70e6b5eaa1b41d80aef4756cc4df62149babb17d
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 26, 2026.

Transparency log

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

Download URL kara_templater-1.2.0-cp315-cp315-win_amd64.whl
Size 8.2 MB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
bff7921ff35451e5b11d5415afafff2b144e26db0921414e56d46b0ad0d7745c
BLAKE2b-256 checksum
How to use checksums
b4edb7d1104dc034ddde80d1be4b5b99760cbc955b84639113839cee286b407a
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 26, 2026.

Transparency log

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

Download URL kara_templater-1.2.0-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
ecef742d68b0abae87355efa8ad21edbd9fcd267f7a7bfdb1218ec112c9b68c4
BLAKE2b-256 checksum
How to use checksums
3bd19190441fd4c0169f6a1db34d85a5c07a8e4b926045bac93bcf7c58b868ef
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 26, 2026.

Transparency log

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

Download URL kara_templater-1.2.0-cp314-cp314-win_amd64.whl
Size 8.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
4fe1a57cd38d07b7911f507b7b19265364675401eed477728fb0fa5f6b002f55
BLAKE2b-256 checksum
How to use checksums
880a9db319ec7f9395314d71ebf8b68f95b9033b475dec8751bbcbd7f8a484e7
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 26, 2026.

Transparency log

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

Download URL kara_templater-1.2.0-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
b029bc8e022e734506ec194589bec40bb165387bfea6950d503dc5f629e7d69e
BLAKE2b-256 checksum
How to use checksums
cdb2040072f6d44a6228d5fdd17fbdc31d82a080944bf0603f8419d6975dcec8
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 26, 2026.

Transparency log

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

Download URL kara_templater-1.2.0-cp313-cp313-win_amd64.whl
Size 8.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
47f2fdb5405efa932a03e2fadf628f5bee488889ce929008178e2f4f0c4db13e
BLAKE2b-256 checksum
How to use checksums
1d40d2c9d190fcd8f92c4a29468453b0f441a3890ab306af2b7e8825efebf18b
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 26, 2026.

Transparency log

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

Download URL kara_templater-1.2.0-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
5734b585555a71a2e09e7a275f1bf28140d5cdd983aa62ef60f67e5304289a51
BLAKE2b-256 checksum
How to use checksums
9046809f1371d3e684d6fe1d5872c60d8d50525b3bf6a456445b221b94296002
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 26, 2026.

Transparency log

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

Download URL kara_templater-1.2.0-cp312-cp312-win_amd64.whl
Size 8.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
57f6fc565b7b88445b685c072d76208259c40597deb00d59c6c4ffe133ffde56
BLAKE2b-256 checksum
How to use checksums
16f75583e776907b42022ef13663fc17cad558f00d00790b7824940d9ad94f91
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 26, 2026.

Transparency log

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

Download URL kara_templater-1.2.0-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
f663065e3fbb3ee57272c83600fbcf00c3466adcb465b26fb6736096139373fd
BLAKE2b-256 checksum
How to use checksums
25b1b143de819c27a5438eaf57a470c8f1e0219d2a34381332012ce1c5045591
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 26, 2026.

Transparency log

Security for kara-templater 1.2.0

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.0.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 26, 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