Communitygithub.com

Aseel1600/Edit01

為 HyperFrames 合成作品建立音訊與媒體資產,由單一共享音訊引擎 (`scripts/audio.mjs`) 驅動 — 支援多供應商 TTS(HeyGen / ElevenLabs / Kokoro 本地)、背景音樂 + 音效(預設 HeyGen 音訊庫檢索,搭配本地 Lyria / MusicGen BGM 生成與內建 SFX 庫作為無憑證時的備援)、Whisper 語音轉寫、去背以及字幕編寫。可用於配音 / TTS、BGM、SFX / 音效、轉寫、字幕 / 歌詞 / 卡拉 OK / 逐字樣式、語音 + 供應商選擇以及音樂情緒提示。

Edit01 是什麼?

此技能為 HyperFrames 合成作品提供完整的音訊與媒體資產建立解決方案,一切由單一共享的 `scripts/audio.mjs` 引擎驅動。開發者可以透過標準化的 `audio_request.json` 與 `audio_meta.json` 格式,無縫整合語音合成(TTS)、背景音樂(BGM)與音效(SFX),而無需在各個工作流程中重複實作音訊邏輯。 引擎會根據 HeyGen 憑證是否存在,自動決定使用雲端 API(提供原生逐字時間戳)或本地引擎(ElevenLabs、Kokoro-82M 模型)作為備援。BGM 與 SFX 也遵循相同邏輯:有憑證時從 HeyGen 音訊庫檢索,無憑證時則自動切換至 Lyria/MusicGen 生成或使用內建的 21 個音效檔。此外,技能還整合了 Whisper 語音轉寫、去背以及強大的字幕編寫功能(支援卡拉 OK 與逐字樣式)。 此技能可在 Claude Code、Cursor 等支援 `npx hyperframes` CLI 的 AI Agent 平台上運作。使用前會透過 `npx hyperframes auth status` 進行簽入狀態檢查,確保開發者能明確選擇雲端或本地模式。適用於任何需要高品質配音、背景音樂與動態字幕的影片或互動式多媒體專案。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Aseel1600/Edit01/tree/HEAD/.agents/skills/hyperframes-media

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

HyperFrames Media

為合成作品建立所需的音訊與媒體資產 — 配音(TTS)、背景音樂 + 音效、語音轉寫、字幕、去背 — 然後在 HTML 中消費並動畫化這些資料。若要將資產放入合成作品中,請參閱 hyperframes-core。

音訊引擎 — TTS · BGM · SFX 的單一來源

工作流程不會手動製作音訊或複製供應商程式碼。只有一個引擎 — scripts/audio.mjs — 它接收中性的 audio_request.json 並寫入 audio_meta.json(同時將資產置於 assets/voice|bgm|sfx 下):

# <MEDIA_DIR> = 此技能目錄
node <MEDIA_DIR>/scripts/audio.mjs --request ./audio_request.json --hyperframes . --out ./audio_meta.json

所有三項功能都由一個開關決定降級方式 — 即 HeyGen 憑證是否存在(從 $HEYGEN_API_KEY / $HYPERFRAMES_API_KEY / ~/.heygen 解析,非 CLI):

功能HeyGen 憑證存在憑證不存在
TTSHeyGen Starfish REST(原生逐字時間戳)→ ElevenLabs → Kokoro(串接 transcribe 取得逐字時間戳)
BGMHeyGen 音樂檢索Lyria → MusicGen 本地生成(分離執行)
SFXHeyGen 音效檢索(min_score 0.4)內建 21 個音效檔庫(assets/sfx/)
  • 請求 (audio_request.json):{ provider?, lang?, speed?, lines: [{ id, text, sfx?: [names] }], bgm: { mode?, query?, prompt? } }。id 將每一行連結回呼叫者的模型(畫面編號、場景 ID 等)。bgm.mode = retrieve | generate | none;省略則為自動(有憑證時檢索,否則生成)。明確指定 retrieve 是嚴格的 — 它會跳過而非啟動分離的生成(適用於沒有 wait-bgm 步驟的呼叫者)。
  • 輸出 (audio_meta.json,以 id 為鍵):{ tts_provider, voice_id, bgm, bgm_pending, …, voices: [{ id, path, duration_s, words }], sfx: [{ id, name, file, source, offset_s, duration_s, volume }], total_duration_s }。
  • --only tts,bgm,sfx 執行子集並合併到現有的 --out 中(例如先執行 TTS+BGM,在提示存在後再加入 SFX)。
  • BGM 生成會以分離方式啟動(bgm_pending: true)— 在組裝前需執行 scripts/wait-bgm.mjs。
  • scripts/heygen-tts.mjs 是一個基於相同程式碼的一次性 CLI(一段文字 → wav + 逐字時間戳),適用於只需要 HeyGen TTS 而無需請求檔案的場景。

