Communitygithub.com

delorenj/skills

HyperFramesコンポジション向けのアセット前処理 — テキスト読み上げナレーション(Kokoro)、音声/動画の文字起こし(Whisper)、透明オーバーレイ用の背景除去(u2net)。ナレーションの生成、キャプション用の音声書き起こし、透明オーバーレイとして使用するための動画/画像の背景除去、TTS音声またはWhisperモデルの選択、またはこれらの連鎖処理(TTS → 文字起こし → キャプション)を行う際に使用します。各コマンドは初回実行時にモデルをダウンロードします。

skills とは?

このスキルは、HyperFramesコンポジションで使用するメディアアセットを事前処理するための3つのCLIコマンドを提供します。`tts`コマンドは、Kokoro-82Mモデルを使用してローカルでテキスト読み上げ音声を生成し、54以上の多言語音声をサポートしています。`transcribe`コマンドは、Whisperモデルを使用して音声ファイルや動画ファイルから単語レベルのタイムスタンプを持つトランスクリプトJSONを生成します。`remove-background`コマンドは、u2net_human_segモデルを使用して、動画や画像から被写体の背景を除去し、透明なオーバーレイとして使用できるWebM(VP9+アルファ)やProRes 4444形式で出力します。これらのツールは、Claude Code、Terminal、または任意のNode.js対応環境で動作し、ナレーション付き動画の作成、キャプション生成、および合成ビジュアルの構築を効率的に行えます。

対応~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/delorenj/skills/tree/HEAD/hyperframes-media

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

プレビュー

スキル README より

ドキュメント

HyperFrames メディア前処理

3つのCLIコマンドでコンポジション用のアセットを生成します:tts(音声)、transcribe(タイムスタンプ)、remove-background(透明動画)。各コマンドは初回実行時にモデルをダウンロードし、~/.cache/hyperframes/ にキャッシュします。出力をプロジェクトに配置し、コンポジションHTMLから参照します。オーディオ/ビデオ要素の規約については hyperframes スキルを参照してください。

テキスト読み上げ (tts)

Kokoro-82Mを使用してローカルで音声を生成します。APIキーは不要です。

npx hyperframes tts "テキストはここ" --voice af_nova --output narration.wav
npx hyperframes tts script.txt --voice bf_emma --output narration.wav
npx hyperframes tts --list                       # 全54音声を一覧表示

音声の選択

コンテンツに合わせて音声を選択します。デフォルトは af_heart です。

コンテンツタイプ音声理由
製品デモaf_heart/af_nova温かみのある、プロフェッショナル
チュートリアル/ハウツーam_adam/bf_emma中立で、わかりやすい
マーケティング/プロモaf_sky/am_michaelエネルギッシュまたは権威的
ドキュメンテーションbf_emma/bm_george明瞭なイギリス英語、フォーマル
カジュアル/ソーシャルaf_heart/af_sky親しみやすく、自然

多言語対応

音声IDの最初の文字が言語をエンコードしています:a=アメリカ英語、b=イギリス英語、e=スペイン語、f=フランス語、h=ヒンディー語、i=イタリア語、j=日本語、p=ブラジルポルトガル語、z=中国語(北京語)。CLIは接頭辞から自動的に発音記号ロケールを検出します。音声がテキストと一致する場合、--lang は不要です。

npx hyperframes tts "La reunión empieza a las nueve" --voice ef_dora --output es.wav
npx hyperframes tts "今日はいい天気ですね" --voice jf_alpha --output ja.wav

自動検出を上書きする場合のみ --lang を使用します(様式化されたアクセントなど)。有効なコード:en-us、en-gb、es、fr-fr、hi、it、pt-br、ja、zh。英語以外の発音記号化には、システム全体に espeak-ng が必要です(brew install espeak-ng / apt-get install espeak-ng)。

速度

  • 0.7-0.8 — チュートリアル、複雑なコンテンツ、アクセシビリティ
  • 1.0 — 自然なペース(デフォルト)
  • 1.1-1.2 — イントロ、トランジション、アップビートなコンテンツ
  • 1.5+ — ほとんど適切ではありません。注意してテストしてください。

長いスクリプト

数段落を超える場合は、.txt ファイルに書き出してパスを渡します。約5分以上の音声になる入力は、セグメントに分割すると効果的な場合があります。

必要条件

Python 3.8+ と kokoro-onnx、soundfile が必要です(pip install kokoro-onnx soundfile)。モデルは初回使用時にダウンロードされます(約311 MB + 約27 MBの音声、~/.cache/hyperframes/tts/ にキャッシュ)。

文字起こし (transcribe)

単語レベルのタイムスタンプを含む正規化された transcript.json を生成します。

