Logo: Lai Karaoke

Lai Karaoke

Organisatioun
lattifai
lai-karaoke

Generate viral-ready karaoke / lyric-video subtitles with per-word highlighting in one command. Adaptive font size from media resolution. Ready-made style presets for TikTok, Reels, Shorts, 抖音, 小红书, YouTube, and cinematic long-form. Trigger on "karaoke 字幕", "卡拉OK", "lyric video", "逐词歌词", "按字高亮", "TikTok 字幕", "抖音字幕", "Reels caption", "Shorts caption", "小红书歌词", "viral subtitles", "爆款字幕", or when a song / podcast / video clip is given and per-word highlighted captions are asked for. For general caption format conversion without karaoke styling, use /lai-caption.

Iwwersiicht

Editeurlattifai
Repositorylattifai-skills
Skill-Nummlai-karaoke
Stären
32
Forks
1
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    lattifai huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Lai Karaoke an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/lattifai/lattifai-skills/tree/main/skills/lai-karaoke
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lattifai/lattifai-skills.git /tmp/lattifai-skills
mkdir -p .claude/skills
cp -r /tmp/lattifai-skills/skills/lai-karaoke .claude/skills/lai-karaoke
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Lai Karaoke an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Lai Karaoke automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Lai Karaoke net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Karaoke / Lyric-Video Subtitles

One command → per-word highlighted ASS ready for TikTok, Reels, Shorts, 抖音, 小红书, or cinematic YouTube. Adaptive font size keeps captions sharp across 1080p, 4K, portrait, square, and cinematic aspect ratios without manual tuning.

🚫 Karaoke prerequisite — language must match the audio. Karaoke is an audio-sync visual: the highlight follows the actual word being spoken. So the caption text must be in the same language as the audio. If the user wants a different language on screen (e.g. English audio + Chinese captions), DO NOT make a karaoke in the target language — the timestamps were aligned to source-language words and the highlight will desync nonsensically. Instead:

  • Bilingual (most common) → keep source-language karaoke on top, add a static translated reading line below. See /lai-translate §Bilingual Delivery Guide → Recipe R3.
  • Dubbing (rare) → regenerate target-language audio, then re-align and karaoke against the new audio.

Quick rule: audio_lang != caption_lang ⇒ bilingual, never single-line karaoke.

Zero-Arg Hero Path

Invoke through your agent (in Claude Code: /lai-karaoke <input>; in Codex CLI / Gemini CLI: ask the agent to run lai-karaoke and pass the input). The agent then automates the full chain:

/lai-karaoke https://youtu.be/VIDEO_ID
/lai-karaoke /path/to/video.mp4
/lai-karaoke /path/to/aligned.json   # when alignment already exists

Default behavior (agent executes):

  1. /lai-youtube with caption.input.split_sentence=false caption.render.word_level=true (per-word alignment, MP4 for resolution probe; flip to split_sentence=true if auto-captions break mid-sentence)
  2. scripts/probe_media.py reads the downloaded mp4 and computes font_size, play_res_x, play_res_y
  3. Aspect-aware preset auto-selected (portrait → tiktok, landscape → cinematic, square → minimal) — the agent announces the choice and accepts an override
  4. laicap-convert writes <base>.karaoke.<preset>.ass in the current directory (<base> = video ID for YouTube input, media stem for local files)
  5. Agent finishes with a cross-promo — multilingual (/lai-translate), custom tuning (/lai-caption), or speaker-colored (/lai-diarize)

Named Style Presets

Each preset = karaoke_effect × karaoke_color_scheme × kinetic_style, battle-tested for a specific distribution channel.

The highlight direction column tells you which color the un-sung text fades to when the highlight passes — this is the visual-anchor color the viewer's eye latches onto. KTV convention: highlight = saturated (gold/red/cyan), un-sung = neutral (white). cinematic intentionally inverts this for a "fading out" feel; if you want canonical KTV direction, see §Custom color override below.

PresetEffectColor schemeKineticHighlight direction (un-sung → sung)Built for
tiktoksweepsunset-warmpopwhite → orange-pinkTikTok / Reels / Shorts — warm punchy pop
douyininstantnavy-pinkshakenavy → pink抖音潮流感、快切节奏
cinematicsweepprussian-elegantfadegold → white (inverted; KTV-canonical wants white → gold)YouTube 长视频 / 播客 / 电影感
neonoutlinemint-oceanneonmint → ocean blue赛博 / 电子乐 / game clip
minimalinstantazure-gold(none)azure → gold商务 / 教程 / 播客精华