完整的旗標列表及 audio_meta.json 綱要位於 scripts/audio.mjs 的開頭註解中。以下參考資料涵蓋了每項功能背後的供應商細節與邊界情況。

預檢 — 在產生任何音訊前顯示登入狀態

在產生語音或 BGM 之前始終執行此命令 — 無論是在完整的工作流程中還是單次的「為我產生 BGM/配音」請求中。 沒有 HeyGen 憑證並非無聲降級到本地引擎的理由:首先建議登入,讓使用者決定。執行共享的預檢命令並照實轉送其輸出 — 不要自行編造「缺少金鑰」的提示,也不要提議將金鑰寫入每個儲存庫的 .env 檔案:

npx hyperframes auth status
  • 已登入 → 它會顯示帳戶資訊;繼續進行。
  • 未登入(此處 exit 1 是預期的 — 「未登入」是正常狀態,並非失敗) → 它會顯示註冊優先的引導。建議登入:npx hyperframes auth login 是瀏覽器 OAuth — 它會登入並建立帳戶(始終可透過此儲存庫的 CLI 使用)。若要使用現有的 HeyGen API 金鑰(來自 app.heygen.com/settings/api),請執行 npx hyperframes auth login --api-key — 它會將金鑰儲存到共享的 ~/.heygen(非每個儲存庫的 .env)。輸出中也會列出本地引擎將用於語音/BGM 的備援方案以及缺少依賴項時的 pip 提示。照實轉送此輸出 — 不要用自己的措辭重新詮釋。 然後停止並等待使用者選擇 — 登入,或說「go」/「local」以繼續離線模式 — 然後才開始產生任何內容。 這是一個真實的決策點,而非一個簡單的註記:不要將它摺疊到另一個問題中,也不要自行越過這個步驟。(例外情況:在自主 / 非互動模式下,記錄狀態並繼續離線執行。)
  • npx hyperframes auth status --json 會回傳 { configured, recommended_action, offline_engines },用於確定性分支。
  • 如果 CLI 無法執行(不在 PATH 上且 npx 無法取得) → 仍然建議登入(npx hyperframes auth login)並停止等待使用者選擇 — 不要將「無憑證」視為本地生成的無聲綠燈。

憑證解析、完整金鑰優先級以及本地依賴項列表請參閱 references/requirements.md。

供應商鏈(引擎背後的細節)

TTS — 第一個可用的供應商獲勝(引擎,或 npx hyperframes tts "..."):

順序供應商偵測時機逐字時間戳
1HeyGen (Starfish)$HEYGEN_API_KEY / hyperframes auth login有,原生 — 傳遞 --words narration.words.json 以捕捉
2ElevenLabs設定了 $ELEVENLABS_API_KEY無 — 之後串接 transcribe
3Kokoro-82M(本地,54 個語音)始終存在(無需金鑰)無 — 之後串接 transcribe

已發布的 hyperframes tts CLI 通常是僅本地模式的建置版本(其 --help 顯示「Kokoro-82M」,沒有 --provider/--words 選項),即使設定了 $HEYGEN_API_KEY 也會靜默地回退到 Kokoro。這就是為什麼引擎的 HeyGen 路徑是自包含的 scripts/heygen-tts.mjs(REST),而非 CLI;CLI 僅用於 Kokoro 路徑。請參閱 references/tts.md。

