Logo van Lai Caption

Lai Caption

Organisatie
lattifai
lai-caption

Convert between 30+ caption/subtitle formats (SRT, VTT, ASS, JSON, TextGrid, LRC, FCPXML, Premiere, …) and shift timing. Trigger on "convert captions", "SRT to VTT", "转换字幕格式", "shift timing", "ASS styling", "karaoke effect", "导入Premiere", or any caption-format question. Do NOT trigger to fix timing accuracy (`/lai-align`) or translate (`/lai-translate`).

Overzicht

Uitgeverlattifai
Repositorylattifai-skills
Skillnaamlai-caption
Sterren
32
Forks
1
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door lattifai op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Lai Caption in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/lattifai/lattifai-skills/tree/main/skills/lai-caption
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die 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-caption .claude/skills/lai-caption
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Lai Caption in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Lai Caption automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Lai Caption niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Caption Format Conversion

Convert, shift, and style caption files. Format is auto-detected from file extension.

laicap-convert and lai caption convert are the same command — the former is the shortcut entry-point. For pipeline / non-interactive use, add --direct -Y (direct execution, skip confirmation).

Convert

laicap-convert (== lai caption convert) takes two positional args: input_path and output_path. All styling/rendering keys are flat top-level config (render.*, ass.*), not caption.*.

All examples assume a single <base> (media stem or YouTube ID) reused across the pipeline; outputs land in the current directory.

bash
# <base> = podcast
laicap-convert podcast.srt podcast.vtt

Common pairs:

bash
laicap-convert podcast.aligned.json podcast.srt        # JSON → playback formats
laicap-convert podcast.srt podcast.ass                 # basic → styled
laicap-convert podcast.transcript.md podcast.srt       # Gemini markdown → SRT
laicap-convert podcast.aligned.json podcast.TextGrid   # → Praat

Add -Y for non-interactive runs. Use input_format=srt (top-level flag) to override auto-detection when the extension is wrong.

Shift Timing

bash
laicap-shift podcast.srt podcast.shifted.srt 2.5     # forward 2.5 s
laicap-shift podcast.srt podcast.shifted.srt -1.0    # backward 1 s

ASS Styling

Top-level ass.* keys (see lai caption convert --help for the full list):

bash
laicap-convert podcast.srt podcast.ass \
    ass.font_name="Noto Sans CJK SC" \
    ass.font_size=48 \
    ass.primary_color="#FFFFFF"

Karaoke (per-word highlighting)

Requires word-level JSON input (produced by /lai-align with caption.render.word_level=true, or /lai-youtube with the same flag — the upstream flag populates words arrays in the JSON).

bash
laicap-convert podcast.aligned.json podcast.karaoke.ass \
    ass.karaoke_effect=sweep \
    ass.karaoke_color_scheme=azure-gold

render.word_level scope — default is word-scope (per-word \k / \kf / \ko emission). Only pass render.word_level=false to switch to line-scope (a single override at event start, whole text block animates together — CapCut-style "fade in"). You don't need render.word_level=true to enable karaoke; ass.karaoke_effect alone does it.

  • ass.karaoke_effect: sweep (classic karaoke fill), instant (hard on/off), outline (outline-only highlight)
  • ass.karaoke_color_scheme (12 presets, each tunes primary/secondary/outline/back): azure-gold, sakura-purple, mint-ocean, gardenia-green, sunset-warm, prussian-elegant, burgundy-classic, langgan-spring, mars-teal, spring-field, navy-pink, apricot-dark
  • ass.kinetic_style (orthogonal per-word animation, 15 options grouped by feel):
    • Impact: bounce, pop, shake, pulse, swing
    • Smooth: fade, zoom, rise, typewriter, blur_in
    • Stylized: glow, neon, wave, flicker, stagger

Bilingual ASS

Format selection, typography conventions (line order / color / font-size ratio), and four scenario recipes (learning SRT / social ASS / karaoke / dual-track upload) all live in /lai-translate §Bilingual Delivery Guide — don't duplicate. Minimal one-liner for a bilingual JSON from /lai-translate:

bash
# `<base>.translated.json` is the merged JSON (source + translation) from
# `/lai-translate merge.py --bilingual`.
laicap-convert podcast.translated.json podcast.zh.translated.ass \
    ass.primary_color="#FFFFFF" \
    ass.translation_color="#FFC209"