Ask in plain language:

"用 tiktok 风格做个 karaoke" / "cinematic 风" / "给我个极简商务款"

The agent maps your phrasing to the preset table above (or asks if ambiguous).

For fully custom tuning (12 color schemes × 15 kinetic styles × 3 effects = 540 combos), see /lai-caption §Karaoke.

Agent Workflow

The agent should drive this skill — do not require a wrapper CLI. Follow this decision tree:

Step 1 — Classify input

User providesNext
YouTube URL/lai-youtube align with caption.input.split_sentence=false caption.render.word_level=true, MP4 output
media + transcript (SRT/VTT/JSON)/lai-align with caption.render.word_level=true, JSON output
aligned.json onlyAsk for original media path (needed to probe resolution)
diarized.jsonUse it directly; plan on ass.speaker_color=auto or a CSV
bilingual JSON (text + translation)Use it directly; plan on ass.translation_color=... (renders source-language karaoke + static translation line)
translated-only JSON (e.g. English audio aligned, then translated to Chinese — text already replaced with the target language)STOP — language guard violated. The word timestamps belong to the source language; rendering them as karaoke in the target language will desync. Re-route to /lai-translate Recipe R3 (bilingual reading line) instead.

Confirm with the user before starting if their intent is ambiguous (e.g., they only said "做个 karaoke" without specifying input).

Step 2 — Probe media resolution

bash
python <skill>/scripts/probe_media.py <media_path> [--target-platform tiktok|...]

Returns JSON: {width, height, aspect, font_size, play_res_x, play_res_y, source}. source is probe (from ffprobe) or platform-default:<name> (audio-only fallback).

If the input is audio-only (mp3/wav/m4a, width ≈ height = 0), ask the user for the target platform and pass --target-platform to drive the fallback.

Step 3 — Pick a preset

Auto-select if the user didn't specify one:

  • aspect == "portrait" → tiktok
  • aspect == "landscape" → cinematic
  • aspect == "square" → minimal

Always tell the user which preset you picked; they can override.

Step 4 — Render

Map preset → ASS config, then call laicap-convert:

bash
# Example: preset=tiktok, probe={font_size:86, play_res_x:1080, play_res_y:1920}
# render.word_level is default word-scope — karaoke_effect alone triggers per-word \k.
# Only pass render.word_level=false when you want line-scope (single override per line).
laicap-convert --direct -Y \
    la0CaZ2R8EY.aligned.json la0CaZ2R8EY.karaoke.tiktok.ass \
    render.include_speaker_in_text=true \
    ass.karaoke_effect=sweep \
    ass.karaoke_color_scheme=sunset-warm \
    ass.kinetic_style=pop \
    ass.font_size=86 \
    ass.play_res_x=1080 \
    ass.play_res_y=1920 \
    standardization.start_margin=0.05 \
    standardization.end_margin=0.15

Input JSON must carry words arrays (upstream /lai-align or /lai-youtube with caption.render.word_level=true); without that the effect falls back silently to line-scope.

Speaker-aware variant (when input is diarized.json):

bash
    ass.speaker_color="#658AE4,#FFC209,#F7C3D9,#CC5D84"   # per-speaker palette

Bilingual variant (input has translation populated — see /lai-translate §Bilingual Delivery Guide for format selection, typography rules, and dual-track vs dual-line trade-offs):

bash
    ass.translation_color="#00FFFF"   # accent on the translation line
Custom color override (KTV-canonical "white → gold")

To swap any preset to KTV-canonical direction (un-sung neutral → sung accent), do NOT pass ass.karaoke_color_scheme=... because the scheme overrides individual color fields (see lattifai/caption/config.py:apply_karaoke_color_scheme). Pass colors directly:

bash
laicap-convert --direct -Y la0CaZ2R8EY.aligned.json la0CaZ2R8EY.karaoke.swapped.ass \
    ass.karaoke_effect=sweep \
    ass.kinetic_style=fade \
    ass.primary_color="#FFD700" \      # sung = gold (visual anchor)
    ass.secondary_color="#FFFFFF" \    # un-sung = neutral white
    ass.outline_color="#1A2B4D" \      # keep prussian-elegant outline
    ass.font_size=151 \
    ass.play_res_x=3840 ass.play_res_y=2160

