Skip to main content

kara-templater

A Python library for turning timed lyrics into animated karaoke subtitles. Arrange vocals and ruby readings on separate rows, sweep colour through each sung syllable, and export the result as ASS subtitles or a standalone libplacebo hook for mpv and FFmpeg.

Gold sweeps through 星に届け and its readings in time with three sung notes

Getting started · Effect gallery · Documentation · For AI agents

Render the example

This example uses inline ASS timing for brevity. Templates can also consume structured lyrics directly. With Python 3.12 or later and the library installed, run:

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

vocal = Style(fontsize=72, bold=True, outline=3, shadow=0)
song = Document.create(width=640, height=360, styles=(vocal,))
song.records.append(
    Line(start_time=0, end_time=3000, text=r"{\k90}星|ほし{\k45}に{\k165}届け|とどけ")
)

gold = KaraokeEffects.duotone(unsung=Color.hex("#281C26"), sung=Color.hex("#FFE09A"))
vocal_track = Track(id="vocal", layout=Layout(rows=1, position=Vec2(80, 180)), effects=(gold,))
scene = prepare_tracks(song, tracks=(vocal_track,))

scene.export_compact_ass("chorus.ass")
scene.export_hook("chorus.hook", fps=30)

Open chorus.ass as a subtitle over a video, or play chorus.hook with mpv’s GPU renderer. The two exports preserve the singing times. To see how their sweep edges differ, compare the same frame across renderers.

Use your own lyrics

Create lyric lines directly in Python, as in the example above, or load an existing karaoke ASS file with Document.load("song.ass"). For structured lyrics with explicit singing intervals and ruby, build a DocumentLyrics, wrap it with LyricSource.from_lyrics, and pass the sources to prepare_tracks through inputs=. Track guide

To reuse an effect across songs, put its Track configuration or scene builder in a Python file and run kara-templater song.ass styled.ass --effect my_effect.py. CLI and effect file examples

For AI agents

When asked to create or revise a karaoke template, start with the template authoring skill. It pairs tasks such as fixing a crowded row or adding particles with working Python examples and identifies the frames to check in the exported result.

Project

Contributing · MIT license · Third-party notices

Metadata

Release files for kara-templater 1.0.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.0.1
File Size Uploaded Provenance Actions
kara_templater-1.0.1.tar.gz 7.7 MB With provenance Details for kara_templater-1.0.1.tar.gz

Built distributions (wheels)

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

Total release size: 34.6 MB

Release files / kara_templater-1.0.1.tar.gz

Download URL kara_templater-1.0.1.tar.gz
Size 7.7 MB
Tags Source
SHA-256 checksum
How to use checksums
48c70f88596f25d294be6f178215668fe0bc36cc0b9d6dcfd9ee2cdd8a8eda1a
BLAKE2b-256 checksum
How to use checksums
03fc29ef9136e4d27145f453e110facbe0913cabd1e6e2aecf8463a8572b00e6
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 22, 2026.

Transparency log

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

Download URL kara_templater-1.0.1-cp315-cp315-win_amd64.whl
Size 5.8 MB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
2588ddccafc499d3681de7a24f7292fb0abad6c10acf9cc1ca9d43caef0634ea
BLAKE2b-256 checksum
How to use checksums
1db59e7e9f9219a30ca209fca61e05baa78ec28994bb0bd89a301fb92813b022
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 22, 2026.

Transparency log

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

Download URL kara_templater-1.0.1-cp315-cp315-manylinux_2_28_x86_64.whl
Size 992.0 kB
Tags CPython 3.15 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
519042ba6bc869b2598f346121c4905d79bb4ae282c83205623eebfa779d27f1
BLAKE2b-256 checksum
How to use checksums
1fa4b9fd52eebaa9ae281d7c6d8bc0607cd7aa662430fb5d9e35712c90f97876
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 22, 2026.

Transparency log

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

Download URL kara_templater-1.0.1-cp314-cp314-win_amd64.whl
Size 5.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
ec7ae819e036346c31adc1ff991fd05aa44b7f6f91a785bfa6784f2af8160d59
BLAKE2b-256 checksum
How to use checksums
bcbf3cfff98cd105cd9250a90f4986366f85490138ac105aff854c09feea7f7d
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 22, 2026.

Transparency log

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

Download URL kara_templater-1.0.1-cp314-cp314-manylinux_2_28_x86_64.whl
Size 991.6 kB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6f408a37dc93207fe0c4a900fdc6ec71ee19ed835118fbd7ad331a5aaf403769
BLAKE2b-256 checksum
How to use checksums
719ef64467cd2ce05d27da7a4c186b41aea29babdfdb4003e7ca7855e3f96810
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 22, 2026.

Transparency log

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

Download URL kara_templater-1.0.1-cp313-cp313-win_amd64.whl
Size 5.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
025ec5720e111fde63f6f597da1b261da72fa777ef90f4c9985c57277aa231f5
BLAKE2b-256 checksum
How to use checksums
b8ee0a5265be9eb23be7a1eae978ca4b2cd8d2871780d160defa146df2457064
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 22, 2026.

Transparency log

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

Download URL kara_templater-1.0.1-cp313-cp313-manylinux_2_28_x86_64.whl
Size 991.6 kB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a2a9da1bb63a19586d920c36d52be3241688a485ca55e95e43863d0faf5f754b
BLAKE2b-256 checksum
How to use checksums
1740d3b214e48e7b29abb2faee275ea86068e94663ffdffcfbb78bdd2c860ef1
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 22, 2026.

Transparency log

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

Download URL kara_templater-1.0.1-cp312-cp312-win_amd64.whl
Size 5.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
e7d0fa3bb58b747658aecafe2118721907652740558904960d0a57479170b001
BLAKE2b-256 checksum
How to use checksums
2a9e377cc5842e96135c2e4c5a1073faabe4313bafcfadb06647ca3bffe34110
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 22, 2026.

Transparency log

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

Download URL kara_templater-1.0.1-cp312-cp312-manylinux_2_28_x86_64.whl
Size 991.4 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f9684bb5cf3be5c7f592894b535a10c7a65ac958ca9a204a303bbbe1e2d4a419
BLAKE2b-256 checksum
How to use checksums
cbd5462babc750d051a352758d0c57324d7331ff05bb57fb157e00c7bc0ce21d
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 22, 2026.

Transparency log

Security for kara-templater 1.0.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.0.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 22, 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