kara-templater
Build animated karaoke scenes in Python, write custom effects in WGSL, and preview them live in a browser.
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:
Documentholds your script resolution (PlayRes), styles, and timed lyric lines.Trackselects a vocal part (such as lead or harmony), places rows or columns, and applies built-in or custom effects.Scenecollects the measured lyric lines and any extra text, shapes, or groups into one renderable composition.- 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 continuous-time 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
- Start here: Overview · Quickstart · Core concepts · Example scripts
- Learn by building: Tutorials · Design a song layout · Effect recipes
- Task guides & reference: Guides · Command line · Preview and export · API reference
- 中文用户:从简体中文文档概览开始阅读完整中文教程与指南。
Metadata
Release files for kara-templater 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kara_templater-1.2.2.tar.gz | 5.7 MB | With provenance | Details for kara_templater-1.2.2.tar.gz |
Built distributions (wheels)
Total release size: 51.7 MB
Release files / kara_templater-1.2.2.tar.gz
| Download URL | kara_templater-1.2.2.tar.gz |
|---|---|
| Size | 5.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a658a2fe38056eb255a27b933d93b116280557730dfb82a221250aa11a578992
|
|
BLAKE2b-256 checksum How to use checksums |
1f22b1bfb92f287e37b2aee6772f85dfeb0b0f2853f8291e797ebc0d6bda8def
|
| 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 28, 2026.
Transparency logRelease files / kara_templater-1.2.2-cp315-cp315-win_amd64.whl
| Download URL | kara_templater-1.2.2-cp315-cp315-win_amd64.whl |
|---|---|
| Size | 8.3 MB |
| Tags | CPython 3.15 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
80d7da765b425acc11f2671f513e4710c971cc3164e1c4468fbfd6f71aae8817
|
|
BLAKE2b-256 checksum How to use checksums |
0315e68190e8ac3f27347bf103339b1dfab54c167ead0b4e6431906e0a7a07ac
|
| 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 28, 2026.
Transparency logRelease files / kara_templater-1.2.2-cp315-cp315-manylinux_2_28_x86_64.whl
| Download URL | kara_templater-1.2.2-cp315-cp315-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.15 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
e64c7c006a484163b588dc8cbce296b554ea73a0d18ee8d1d3a511119d15f198
|
|
BLAKE2b-256 checksum How to use checksums |
537a4f06e125a90ba26d5c41ff94c7fc5f14be37b68900f1f8b04fcf75d43e56
|
| 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 28, 2026.
Transparency logRelease files / kara_templater-1.2.2-cp314-cp314-win_amd64.whl
| Download URL | kara_templater-1.2.2-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 8.3 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
99661e9afd06c3c5b704cd3b988248c60205e3de82aee5a61f35f63329897c49
|
|
BLAKE2b-256 checksum How to use checksums |
03bee9a09c276e791b69c0c99af9c69ff7934478bff87acb19d4b5847c72ed8f
|
| 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 28, 2026.
Transparency logRelease files / kara_templater-1.2.2-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | kara_templater-1.2.2-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
26127dd3836c32a3e26f8751bb5c912a14c4fe9438292e7311f578f1e04f7dd9
|
|
BLAKE2b-256 checksum How to use checksums |
a805285efb3a3c136106d2899e07883563d58f46b18fef17178af7ec9db4282d
|
| 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 28, 2026.
Transparency logRelease files / kara_templater-1.2.2-cp313-cp313-win_amd64.whl
| Download URL | kara_templater-1.2.2-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 8.1 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
133b6e52ee2c2cc6eab65d9699c57a00b90f27621be886666f536be16761482a
|
|
BLAKE2b-256 checksum How to use checksums |
dd004e22bdc3ecd50049ca650eebd366b8f4cf5f0a9cf7674e4ce1a88a211c9e
|
| 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 28, 2026.
Transparency logRelease files / kara_templater-1.2.2-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | kara_templater-1.2.2-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d06c3257ae329d303ab2ea05b7a2434334c7b55153939690a45da797afd44b63
|
|
BLAKE2b-256 checksum How to use checksums |
d70b1d5ad0106e99773b346e501b3b980c1dfc99da51bcae64d952b63955e8d2
|
| 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 28, 2026.
Transparency logRelease files / kara_templater-1.2.2-cp312-cp312-win_amd64.whl
| Download URL | kara_templater-1.2.2-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 8.1 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f102ec548bab52aa360118a64ca81d7bdef8b130a1e2982f7b587f9fd1d79cf9
|
|
BLAKE2b-256 checksum How to use checksums |
20e072c1e6040996028e8107c69b0e52703c1ea3b15982bf5022d7e9537490bb
|
| 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 28, 2026.
Transparency logRelease files / kara_templater-1.2.2-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | kara_templater-1.2.2-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
67e0148ceccb41b1c25c0b0c2667c0551bed5e4a82ab211225a630f670eda85a
|
|
BLAKE2b-256 checksum How to use checksums |
7e2c73b4769fc5d87bfeefd26104f667f43425a3b68066e5d499d917e8f20dc9
|
| 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 28, 2026.
Transparency logSecurity for kara-templater 1.2.2
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.
Attestation for kara_templater-1.2.2.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 28, 2026.
Transparency logA 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.