Precedence rule (commit to memory): ass.karaoke_color_scheme overrides ass.primary_color / ass.secondary_color / ass.outline_color. Setting both is a footgun — pick one path.

Step 5 — Cross-promote (funnel)

After successful render, always surface one of:

  • Multilingual → "Want a Chinese / Japanese / Spanish lyric video? Run /lai-translate on aligned.json, then re-render."
  • Custom tuning → "Tune colors / font / margins? See /lai-caption §Karaoke — 12 color schemes × 15 kinetic styles available."
  • Speaker colors → "Multi-speaker clip? Run /lai-diarize first, then re-render with ass.speaker_color=auto."

Adaptive Font Size

Font size is picked from the shorter edge of the media, tuned per aspect:

AspectFormulaExample inputRecommended font_size
portrait (w/h < 0.85)w × 0.081080×1920 (TikTok)86
square (0.85–1.4)h × 0.0751080×1080 (IG feed)81
landscape (w/h > 1.4)h × 0.071920×1080 (YT)76
4K landscapeh × 0.073840×2160151
2.35:1 cinematich × 0.073840×1634114

Also set ass.play_res_x / ass.play_res_y to the actual media width/height so ASS renderers scale all metrics (outline width, shadow depth, margins) correctly for the downstream player. probe_media.py emits these values directly.

Override knobs for the agent:

  • User asks "字再大一点" → multiply font_size by 1.2–1.4
  • User asks "轻一点 / 不要太大" → multiply by 0.7–0.85
  • Long portrait text overflowing → reduce by ~10% or tighten ass.margin_l / ass.margin_r

Output Convention

Default output path: <base>.karaoke[.<style>].ass in the current directory (<base> = video ID or media stem). Multi-style exports coexist, e.g.:

la0CaZ2R8EY.mp4
la0CaZ2R8EY.karaoke.tiktok.ass
la0CaZ2R8EY.karaoke.cinematic.ass

For the exhaustive matrix (3 × 12 × 15 × 2 = 1080 combinations) used in visual tuning, see /lai-caption §Karaoke — this skill intentionally ships only 5 curated presets to keep the decision light.

Common Issues

ProblemFix
ffprobe: command not foundbrew install ffmpeg (macOS) or your distro equivalent
Audio-only input, no resolutionPass --target-platform tiktok|youtube|... for a fallback
Karaoke renders without per-word highlightingInput JSON has no words arrays — re-run /lai-align with caption.render.word_level=true
Text too small on 4K YouTubeMedia probed correctly? Confirm font_size >= 140 for 2160p landscape
Text overflows on portraitReduce font_size by 10% or set ass.wrap_style=2 (smart wrap)
Highlight color looks wrong (e.g. cinematic shows gold→white instead of white→gold)Use the Custom color override recipe above — pass ass.primary_color / ass.secondary_color directly without ass.karaoke_color_scheme (scheme overrides single fields)
Subtitles in different language than the audioYou're trying to karaoke a translation. Stop and switch to /lai-translate Recipe R3 (bilingual reading line). Karaoke requires audio_lang == caption_lang.

Related Skills

  • /lai-youtube — URL → aligned captions (what this skill calls under the hood for URL input)
  • /lai-align — local media + transcript → aligned JSON
  • /lai-caption — full 540-combo karaoke matrix + broadcast subtitle profiles
  • /lai-translate — produce bilingual input for multilingual lyric videos
  • /lai-diarize — per-speaker colored karaoke

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Lai Karaoke?

Generate viral-ready karaoke / lyric-video subtitles with per-word highlighting in one command. Adaptive font size from media resolution. Ready-made style presets for TikTok, Reels, Shorts, 抖音, 小红书, YouTube, and cinematic long-form. Trigger on "karaoke 字幕", "卡拉OK", "lyric video", "逐词歌词", "按字高亮", "TikTok 字幕", "抖音字幕", "Reels caption", "Shorts caption", "小红书歌词", "viral subtitles", "爆款字幕", or when a song / podcast / video clip is given and per-word highlighted captions are asked for. For general caption format conversion without karaoke styling, use /lai-caption.

Firwat Lai Karaoke op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Lai Karaoke besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Lai Karaoke an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/lattifai/lattifai-skills/tree/main/skills/lai-karaoke an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Lai Karaoke benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Lai Karaoke benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Lai Karaoke domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Lai Karaoke gratis?

Jo. lattifai huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