Add ass.karaoke_effect=sweep ass.karaoke_color_scheme=... for per-word karaoke on the source line.

Speaker Color

ass.speaker_color=... paints dialogue per speaker (needs /lai-diarize output in the source). Accepts:

  • "" — disabled (default)
  • "auto" — 10-color LattifAI palette (cycles for >10 speakers)
  • "#RRGGBB,#RRGGBB,..." — CSV of explicit colors, one per speaker in appearance order
bash
# Host = cyan-blue, Guest = pink — short CSV palette
laicap-convert diarized.json out.ass \
    render.include_speaker_in_text=true \
    ass.speaker_color="#658AE4,#F7C3D9"

Broadcast-Grade Profiles (standardization.*)

standardization.* reflows segments to meet CPL/CPS/duration rules before writing. Useful for delivering SRT/VTT to Netflix-class platforms or tighter YouTube specs.

Fields (all top-level):

  • standardization.min_duration / max_duration — segment duration bounds (s)
  • standardization.min_gap — minimum inter-segment gap (s)
  • standardization.max_lines / max_chars_per_line — line wrapping limits
  • standardization.optimal_cps — target characters-per-second for readability
  • standardization.start_margin / end_margin — pre/post roll per segment
  • standardization.margin_collision_mode — trim (default), drop, …

Ready-made profiles:

bash
# Netflix-ish: 42 CPL × 2 lines, 0.8-7 s
laicap-convert diarized.json out.netflix.srt \
    standardization.min_duration=0.8 \
    standardization.max_duration=7.0 \
    standardization.min_gap=0.08 \
    standardization.max_lines=2 \
    standardization.max_chars_per_line=42 \
    standardization.start_margin=0.05 \
    standardization.end_margin=0.15

# YouTube-ish: shorter cues, narrower lines
laicap-convert diarized.json out.youtube.srt \
    standardization.min_duration=0.5 \
    standardization.max_duration=5.0 \
    standardization.max_chars_per_line=35 \
    standardization.start_margin=0.03 \
    standardization.end_margin=0.10

start_margin / end_margin also benefit karaoke exports (give lyrics breathing room) — combine with the karaoke recipe above.

Supported Formats

CategoryFormats (read & write unless noted)
Standard.srt, .vtt, .ass / .ssa, .lrc, .txt, .md
Data.json, .tsv, .csv, .aud
Linguistic.TextGrid, .ttml / .xml
NLE.fcpxml; .prproj.xml (write-only)

Full list: lai caption convert --help.

Data Preservation

Convert to .json first to keep word-level timing, speakers, and translations — then fan out to delivery formats.

  • Word-level timing: JSON, TextGrid, ASS-karaoke only
  • Speakers: JSON, VTT, ASS, TextGrid (partial in SRT)
  • Full styling: ASS only

Common Issues

ProblemFix
Unknown input formatSpecify input_format=srt (top-level flag, not caption.input_format)
Encoding errorRe-save the file as UTF-8
Karaoke has no highlightingSource JSON needs words arrays — re-run /lai-align with caption.render.word_level=true, then convert with just ass.karaoke_effect=sweep (no render.word_level needed; default is word-scope)
No parameter named 'caption' / 'input'For laicap-convert, styling keys are flat (render.*, ass.*) and input/output are positional (input_path/output_path) — there is no caption.* namespace here
Plain text missing timingAdd timing via /lai-align first

Related Skills

  • /lai-align — fix timing accuracy (conversion doesn't change timing)
  • /lai-transcribe — generate captions from audio first
  • /lai-translate — translate before bilingual conversion
  • /lai-diarize — add speaker labels for speaker-colored output

Veelgestelde vragen

Wat doet de AI-skill Lai Caption?

Convert between 30+ caption/subtitle formats (SRT, VTT, ASS, JSON, TextGrid, LRC, FCPXML, Premiere, …) and shift timing. Trigger on "convert captions", "SRT to VTT", "转换字幕格式", "shift timing", "ASS styling", "karaoke effect", "导入Premiere", or any caption-format question. Do NOT trigger to fix timing accuracy (`/lai-align`) or translate (`/lai-translate`).

Waarom Lai Caption gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Lai Caption bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Lai Caption in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/lattifai/lattifai-skills/tree/main/skills/lai-caption. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Lai Caption gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Lai Caption gebruiken?

Zoveel als je wilt. Je kunt Lai Caption gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Lai Caption gratis?

Ja. Deze skill is door lattifai op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