npx hyperframes transcribe audio.mp3
npx hyperframes transcribe video.mp4 --model small --language es
npx hyperframes transcribe subtitles.srt          # 既存のものをインポート
npx hyperframes transcribe subtitles.vtt
npx hyperframes transcribe openai-response.json

言語ルール(譲れません)

ユーザーが明示的に音声が英語であると述べた場合を除き、.en モデルは絶対に使用しないでください。 .en モデル(small.en、medium.en)は、英語以外の音声を文字起こしせずに英語に翻訳します。これにより、元の言語が静かに破壊されます。

  1. 言語が既知で、英語以外 → --model small --language <コード>(.en サフィックスなし)
  2. 言語が既知で、英語 → --model small.en
  3. 言語が不明 → --model small(.en なし、--language なし) — whisperが自動検出

デフォルトモデルは small であり、small.en ではありません。

モデルサイズ

モデルサイズ速度使用するタイミング
tiny75 MB最速クイックプレビュー、パイプラインのテスト
base142 MB高速短いクリップ、明瞭な音声
small466 MB中程度デフォルト — ほとんどのコンテンツ
medium1.5 GB低速重要なコンテンツ、ノイズの多い音声、音楽
large-v33.1 GB最遅プロダクション品質

ボーカルを含む音楽:最低でも medium から開始します。制作されたトラックは、多くの場合、手動によるSRT/VTTインポートが必要です。キャプション品質のチェック(すべての文字起こし後に必須)、クリーニングJS、リトライルール、OpenAI/Groq APIインポートパスについては、hyperframes/references/transcript-guide.md を参照してください。

出力形式

コンポジションは、単語オブジェクトのフラットな配列を消費します。id フィールド(w0、w1、...)は、キャプションオーバーライドでの安定した参照のために正規化中に追加されます。下位互換性のためにオプションです。

[
  { "id": "w0", "text": "こんにちは", "start": 0.0, "end": 0.5 },
  { "id": "w1", "text": "世界。", "start": 0.6, "end": 1.2 }
]

背景除去 (remove-background)

動画または画像から背景を除去し、被写体(通常は人物 — アバター、プレゼンター、トーキングヘッド)がコンポジション内で透明なオーバーレイとして配置されるようにします。

npx hyperframes remove-background subject.mp4 -o transparent.webm  # デフォルト: VP9 アルファ WebM
npx hyperframes remove-background subject.mp4 -o transparent.mov   # ProRes 4444(編集用)

npx hyperframes remove-background portrait.jpg -o cutout.png       # 単一画像のカットアウト
npx hyperframes remove-background subject.mp4 -o subject.webm \
  --background-output plate.webm                                   # 両方のレイヤーを1回のパスで
npx hyperframes remove-background subject.mp4 -o transparent.webm --device cpu
npx hyperframes remove-background --info                           # 検出されたプロバイダー

u2net_human_seg(MITライセンス)を使用します。初回実行時に約168 MBの重みが ~/.cache/hyperframes/background-removal/models/ にダウンロードされます。

レイヤー分離 (--background-output)

--background-output(または -b)を渡すと、カットアウトと一緒に2番目の透明動画を出力します:同じソースRGBですが、アルファは mask の代わりに 255 − mask です。カットアウトは透明な背景を持つ被写体です。プレートは、被写体があった場所に透明な穴が開いた、元の背景です。

ファイルアルファは…使用目的
-o subject.webmマスク — 被写体は不透明、背景は透明前景レイヤー、上部に配置
--background-output plate.webm反転 — 背景は不透明、被写体領域は透明最下層レイヤー。このレイヤーと被写体の間にテキストやグラフィックを配置

両方の出力は同じ --quality プリセットを共有し、単一の推論パスから実行されます — エンコードコストはほぼ2倍になりますが、セグメンテーションコストは変わりません。動画入力および .webm/.mov 出力でのみ有効です。

穴あきプレートであり、インペイントされたクリーンプレートではありません。 plate.webm の被写体領域は完全に透明です — 穴を埋めるには、その下に何か不透明なものを合成します。--background-output が適切なツールかどうかの単一のテスト:被写体があった場所のシルエットを通して、何かが見えることはありますか?

ユースケース適切なツール
カットアウトとプレートの間のテキスト/グラフィック(このコマンドが存在する理由)穴あけ (--background-output)
無関係なシーンへの被写体配置subject.webm のみ。プレートは無視
他のコンテンツなしで、部屋を_人物なしで_単独表示クリーンプレート — インペインター(LaMa、ProPainter、E2FGVI)が必要。このコマンドでは不可。
被写体を別の被写体に置き換えクリーンプレート — 上記と同じ

