Communitygithub.com

libz-renlab-ai/TeamBrain

HyperFramesコンポジションのためのアセット前処理:テキスト読み上げ(Kokoro)、音声/動画文字起こし(Whisper)、背景除去(u2net)を提供します。ナレーション作成、キャプション用の文字起こし、透明オーバーレイ用の背景除去、TTS音声やWhisperモデルの選択、およびこれらのチェーン処理(TTS→文字起こし→キャプション)に使用します。各コマンドは初回実行時にモデルをダウンロードします。

TeamBrain とは?

このスキルは、HyperFramesコンポジション向けにアセットを前処理するための3つのCLIコマンド(`tts`、`transcribe`、`remove-background`)を提供します。`tts`コマンドは、Kokoro-82Mモデルを使用してローカルで高品質な音声を生成し、APIキーは不要です。54種類以上の音声から選択でき、多言語にも対応しています。`transcribe`コマンドは、Whisperモデルを使用して音声や動画から単語レベルのタイムスタンプ付き文字起こしを行い、`transcript.json`を生成します。`remove-background`コマンドは、u2net_human_segモデルを使用して動画や画像から背景を除去し、透明なWebMやProRes 4444のMOVとして出力できます。各コマンドは初回実行時にモデルをダウンロードし、`~/.cache/hyperframes/`にキャッシュします。このスキールは、Claude CodeやCursor、CodexなどのAIエージェント環境で使用でき、ナレーション作成、キャプション生成、透明オーバーレイ作成といったHyperFramesコンポジション制作のワークフローを効率化します。

対応~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/libz-renlab-ai/TeamBrain/tree/HEAD/.agents/skills/hyperframes-media

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

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

ドキュメント

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明瞭なイギリス英語、フォーマル
カジュアル/SNSaf_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": "Hello", "start": 0.0, "end": 0.5 },
  { "id": "w1", "text": "world.", "start": 0.6, "end": 1.2 }
]

背景除去(remove-background)

動画や画像から背景を除去し、コンポジション内で透明なオーバーレイとして配置できるようにします(例:背景プレートの上に浮かぶアバター)。

npx hyperframes remove-background avatar.mp4 -o transparent.webm  # デフォルト:VP9アルファWebM
npx hyperframes remove-background avatar.mp4 -o transparent.mov   # ProRes 4444(編集用)
px hyperframes remove-background portrait.jpg -o cutout.png      # 単一画像の切り抜き
npx hyperframes remove-background avatar.mp4 -o transparent.webm --device cpu
npx hyperframes remove-background --info                          # 検出されたプロバイダーを表示

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

出力形式

形式使用する場面
.webm(VP9 + アルファ)デフォルト。コンポジションで<video>を使って直接再生します。
.mov(ProRes 4444)DaVinci/Premiere/FCPでの編集用。ファイルサイズが大きくなります。
.png単一画像の切り抜き(静止した被写体、背景に重ねる場合)。

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

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

録音済みのナレーションがない場合、音声を生成してから文字起こしすることで、キャプション用の単語レベルのタイムスタンプを取得できます。

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

Whisperは生成された音声から正確な単語境界を抽出するため、手動調整なしでキャプションのタイミングが配信に一致します。

Individual skills in this repo

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

libz-renlab-ai/TeamBrain

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.

libz-renlab-ai/TeamBrain

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 CLI commands (init, lint, preview, render, transcribe, tts) see the hyperframes-cli skill.

libz-renlab-ai/TeamBrain

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 — for example "port my Remotion project to HyperFrames", "convert this Remotion code to HyperFrames", "migrate from Remotion", "translate this Remotion comp", or "rewrite this as HyperFrames HTML". Do NOT use when (a) the user is authoring a NEW HyperFrames composition, even if they have or are A/B-testing a similar Remotion video; (b) the user mentions Remotion in passing without asking for migration; (c) the user shares Remotion code as reference material rather than asking for a translation; (d) the user asks for "the same video as my Remotion one" without explicitly asking to migrate the source — treat that as a fresh HyperFrames build. When in doubt, default to authoring a native HyperFrames composition with the `hyperframes` skill instead. Skill detects unsupported patterns (use...

libz-renlab-ai/TeamBrain

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.

libz-renlab-ai/TeamBrain

HyperFrames CLI tool — hyperframes init, lint, inspect, preview, render, transcribe, tts, doctor, browser, info, upgrade, compositions, docs, benchmark. Use when scaffolding a project, linting, validating, inspecting visual layout in compositions, previewing in the studio, rendering to video, transcribing audio, generating TTS, or troubleshooting the HyperFrames environment.

関連スキル