BGM & SFX — 預設從 HeyGen 音訊庫檢索(/v3/audio/sounds),使用與 HeyGen TTS 相同的憑證,無憑證時的備援方案如上表所示:

資產HeyGen type存放位置備援方案(無憑證)
BGMmusicassets/bgm/track.mp3(檢索) · track.wav(生成)Lyria / MusicGen 生成
SFXsound_effects(min_score 0.4)assets/sfx/<slug>.mp3內建 21 個音效檔庫(assets/sfx/* + manifest.json)

請參閱 references/bgm.md 與 references/sfx.md。

路由

任務閱讀
音訊引擎 — 請求/中繼資料綱要、--only、開關scripts/audio.mjs(開頭註解)
npx hyperframes tts / heygen-tts.mjs — 供應商、語音、逐字時間戳references/tts.md
BGM — HeyGen 檢索 + 本地 Lyria / MusicGen 生成references/bgm.md
SFX — HeyGen 檢索(min_score 0.4)+ 內建本地庫references/sfx.md
npx hyperframes transcribe — Whisper、模型規則、輸出格式references/transcribe.md
npx hyperframes remove-background — 透明去背references/remove-background.md
TTS → 轉寫 → 字幕(無錄製配音)references/tts-to-captions.md
字幕編寫 — 樣式偵測、版面配置、單詞分組、退出references/captions/authoring.md
轉寫稿處理 — 輸入格式、品質門檻、清理、APIreferences/captions/transcript-handling.md
字幕動畫 — 卡拉 OK、標記效果、音訊反應式references/captions/motion.md
模型快取、系統依賴項、故障排除references/requirements.md

不可協商的規則

  • 單一引擎,無複製程式碼。 透過 scripts/audio.mjs(或一次性 HeyGen TTS 的 heygen-tts.mjs)產生音訊。不要在工作流程中重新實作 TTS/BGM/SFX — 撰寫一個 audio_request.json 適配器並呼叫引擎。
  • 「HeyGen 可用」= 可解析的憑證,而非 CLI。 整個開關取決於 heygenCredential();已發布的 hyperframes tts 可能僅是 Kokoro 版本,而且根本沒有 hyperframes bgm / hyperframes sfx 指令。
  • 語音 ID 是供應商特定的。 am_michael 僅限 Kokoro;HeyGen UUID 無法在 Kokoro 上運作。如果你傳遞 --voice,也要同時指定 --provider 以避免在使用者環境變更時發生靜默的供應商漂移。
  • 始終傳遞 --model 給 transcribe。 CLI 的預設值 small.en 會靜默地翻譯非英文音訊。請參閱 references/transcribe.md →「語言規則」。
  • HeyGen 回傳逐字時間戳;ElevenLabs / Kokoro 則不會。 對於後兩者,引擎會自動串接 transcribe;若獨立使用,請傳遞 --words 給 HeyGen,或對音訊檔案執行 transcribe。
  • 字幕使用扁平單詞陣列格式,包含 { id, text, start, end }。請參閱 references/transcribe.md →「輸出格式」。
  • remove-background --background-output 是挖洞,而非修補。 對於「不含人物的場景」,需要使用不同的工具。請參閱 references/remove-background.md →「何時不該使用此工具」。
  • BGM/SFX 預設為 HeyGen 檢索;無憑證時的備援方案為生成(BGM)或內建庫(SFX)。 /audio/sounds 會根據文字查詢排序 — 請具體命名效果(glass shatter,而非 dramatic sound);無匹配則跳過,絕不會阻止渲染。SFX 在語音 + BGM 下的音量約為 0.35。請參閱 references/sfx.md / references/bgm.md。
  • 將工作流程的字幕 HTML 視為生成的輸出。 對於基於預設模板的影片,可重複使用的面板原始碼位於 .hyperframes/caption-skin.html,工作流程腳本則寫入 compositions/captions.html;請勿編輯生成的 compositions/captions.html 來修正面板。透過工作流程的 captions.mjs 重建,或在其存在時使用該工作流程的明確覆寫機制。

Individual skills in this repo

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

Aseel1600/Edit01

Generate AI videos from text prompts using multiple provider gateways. Use when: (1) Generating videos from text descriptions, (2) Creating AI-generated video clips for content production, (3) Image-to-video generation with a reference image, (4) Choosing between video generation providers (VEO, Kling, Sora, Runway, Seedance, MiniMax, Gemini Omni). Supports gateways: HeyGen API, fal.ai API, Kling official direct API, and the Gemini API (Gemini Omni Flash).

Aseel1600/Edit01

Create AI avatar videos with precise control over avatars, voices, scripts, scenes, and backgrounds using HeyGen's v2 API. Use when: (1) Choosing a specific avatar and voice for a video, (2) Writing exact scripts for an avatar to speak, (3) Building multi-scene videos with different backgrounds per scene, (4) Creating transparent WebM videos for compositing, (5) Using talking photos as video presenters, (6) Integrating HeyGen avatars with Remotion, (7) Batch video generation with exact specs, (8) Brand-consistent production videos with precise control.

Aseel1600/Edit01

Use p5.js/canvas for local procedural character effects: particles, weather, squash/stretch, walk cycles, and environmental motion.

Aseel1600/Edit01

Review local character animation with schema checks, Playwright browser previews, frame sampling, and FFmpeg/ffprobe final output checks.

Aseel1600/Edit01

Create videos from a text prompt using HeyGen's Video Agent. Use when: (1) Creating a video from a description or idea, (2) Generating explainer, demo, or marketing videos from a prompt, (3) Making a video without specifying exact avatars, voices, or scenes, (4) Quick video prototyping or drafts, (5) One-shot prompt-to-video generation, (6) User says "make me a video" or "create a video about X".

Aseel1600/Edit01

Generate Mandarin and multilingual narration with Volcengine Doubao Speech 2.0. Use when creating Chinese voiceovers, when the user prefers Doubao/Volcengine/火山引擎/豆包 TTS, or when narration needs character-level timestamp metadata for subtitles.

Aseel1600/Edit01

Video and audio processing with FFmpeg. Use for format conversion, resizing, compression, audio extraction, and preparing assets for Remotion. Triggers include converting GIF to MP4, resizing video, extracting audio, compressing files, or any media transformation task.

Aseel1600/Edit01

Generate expressive, multilingual narration with fish.audio (S1 / S2-generation models) and reuse cloned voices via reference_id. Use when the user prefers fish.audio/Fish Audio TTS, wants a specific playground voice model, or needs high-emotion voice-clone narration.

Aseel1600/Edit01

Use when implementing Disney's 12 animation principles with Framer Motion in React applications

Aseel1600/Edit01

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). HyperFrames-native: single paused timeline, seek-safe, deterministic.

Aseel1600/Edit01

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

Aseel1600/Edit01

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Aseel1600/Edit01

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

Aseel1600/Edit01

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, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

Aseel1600/Edit01

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s and up to ~30s, with no narration arc, voice-over, or live-action subject. Can render to MP4 or transparent overlay. Not for longer, multi-scene, narrated, or brand-reel pieces (use general-video), narrated website videos (website-to-video), topic explainers (faceless-explainer), product promos (product-launch-video), PR videos (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a quick motion-first piece or a longer / narrated treatment, see /hyperframes.

Aseel1600/Edit01

Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it.

Aseel1600/Edit01

Best practices for Remotion - Video creation in React

Aseel1600/Edit01

Toolkit-specific Remotion patterns — custom transitions, shared components, and project conventions. For core Remotion framework knowledge (hooks, animations, rendering, etc.), see the `remotion-official` skill.

Aseel1600/Edit01

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

Aseel1600/Edit01

Animate SVG character rigs with GSAP, CSS transforms, Remotion frame control, and HyperFrames-compatible browser previews.

相關技能