Lai Captionのロゴ

Lai Caption

組織
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`).

概要

公開者lattifai
リポジトリlattifai-skills
スキル名lai-caption
スター
32
フォーク
1
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    lattifaiがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Lai Caption」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/lattifai/lattifai-skills/tree/main/skills/lai-caption
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでLai Captionを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にLai Captionを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Lai Captionは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

よくある質問

AIスキル「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`).

TypingMindでLai Captionを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Lai Captionはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにLai Captionをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/lattifai/lattifai-skills/tree/main/skills/lai-captionを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Lai Captionを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Lai Captionで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもLai Captionを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Lai Caption」は無料ですか?

はい。lattifaiがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