ユーザーが「人物を除去した部屋」を求め、それを単独で表示しようとしている場合、--background-output を使用しないでください。インペインターが必要であることを伝えてください。

典型的なレイヤー構成(標準的な穴あけユースケース):

<!-- z=1 反転アルファプレートは被写体領域以外をすべて埋めます -->
<video
  src="plate.webm"
  data-start="0"
  data-duration="6"
  data-track-index="0"
  muted
  playsinline
></video>

<!-- z=2 グラフィック/テキストは2つのレイヤーの間に配置されます -->
<h1 id="headline" style="z-index:2; ...">HYPERFRAMESで作ろう</h1>

<!-- z=3 カットアウトが被写体をヘッドラインの上に浮かべます -->
<div class="cutout-wrap" style="position:absolute;inset:0;z-index:3">
  <video
    src="subject.webm"
    data-start="0"
    data-duration="6"
    data-track-index="1"
    muted
    playsinline
  ></video>
</div>

これは以下のテキスト背後パターンと機能的に同等ですが、プロジェクトに元の presenter.mp4 を必要としません — プレートがそれを置き換えます。2つの透明レイヤーだけを出荷し、ユーザーが任意のコンテンツをそれらの間にドロップできるようにしたい場合に便利です。

出力フォーマット

形式使用時
.webm(VP9 + アルファ)デフォルト。コンポジションはこれを <video> 経由で直接再生します。
.mov(ProRes 4444)DaVinci/Premiere/FCPでの編集用。ファイルサイズが大きくなります。
.png単一画像のカットアウト(静止被写体、背景の上に配置)。

ChromeはVP9アルファをネイティブにデコードするため、.webm は他のミュート自動再生ビデオと同様にコンポジションにプラグインできます — <video> トラックの規約については hyperframes スキルを参照してください。

品質プリセット

--quality fast|balanced|best はVP9エンコーダのCRFのみを制御します — セグメンテーション品質は固定です。

プリセットCRF使用時
fast30反復処理中、より小さいファイル、緩やかな色の一致
balanced18デフォルト。ほとんどの用途で視覚的に同一
best12マスター/最終納品。最大ファイル、最も厳密な一致

合成パターン — 適切なものを選択

カットアウトWebMは、ソースmp4のRGBを再エンコードしたコピーです。この選択は、その背後に配置するものによって結果が異なります。

パターンカットアウトの背後にあるもの結果
カットアウトを別のシーンに重ねる(最も一般的)静的画像、グラデーション、または無関係の動画見栄えが良い。カットアウトのRGBが被写体の唯一のソースです — 二重化もエッジハローもありません。これが remove-background のために作られたものです。
カットアウトを自身のソースmp4に重ねる(テキスト背後パターン)カットアウトが生成されたのと同じmp4同じ人物に2つのRGBソースがあります。デフォルトの --quality balanced(crf 18)では二重化はほとんど見えません。--quality fast(crf 30)では、かすかな色ずれ/エッジハローが見えます。マスターには --quality best(crf 12)を使用してください。
カットアウトを_同じ人物の別テイク_に重ねる同じ被写体の映像2人の別々の人物が重なっているように見えます。これは行わないでください。

テキスト背後パターン(プレゼンターの背後にヘッドライン):

<video
  src="presenter.mp4"
  id="bg"
  data-start="0"
  data-duration="6"
  data-track-index="0"
  muted
  playsinline
></video>
<h1 id="headline" style="z-index:2; ...">HYPERFRAMESで作ろう</h1>
<div class="cutout-wrap" style="position:absolute;inset:0;z-index:3;opacity:0">
  <video
    src="presenter.webm"
    data-start="0"
    data-duration="6"
    data-track-index="1"
    muted
    playsinline
  ></video>
</div>

2つの重要なルール:

  1. カットアウト動画をタイム指定のない <div> でラップし、動画要素自体ではなくラッパーの不透明度をアニメーション化します。フレームワークはアクティブなクリップ(data-start/data-duration を持つ要素)に opacity:1 を強制するため、動画の不透明度を直接アニメーション化すると静かに上書きされます。ラッパーには data-* 属性がないため、CSS/GSAPで制御できます。
  2. 両方の動画で data-start="0" と data-media-start="0" を使用すると、フレームワークがt=0から同期してデコードします。カットアウトを後付けでマウントすると(data-start=3.3)、シーク+ウォームアップが発生し、ベースmp4から1フレームずれた状態になります — カット時に1フレームの位置ずれとして見えます。

その後、GSAPでカット時にラッパーの不透明度を切り替えます:tl.set(cutoutWrap, { opacity: 1 }, 3.3)。

TTS → 文字起こし → キャプション

録音済みのナレーションがない場合は、ナレーションを生成し、それを再度文字起こししてキャプション用の単語レベルのタイムスタンプを取得します:

npx hyperframes tts script.txt --voice af_heart --output narration.wav
npx hyperframes transcribe narration.wav   # → transcript.j``

Individual skills in this repo

This repo contains 14 individual skills — each has its own dedicated page.

delorenj/skills

Plan and generate terminal ASCII animations/screensaver-style output (FPS, refresh rules, loop policy, low-flicker guidance), with a static poster frame and an optional local demo script.

delorenj/skills

ASCII video: convert video/audio to colored ASCII MP4/GIF.

delorenj/skills

Plan, build and quality-check a premium short commercial for a real business (roofing, property, ecommerce, B2B software) using AI-generated footage, code-built motion (HTML/GSAP), selective Three.js and an independent-critic "Gauntlet" loop. Use when asked to make a launch-style / SaaS-style video, business ad, explainer, sample reel or pitch video, or to review and improve one. Encodes motion principles distilled from 28 professional launch films, a quality bar, audio rules and a business-offer playbook.

delorenj/skills

CSS animation adapter patterns for HyperFrames. Use when authoring CSS keyframes, animation-delay based timing, animation-fill-mode, animation-play-state, or CSS-only motion that HyperFrames must seek deterministically during preview and rendering.

delorenj/skills

Generate professional voiceovers using ElevenLabs AI. Use when the user needs to create voiceovers for videos, audio narration, or text-to-speech content. Supports multiple voices with character presets (narrator, salesperson, expert) for natural delivery. Includes single scene regeneration for fine-tuning.

delorenj/skills

HyperFrames CLI dev loop — `npx hyperframes` for scaffolding (init), validation (lint, inspect), preview, render, and environment troubleshooting (doctor, browser, info, upgrade). Use when running any of these commands or troubleshooting the HyperFrames build/render environment. For asset preprocessing commands (`tts`, `transcribe`, `remove-background`), invoke the `hyperframes-media` skill instead.

delorenj/skills

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, and registry discovery.

delorenj/skills

Create video compositions, animations, title cards, overlays, captions, voiceovers, audio-reactive visuals, and scene transitions in HyperFrames HTML. Use when asked to build any HTML-based video content, add captions or subtitles synced to audio, generate text-to-speech narration, create audio-reactive animation (beat sync, glow, pulse driven by music), add animated text highlighting (marker sweeps, hand-drawn circles, burst lines, scribble, sketchout), or add transitions between scenes (crossfades, wipes, reveals, shader transitions). Covers composition authoring, timing, media, and the full video production workflow. For dev-loop CLI commands (init, lint, inspect, preview, render) see the hyperframes-cli skill; for asset preprocessing commands (tts, transcribe, remove-background) see the hyperframes-media skill.

delorenj/skills

Manim CE animations: 3Blue1Brown math/algo videos.

delorenj/skills

Join a Google Meet or Zoom call as a video meeting agent via PikaStreaming. Trigger: user drops a Google Meet or Zoom link, or asks to join a meeting.

delorenj/skills

Translate an existing Remotion (React-based) video composition into a HyperFrames HTML composition. Use ONLY when the user explicitly asks to port, convert, migrate, translate, or rewrite a Remotion composition as HyperFrames (e.g. "port my Remotion project to HyperFrames"). Do NOT use when (a) authoring a NEW HyperFrames composition (even if A/B-testing a Remotion video); (b) Remotion is mentioned in passing; (c) Remotion code is shared as reference, not for translation; (d) the user wants "the same video as my Remotion one" without explicitly asking to migrate the source — treat as a fresh HyperFrames build. When in doubt, default to the `hyperframes` skill. Detects unsupported patterns (useState, useEffect side effects, async calculateMetadata, third-party React component libraries, `@remotion/lambda`) and recommends the runtime interop escape hatch instead of a lossy translation.

delorenj/skills

Generate speech using the self-hosted voxxy (vox) TTS service at https://vox.delo.sh. Use when the user asks to speak, say, narrate, synthesize speech, clone a voice, create a voice, add or register a voice, pipe TTS, or control voice qualities by description (e.g. "a young woman with a cheerful voice"). Handles HTTP API usage, voice profile management, description-based voice design, cloning, MCP registration, and integration patterns for new platforms.

delorenj/skills

Capture a website and create a HyperFrames video from it. Use when: (1) a user provides a URL and wants a video, (2) someone says "capture this site", "turn this into a video", "make a promo from my site", (3) the user wants a social ad, product tour, or any video based on an existing website, (4) the user shares a link and asks for any kind of video content. Even if the user just pastes a URL — this is the skill to use.

delorenj/skills

YouTube transcripts to summaries, threads, blogs.

関連スキル