zilmate 1.9.9 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/ad-creative/SKILL.md +362 -0
- package/.agents/skills/ad-creative/evals/evals.json +90 -0
- package/.agents/skills/ad-creative/references/generative-tools.md +637 -0
- package/.agents/skills/ad-creative/references/platform-specs.md +213 -0
- package/.agents/skills/ai-seo/SKILL.md +489 -0
- package/.agents/skills/ai-seo/evals/evals.json +90 -0
- package/.agents/skills/ai-seo/references/content-patterns.md +285 -0
- package/.agents/skills/ai-seo/references/content-types.md +71 -0
- package/.agents/skills/ai-seo/references/okf.md +104 -0
- package/.agents/skills/ai-seo/references/platform-ranking-factors.md +154 -0
- package/.agents/skills/clerk-backend-api/SKILL.md +426 -0
- package/.agents/skills/clerk-backend-api/evals/evals.json +87 -0
- package/.agents/skills/clerk-backend-api/scripts/api-specs-context.sh +30 -0
- package/.agents/skills/clerk-backend-api/scripts/execute-request.sh +88 -0
- package/.agents/skills/clerk-backend-api/scripts/extract-endpoint-detail.sh +165 -0
- package/.agents/skills/clerk-backend-api/scripts/extract-tag-endpoints.sh +208 -0
- package/.agents/skills/clerk-backend-api/scripts/extract-tags.js +14 -0
- package/.agents/skills/copy-editing/SKILL.md +457 -0
- package/.agents/skills/copy-editing/evals/evals.json +89 -0
- package/.agents/skills/copy-editing/references/checklist.md +66 -0
- package/.agents/skills/copy-editing/references/content-refresh.md +38 -0
- package/.agents/skills/copy-editing/references/plain-english-alternatives.md +394 -0
- package/.agents/skills/hyperframes/SKILL.md +163 -0
- package/.agents/skills/hyperframes-cli/SKILL.md +109 -0
- package/.agents/skills/hyperframes-cli/references/doctor-browser.md +45 -0
- package/.agents/skills/hyperframes-cli/references/init-and-scaffold.md +51 -0
- package/.agents/skills/hyperframes-cli/references/lambda.md +132 -0
- package/.agents/skills/hyperframes-cli/references/lint-validate-inspect.md +121 -0
- package/.agents/skills/hyperframes-cli/references/preview-render.md +109 -0
- package/.agents/skills/hyperframes-cli/references/upgrade-info-misc.md +75 -0
- package/.agents/skills/hyperframes-media/SKILL.md +97 -0
- package/.agents/skills/hyperframes-media/assets/sfx/CREDITS.md +35 -0
- package/.agents/skills/hyperframes-media/assets/sfx/manifest.json +97 -0
- package/.agents/skills/hyperframes-media/references/bgm.md +72 -0
- package/.agents/skills/hyperframes-media/references/captions/authoring.md +159 -0
- package/.agents/skills/hyperframes-media/references/captions/motion.md +87 -0
- package/.agents/skills/hyperframes-media/references/captions/transcript-handling.md +97 -0
- package/.agents/skills/hyperframes-media/references/remove-background.md +143 -0
- package/.agents/skills/hyperframes-media/references/requirements.md +29 -0
- package/.agents/skills/hyperframes-media/references/sfx.md +42 -0
- package/.agents/skills/hyperframes-media/references/transcribe.md +52 -0
- package/.agents/skills/hyperframes-media/references/tts-to-captions.md +24 -0
- package/.agents/skills/hyperframes-media/references/tts.md +135 -0
- package/.agents/skills/hyperframes-media/scripts/audio.mjs +282 -0
- package/.agents/skills/hyperframes-media/scripts/heygen-tts.mjs +121 -0
- package/.agents/skills/hyperframes-media/scripts/lib/bgm.mjs +235 -0
- package/.agents/skills/hyperframes-media/scripts/lib/heygen.mjs +131 -0
- package/.agents/skills/hyperframes-media/scripts/lib/sfx.mjs +128 -0
- package/.agents/skills/hyperframes-media/scripts/lib/tts.mjs +220 -0
- package/.agents/skills/hyperframes-media/scripts/lyria-recipe.py +128 -0
- package/.agents/skills/hyperframes-media/scripts/wait-bgm.mjs +167 -0
- package/.agents/skills/hyperframes-registry/SKILL.md +101 -0
- package/.agents/skills/hyperframes-registry/examples/add-block.md +51 -0
- package/.agents/skills/hyperframes-registry/examples/add-component.md +73 -0
- package/.agents/skills/hyperframes-registry/references/contributing.md +166 -0
- package/.agents/skills/hyperframes-registry/references/demo-html-pattern.md +54 -0
- package/.agents/skills/hyperframes-registry/references/discovery.md +215 -0
- package/.agents/skills/hyperframes-registry/references/install-locations.md +45 -0
- package/.agents/skills/hyperframes-registry/references/templates.md +417 -0
- package/.agents/skills/hyperframes-registry/references/wiring-blocks.md +61 -0
- package/.agents/skills/hyperframes-registry/references/wiring-components.md +39 -0
- package/.agents/skills/marketing-psychology/SKILL.md +455 -0
- package/.agents/skills/marketing-psychology/evals/evals.json +88 -0
- package/.agents/skills/mintlify/SKILL.md +328 -0
- package/.agents/skills/product-launch-video/SKILL.md +206 -0
- package/.agents/skills/product-launch-video/references/cut-catalog.md +220 -0
- package/.agents/skills/product-launch-video/references/motion-language.md +156 -0
- package/.agents/skills/product-launch-video/references/story-design.md +373 -0
- package/.agents/skills/product-launch-video/references/visual-design.md +126 -0
- package/.agents/skills/product-launch-video/scripts/assemble-index.mjs +570 -0
- package/.agents/skills/product-launch-video/scripts/audio.mjs +253 -0
- package/.agents/skills/product-launch-video/scripts/build-frame.mjs +536 -0
- package/.agents/skills/product-launch-video/scripts/captions.mjs +508 -0
- package/.agents/skills/product-launch-video/scripts/lib/assets.mjs +55 -0
- package/.agents/skills/product-launch-video/scripts/lib/dimensions.mjs +45 -0
- package/.agents/skills/product-launch-video/scripts/lib/storyboard.mjs +249 -0
- package/.agents/skills/product-launch-video/scripts/lib/tokens.mjs +204 -0
- package/.agents/skills/product-launch-video/scripts/lib/transition-registry.mjs +38 -0
- package/.agents/skills/product-launch-video/scripts/lib/transitions.json +71 -0
- package/.agents/skills/product-launch-video/scripts/stage-assets.mjs +39 -0
- package/.agents/skills/product-launch-video/scripts/transitions.mjs +320 -0
- package/.agents/skills/product-launch-video/sub-agents/frame-worker.md +74 -0
- package/.agents/skills/prompt-engineering-patterns/SKILL.md +144 -0
- package/.agents/skills/prompt-engineering-patterns/assets/few-shot-examples.json +106 -0
- package/.agents/skills/prompt-engineering-patterns/assets/prompt-template-library.md +264 -0
- package/.agents/skills/prompt-engineering-patterns/references/chain-of-thought.md +412 -0
- package/.agents/skills/prompt-engineering-patterns/references/details.md +338 -0
- package/.agents/skills/prompt-engineering-patterns/references/few-shot-learning.md +386 -0
- package/.agents/skills/prompt-engineering-patterns/references/prompt-optimization.md +428 -0
- package/.agents/skills/prompt-engineering-patterns/references/prompt-templates.md +484 -0
- package/.agents/skills/prompt-engineering-patterns/references/system-prompts.md +195 -0
- package/.agents/skills/prompt-engineering-patterns/scripts/optimize-prompt.py +279 -0
- package/.agents/skills/remotion-to-hyperframes/SKILL.md +127 -0
- package/.agents/skills/remotion-to-hyperframes/assets/.gitkeep +0 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/run.sh +249 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/README.md +41 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/expected.json +26 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/hf-src/index.html +61 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/package.json +14 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/remotion.config.ts +13 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/Root.tsx +13 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/TitleCard.tsx +34 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/index.ts +4 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/tsconfig.json +15 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/README.md +54 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/expected.json +29 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/hf-src/index.html +118 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/package.json +14 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/remotion.config.ts +13 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/MultiScene.tsx +105 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/Root.tsx +13 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/index.ts +4 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/tsconfig.json +15 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/setup.sh +34 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/README.md +85 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/expected.json +41 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/hf-src/index.html +269 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/package.json +15 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/remotion.config.ts +13 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/Root.tsx +27 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/Stargazed.tsx +37 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/AnimatedNumber.tsx +23 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/StatCard.tsx +59 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/UnderlinedText.tsx +47 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/index.ts +4 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/OutroScene.tsx +18 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/StatsScene.tsx +34 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/TitleScene.tsx +55 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/tsconfig.json +15 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/README.md +51 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/01-use-state.tsx +29 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/02-use-effect-deps.tsx +29 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/03-async-metadata.tsx +39 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/04-third-party-react.tsx +30 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/05-lambda-config.tsx +38 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/06-warnings-only.tsx +36 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/07-custom-hook.tsx +28 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/08-mixed.tsx +41 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/expected.json +85 -0
- package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/validate.sh +110 -0
- package/.agents/skills/remotion-to-hyperframes/references/api-map.md +142 -0
- package/.agents/skills/remotion-to-hyperframes/references/escape-hatch.md +115 -0
- package/.agents/skills/remotion-to-hyperframes/references/eval.md +140 -0
- package/.agents/skills/remotion-to-hyperframes/references/fonts.md +112 -0
- package/.agents/skills/remotion-to-hyperframes/references/limitations.md +136 -0
- package/.agents/skills/remotion-to-hyperframes/references/lottie.md +121 -0
- package/.agents/skills/remotion-to-hyperframes/references/media.md +149 -0
- package/.agents/skills/remotion-to-hyperframes/references/parameters.md +167 -0
- package/.agents/skills/remotion-to-hyperframes/references/sequencing.md +195 -0
- package/.agents/skills/remotion-to-hyperframes/references/timing.md +165 -0
- package/.agents/skills/remotion-to-hyperframes/references/transitions.md +114 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/.gitkeep +0 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/frame_strip.sh +107 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/lint_source.py +358 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/render_diff.sh +103 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/tests/fixtures/blocker.tsx +50 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/tests/fixtures/clean.tsx +46 -0
- package/.agents/skills/remotion-to-hyperframes/scripts/tests/smoke.sh +90 -0
- package/.agents/skills/seo-audit/SKILL.md +497 -0
- package/.agents/skills/seo-audit/evals/evals.json +136 -0
- package/.agents/skills/seo-audit/references/ai-writing-detection.md +200 -0
- package/.agents/skills/seo-audit/references/international-seo.md +230 -0
- package/README.md +4 -2
- package/SDK.md +64 -1
- package/dist/agents/coding.agent.d.ts +558 -0
- package/dist/agents/coding.agent.d.ts.map +1 -1
- package/dist/agents/coding.agent.js +8 -0
- package/dist/agents/coding.agent.js.map +1 -1
- package/dist/agents/developer-helper.agent.d.ts +712 -0
- package/dist/agents/developer-helper.agent.d.ts.map +1 -1
- package/dist/agents/developer-helper.agent.js +6 -0
- package/dist/agents/developer-helper.agent.js.map +1 -1
- package/dist/agents/docs-research.agent.d.ts +8 -0
- package/dist/agents/docs-research.agent.d.ts.map +1 -1
- package/dist/agents/finance.agent.d.ts +8 -0
- package/dist/agents/finance.agent.d.ts.map +1 -1
- package/dist/agents/manager.d.ts +837 -2
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/manager.js +28 -0
- package/dist/agents/manager.js.map +1 -1
- package/dist/agents/security.agent.d.ts +165 -3
- package/dist/agents/security.agent.d.ts.map +1 -1
- package/dist/agents/security.agent.js +3 -0
- package/dist/agents/security.agent.js.map +1 -1
- package/dist/agents/swarm/main.js +1 -1
- package/dist/agents/swarm/main.js.map +1 -1
- package/dist/agents/swarm/registry.d.ts.map +1 -1
- package/dist/agents/swarm/registry.js +232 -26
- package/dist/agents/swarm/registry.js.map +1 -1
- package/dist/cli/doctor.d.ts +14 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +91 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/menu.d.ts.map +1 -1
- package/dist/cli/menu.js +102 -0
- package/dist/cli/menu.js.map +1 -1
- package/dist/cli/setup.d.ts +10 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +178 -0
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/swarm.d.ts +1 -0
- package/dist/cli/swarm.d.ts.map +1 -1
- package/dist/cli/swarm.js +47 -8
- package/dist/cli/swarm.js.map +1 -1
- package/dist/cli/theme.d.ts +0 -24
- package/dist/cli/theme.d.ts.map +1 -1
- package/dist/cli/theme.js +6 -2
- package/dist/cli/theme.js.map +1 -1
- package/dist/config/env.d.ts +10 -0
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +38 -17
- package/dist/config/env.js.map +1 -1
- package/dist/index.js +96 -5
- package/dist/index.js.map +1 -1
- package/dist/jobs/trigger-orchestrator.d.ts +5 -1
- package/dist/jobs/trigger-orchestrator.d.ts.map +1 -1
- package/dist/jobs/trigger-orchestrator.js +29 -9
- package/dist/jobs/trigger-orchestrator.js.map +1 -1
- package/dist/jobs/trigger-router.d.ts.map +1 -1
- package/dist/jobs/trigger-router.js +3 -2
- package/dist/jobs/trigger-router.js.map +1 -1
- package/dist/memory/corporate-wiki.d.ts +15 -0
- package/dist/memory/corporate-wiki.d.ts.map +1 -0
- package/dist/memory/corporate-wiki.js +152 -0
- package/dist/memory/corporate-wiki.js.map +1 -0
- package/dist/memory/scratchpad.d.ts +2 -0
- package/dist/memory/scratchpad.d.ts.map +1 -1
- package/dist/memory/scratchpad.js +27 -0
- package/dist/memory/scratchpad.js.map +1 -1
- package/dist/observability/doctor.d.ts.map +1 -1
- package/dist/observability/doctor.js +12 -4
- package/dist/observability/doctor.js.map +1 -1
- package/dist/observability/traces.d.ts +72 -0
- package/dist/observability/traces.d.ts.map +1 -0
- package/dist/observability/traces.js +1134 -0
- package/dist/observability/traces.js.map +1 -0
- package/dist/runtime/swarm.d.ts +1 -1
- package/dist/runtime/swarm.d.ts.map +1 -1
- package/dist/runtime/swarm.js +54 -25
- package/dist/runtime/swarm.js.map +1 -1
- package/dist/safety/approvals.d.ts +2 -2
- package/dist/safety/approvals.d.ts.map +1 -1
- package/dist/safety/approvals.js +47 -1
- package/dist/safety/approvals.js.map +1 -1
- package/dist/safety/redaction.d.ts.map +1 -1
- package/dist/safety/redaction.js +10 -0
- package/dist/safety/redaction.js.map +1 -1
- package/dist/tools/cloud.tool.d.ts +394 -0
- package/dist/tools/cloud.tool.d.ts.map +1 -0
- package/dist/tools/cloud.tool.js +784 -0
- package/dist/tools/cloud.tool.js.map +1 -0
- package/dist/tools/computer-use.tool.d.ts +2 -2
- package/dist/tools/corporate-wiki.tool.d.ts +22 -0
- package/dist/tools/corporate-wiki.tool.d.ts.map +1 -0
- package/dist/tools/corporate-wiki.tool.js +43 -0
- package/dist/tools/corporate-wiki.tool.js.map +1 -0
- package/dist/tools/devops.tool.d.ts +162 -0
- package/dist/tools/devops.tool.d.ts.map +1 -0
- package/dist/tools/devops.tool.js +377 -0
- package/dist/tools/devops.tool.js.map +1 -0
- package/dist/tools/multimedia.tool.d.ts +126 -0
- package/dist/tools/multimedia.tool.d.ts.map +1 -0
- package/dist/tools/multimedia.tool.js +533 -0
- package/dist/tools/multimedia.tool.js.map +1 -0
- package/dist/tools/osint.tool.d.ts +6 -6
- package/dist/tools/sandbox-dev.tool.d.ts +15 -0
- package/dist/tools/sandbox-dev.tool.d.ts.map +1 -0
- package/dist/tools/sandbox-dev.tool.js +146 -0
- package/dist/tools/sandbox-dev.tool.js.map +1 -0
- package/dist/tools/scratchpad.tool.d.ts +8 -0
- package/dist/tools/scratchpad.tool.d.ts.map +1 -1
- package/dist/tools/scratchpad.tool.js +40 -1
- package/dist/tools/scratchpad.tool.js.map +1 -1
- package/dist/tools/setup-assistant.tool.d.ts +1 -1
- package/dist/tools/swarm-ops.tool.d.ts +14 -0
- package/dist/tools/swarm-ops.tool.d.ts.map +1 -1
- package/dist/tools/swarm-ops.tool.js +47 -0
- package/dist/tools/swarm-ops.tool.js.map +1 -1
- package/dist/tools/sysops.tool.d.ts +157 -0
- package/dist/tools/sysops.tool.d.ts.map +1 -0
- package/dist/tools/sysops.tool.js +643 -0
- package/dist/tools/sysops.tool.js.map +1 -0
- package/dist/voice/deepgram.d.ts.map +1 -1
- package/dist/voice/deepgram.js +30 -2
- package/dist/voice/deepgram.js.map +1 -1
- package/package.json +8 -1
- package/scripts/release-github.mjs +23 -16
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hyperframes-media
|
|
3
|
+
description: Audio and media assets for HyperFrames compositions, produced by one shared audio engine (`scripts/audio.mjs`) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound effects (HeyGen audio-library retrieval by default, with local Lyria / MusicGen BGM generation and a bundled SFX library as the no-credential fallback), Whisper transcription, background removal, and caption authoring. Use for voiceover / TTS, BGM, SFX / sound effects, transcription, captions / subtitles / lyrics / karaoke / per-word styling, voice + provider selection, and music-mood prompting.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# HyperFrames Media
|
|
7
|
+
|
|
8
|
+
Create the audio and media assets a composition needs — voiceover (TTS), background music + sound effects, transcription, captions, background removal — then consume and animate that data in HTML. For placing assets into compositions, see `hyperframes-core`.
|
|
9
|
+
|
|
10
|
+
## The audio engine — one source for TTS · BGM · SFX
|
|
11
|
+
|
|
12
|
+
Workflows do NOT hand-roll audio or vendor a copy. There is one engine — **`scripts/audio.mjs`** — that takes a neutral `audio_request.json` and writes `audio_meta.json` (plus assets under `assets/voice|bgm|sfx`):
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# <MEDIA_DIR> = this skill's directory
|
|
16
|
+
node <MEDIA_DIR>/scripts/audio.mjs --request ./audio_request.json --hyperframes . --out ./audio_meta.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
All three capabilities degrade on **ONE switch** — whether a HeyGen credential is present (resolved from `$HEYGEN_API_KEY` / `$HYPERFRAMES_API_KEY` / `~/.heygen`, **not** the CLI):
|
|
20
|
+
|
|
21
|
+
| Capability | HeyGen credential present | absent |
|
|
22
|
+
| ---------- | -------------------------------------------------- | ---------------------------------------------------- |
|
|
23
|
+
| TTS | HeyGen Starfish REST (native word timestamps) | → ElevenLabs → Kokoro (chain `transcribe` for words) |
|
|
24
|
+
| BGM | HeyGen music **retrieval** | Lyria → MusicGen local **generation** (detached) |
|
|
25
|
+
| SFX | HeyGen sound-effects **retrieval** (min_score 0.4) | bundled 21-file library (`assets/sfx/`) |
|
|
26
|
+
|
|
27
|
+
- **Request** (`audio_request.json`): `{ provider?, lang?, speed?, lines: [{ id, text, sfx?: [names] }], bgm: { mode?, query?, prompt? } }`. `id` joins each line back to the caller's model (a frame number, a scene id, …). `bgm.mode` = `retrieve | generate | none`; omit for auto (retrieve when credentialed, else generate). An **explicit** `retrieve` is strict — it skips rather than starting a detached generate (for callers with no `wait-bgm` step).
|
|
28
|
+
- **Output** (`audio_meta.json`, id-keyed): `{ 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 }`.
|
|
29
|
+
- `--only tts,bgm,sfx` runs a subset and **merges** into an existing `--out` (e.g. TTS+BGM early, SFX once cues exist).
|
|
30
|
+
- BGM generate is spawned **detached** (`bgm_pending: true`) — run `scripts/wait-bgm.mjs` before assembling.
|
|
31
|
+
- `scripts/heygen-tts.mjs` is a single-shot CLI over the same code (one text → wav + words) for when you just need HeyGen TTS without a request file.
|
|
32
|
+
|
|
33
|
+
Full flag list + the `audio_meta.json` schema live in the header of `scripts/audio.mjs`. The references below cover the provider details and edge cases behind each capability.
|
|
34
|
+
|
|
35
|
+
## Preflight — show sign-in status before any audio
|
|
36
|
+
|
|
37
|
+
**Always run this before generating voice or BGM — inside a full workflow _or_ a one-off "generate me a BGM/voiceover" request.** No HeyGen credential is **not** a reason to silently fall back to local engines: first recommend signing in and let the user decide. Run the shared preflight and **relay its output verbatim** — don't improvise your own "missing key" prompt, and don't offer to write keys into a per-repo `.env`:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx hyperframes auth status
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- **Signed in** → it prints the account; proceed.
|
|
44
|
+
- **Not signed in** (`exit 1` is expected here — "not signed in" is a normal state, not a failure) → it prints registration-first guidance. Recommend signing in: `npx hyperframes auth login` is browser OAuth — it **signs in and creates an account** (always available through this repo's CLI). To use an existing HeyGen API key (from app.heygen.com/settings/api), run `npx hyperframes auth login --api-key` — it saves to the shared `~/.heygen` (no per-repo `.env`). The output also lists the local engines voice/BGM will fall back to and a `pip` hint when deps are missing. **Relay this output as-is — don't paraphrase it into your own wording.** Then **STOP and wait** for the user to choose — sign in, or say "go" / "local" to continue offline — **before generating anything.** This is a real decision point, not a passing note: don't fold it into another question, and don't proceed past it on your own. (Exception: in autonomous / non-interactive mode, note the status and continue offline.)
|
|
45
|
+
- `npx hyperframes auth status --json` returns `{ configured, recommended_action, offline_engines }` for deterministic branching.
|
|
46
|
+
- **If the CLI can't run** (not on PATH and `npx` can't fetch it) → still **recommend signing in** (`npx hyperframes auth login`) and **STOP for the user's choice** — don't treat "no credential" as a silent green light for local generation.
|
|
47
|
+
|
|
48
|
+
Credential resolution, full key priority, and the local-dependency list are in `references/requirements.md`.
|
|
49
|
+
|
|
50
|
+
## Provider chains (the detail behind the engine)
|
|
51
|
+
|
|
52
|
+
**TTS** — first available provider wins (the engine, or `npx hyperframes tts "..."`):
|
|
53
|
+
|
|
54
|
+
| Order | Provider | Detected when | Word timestamps |
|
|
55
|
+
| ----- | ----------------------------- | -------------------------------------------- | ---------------------------------------------------------------- |
|
|
56
|
+
| 1 | HeyGen (Starfish) | `$HEYGEN_API_KEY` / `hyperframes auth login` | **Yes, native** — pass `--words narration.words.json` to capture |
|
|
57
|
+
| 2 | ElevenLabs | `$ELEVENLABS_API_KEY` set | No — chain `transcribe` after |
|
|
58
|
+
| 3 | Kokoro-82M (local, 54 voices) | always (no key required) | No — chain `transcribe` after |
|
|
59
|
+
|
|
60
|
+
> The published `hyperframes tts` CLI is often the local-only build (its `--help` says "Kokoro-82M", no `--provider`/`--words`) and silently falls back to Kokoro even with `$HEYGEN_API_KEY` set. That is why the engine's HeyGen path is the self-contained `scripts/heygen-tts.mjs` (REST), NOT the CLI; the CLI is used only for the Kokoro path. See `references/tts.md`.
|
|
61
|
+
|
|
62
|
+
**BGM & SFX** — by default **retrieved** from the HeyGen audio library (`/v3/audio/sounds`), same credential as HeyGen TTS, with the no-credential fallback from the switch above:
|
|
63
|
+
|
|
64
|
+
| Asset | HeyGen `type` | Lands in | Fallback (no credential) |
|
|
65
|
+
| ----- | ------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
|
66
|
+
| BGM | `music` | `assets/bgm/track.mp3` (retrieve) · `track.wav` (generate) | Lyria / MusicGen generation |
|
|
67
|
+
| SFX | `sound_effects` (min_score 0.4) | `assets/sfx/<slug>.mp3` | bundled 21-file library (`assets/sfx/*` + `manifest.json`) |
|
|
68
|
+
|
|
69
|
+
See `references/bgm.md` and `references/sfx.md`.
|
|
70
|
+
|
|
71
|
+
## Routing
|
|
72
|
+
|
|
73
|
+
| Task | Read |
|
|
74
|
+
| ------------------------------------------------------------------- | -------------------------------------------- |
|
|
75
|
+
| The audio engine — request/meta schema, `--only`, the switch | `scripts/audio.mjs` (header comment) |
|
|
76
|
+
| `npx hyperframes tts` / `heygen-tts.mjs` — providers, voices, words | `references/tts.md` |
|
|
77
|
+
| BGM — HeyGen retrieval + local Lyria / MusicGen generation | `references/bgm.md` |
|
|
78
|
+
| SFX — HeyGen retrieval (min_score 0.4) + bundled local library | `references/sfx.md` |
|
|
79
|
+
| `npx hyperframes transcribe` — Whisper, model rules, output shape | `references/transcribe.md` |
|
|
80
|
+
| `npx hyperframes remove-background` — transparent cutouts | `references/remove-background.md` |
|
|
81
|
+
| TTS → transcription → captions (no recorded voiceover) | `references/tts-to-captions.md` |
|
|
82
|
+
| Caption authoring — style detection, layout, word grouping, exit | `references/captions/authoring.md` |
|
|
83
|
+
| Transcript handling — input formats, quality gates, cleanup, APIs | `references/captions/transcript-handling.md` |
|
|
84
|
+
| Caption motion — karaoke, marker effects, audio-reactive | `references/captions/motion.md` |
|
|
85
|
+
| Model caches, system dependencies, troubleshooting | `references/requirements.md` |
|
|
86
|
+
|
|
87
|
+
## Non-negotiable rules
|
|
88
|
+
|
|
89
|
+
- **One engine, no vendored copies.** Produce audio via `scripts/audio.mjs` (or `heygen-tts.mjs` for one-shot HeyGen TTS). Don't re-implement TTS/BGM/SFX inside a workflow — write an `audio_request.json` adapter and call the engine.
|
|
90
|
+
- **"HeyGen available" = a resolvable credential, not the CLI.** The whole switch keys off `heygenCredential()`; the published `hyperframes tts` may be Kokoro-only, and there is no `hyperframes bgm` / `hyperframes sfx` command at all.
|
|
91
|
+
- **Voice IDs are provider-specific.** `am_michael` is Kokoro-only; HeyGen UUIDs don't work on Kokoro. If you pass `--voice`, also pin `--provider` to avoid silent provider drift when the user's env changes.
|
|
92
|
+
- **Always pass `--model` to `transcribe`.** The CLI default `small.en` silently translates non-English audio. See `references/transcribe.md` → "Language Rule".
|
|
93
|
+
- **HeyGen returns word timestamps; ElevenLabs / Kokoro do not.** The engine chains `transcribe` automatically for the latter two; standalone, pass `--words` to HeyGen or run `transcribe` against the audio file.
|
|
94
|
+
- **Captions consume the flat word-array format** with `{ id, text, start, end }`. See `references/transcribe.md` → "Output Shape".
|
|
95
|
+
- **`remove-background --background-output` is hole-cut, not inpainted.** For "scene without the person", a different tool is needed. See `references/remove-background.md` → "When NOT the right tool".
|
|
96
|
+
- **BGM/SFX default to HeyGen retrieval; the no-credential fallback is generation (BGM) or the bundled library (SFX).** `/audio/sounds` ranks by a text query — name effects concretely (`glass shatter`, not `dramatic sound`); a no-match **skips**, never blocks the render. SFX sit at volume ~0.35 under voice + BGM. See `references/sfx.md` / `references/bgm.md`.
|
|
97
|
+
- **Treat workflow caption HTML as generated output.** For preset-backed videos, the reusable skin source lives at `.hyperframes/caption-skin.html` and the workflow script writes `compositions/captions.html`; do not edit generated `compositions/captions.html` to fix the skin. Rebuild via the workflow's `captions.mjs`, or use that workflow's explicit overrides mechanism when present.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# SFX Credits
|
|
2
|
+
|
|
3
|
+
All sound effects in this directory are sourced from [Pixabay](https://pixabay.com/sound-effects/) and used under the [Pixabay Content License](https://pixabay.com/service/license-summary/).
|
|
4
|
+
|
|
5
|
+
The Pixabay license allows free use for commercial and non-commercial purposes without attribution, but attribution is appreciated and given here for transparency.
|
|
6
|
+
|
|
7
|
+
## Files
|
|
8
|
+
|
|
9
|
+
The following `.mp3` files are bundled with this skill:
|
|
10
|
+
|
|
11
|
+
- `chime.mp3`
|
|
12
|
+
- `click.mp3` / `click-soft.mp3`
|
|
13
|
+
- `error.mp3`
|
|
14
|
+
- `glitch-1.mp3` / `glitch-2.mp3` / `glitch-3.mp3`
|
|
15
|
+
- `impact-bass-1.mp3` / `impact-bass-2.mp3`
|
|
16
|
+
- `key-press.mp3`
|
|
17
|
+
- `notification.mp3`
|
|
18
|
+
- `ping.mp3`
|
|
19
|
+
- `pop.mp3`
|
|
20
|
+
- `riser.mp3`
|
|
21
|
+
- `sparkle.mp3`
|
|
22
|
+
- `typing.mp3`
|
|
23
|
+
- `whoosh.mp3` / `whoosh-short.mp3` / `whoosh-cinematic.mp3`
|
|
24
|
+
|
|
25
|
+
See `manifest.json` for per-file metadata (duration, energy character, recommended use).
|
|
26
|
+
|
|
27
|
+
## License
|
|
28
|
+
|
|
29
|
+
All files are distributed under the [Pixabay Content License](https://pixabay.com/service/license-summary/), which permits:
|
|
30
|
+
|
|
31
|
+
- Commercial and non-commercial use
|
|
32
|
+
- Modification and remixing
|
|
33
|
+
- Redistribution as part of derivative works (such as videos rendered with HyperFrames)
|
|
34
|
+
|
|
35
|
+
without any attribution requirement.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chime": {
|
|
3
|
+
"file": "chime.mp3",
|
|
4
|
+
"duration": 2.5,
|
|
5
|
+
"description": "Soft melodic chime — gentle positive beat: success/confirmation or a lighthearted transition. Sync to the visual moment."
|
|
6
|
+
},
|
|
7
|
+
"click-soft": {
|
|
8
|
+
"file": "click-soft.mp3",
|
|
9
|
+
"duration": 0.37,
|
|
10
|
+
"description": "Quiet short click — low-key UI tap / soft selection. Short accent, sync exactly to the on-screen action."
|
|
11
|
+
},
|
|
12
|
+
"click": {
|
|
13
|
+
"file": "click.mp3",
|
|
14
|
+
"duration": 0.37,
|
|
15
|
+
"description": "Crisp UI click — button press, toggle, selection. Short accent, sync exactly to the on-screen action."
|
|
16
|
+
},
|
|
17
|
+
"error": {
|
|
18
|
+
"file": "error.mp3",
|
|
19
|
+
"duration": 1.62,
|
|
20
|
+
"description": "Negative / error tone — failure state, a 'wrong' beat, or a glitchy interruption."
|
|
21
|
+
},
|
|
22
|
+
"glitch-1": {
|
|
23
|
+
"file": "glitch-1.mp3",
|
|
24
|
+
"duration": 2.64,
|
|
25
|
+
"description": "Punchy digital glitch — hard-cut accent or sudden reveal. Trigger on the hit; let the decay bleed into the next shot (J-cut)."
|
|
26
|
+
},
|
|
27
|
+
"glitch-2": {
|
|
28
|
+
"file": "glitch-2.mp3",
|
|
29
|
+
"duration": 3.5,
|
|
30
|
+
"description": "Harsh, longer glitch — chaotic / jarring transition or a distorted reveal."
|
|
31
|
+
},
|
|
32
|
+
"glitch-3": {
|
|
33
|
+
"file": "glitch-3.mp3",
|
|
34
|
+
"duration": 3.1,
|
|
35
|
+
"description": "Low-key glitch texture — subtle digital shift, minimal transition that sits under other audio."
|
|
36
|
+
},
|
|
37
|
+
"impact-bass-1": {
|
|
38
|
+
"file": "impact-bass-1.mp3",
|
|
39
|
+
"duration": 2.12,
|
|
40
|
+
"description": "Bass impact hit — logo/hero snap, headline slam. Trigger on the visual landing; decay carries into the next shot (J-cut)."
|
|
41
|
+
},
|
|
42
|
+
"impact-bass-2": {
|
|
43
|
+
"file": "impact-bass-2.mp3",
|
|
44
|
+
"duration": 2.59,
|
|
45
|
+
"description": "Bass impact with a short swell — brief anticipation then a deep hit. Place so the peak lands on the reveal."
|
|
46
|
+
},
|
|
47
|
+
"key-press": {
|
|
48
|
+
"file": "key-press.mp3",
|
|
49
|
+
"duration": 0.4,
|
|
50
|
+
"description": "Single key press — one keystroke / terminal-input beat. Short accent, sync to the typed character."
|
|
51
|
+
},
|
|
52
|
+
"notification": {
|
|
53
|
+
"file": "notification.mp3",
|
|
54
|
+
"duration": 2.46,
|
|
55
|
+
"description": "Notification chime — alert, message-in, toast/badge appears. Sync to the element entering."
|
|
56
|
+
},
|
|
57
|
+
"ping": {
|
|
58
|
+
"file": "ping.mp3",
|
|
59
|
+
"duration": 1.32,
|
|
60
|
+
"description": "Sharp electronic ping — punchy accent on a key reveal or data point. Sync to the beat."
|
|
61
|
+
},
|
|
62
|
+
"pop": {
|
|
63
|
+
"file": "pop.mp3",
|
|
64
|
+
"duration": 0.72,
|
|
65
|
+
"description": "Quick pop — element appear/spawn, chip/tag/badge in. Small precise accent, sync to the pop-in."
|
|
66
|
+
},
|
|
67
|
+
"riser": {
|
|
68
|
+
"file": "riser.mp3",
|
|
69
|
+
"duration": 10.03,
|
|
70
|
+
"description": "Long cinematic riser (~10s build, peak at the end). Trigger at (climax_time − 10.03s) so it crests exactly on the reveal."
|
|
71
|
+
},
|
|
72
|
+
"sparkle": {
|
|
73
|
+
"file": "sparkle.mp3",
|
|
74
|
+
"duration": 1.8,
|
|
75
|
+
"description": "Bright sparkle / shimmer — magical reveal or 'shine' highlight on a hero element. Sync to the highlight."
|
|
76
|
+
},
|
|
77
|
+
"typing": {
|
|
78
|
+
"file": "typing.mp3",
|
|
79
|
+
"duration": 1.5,
|
|
80
|
+
"description": "Typing burst (~1.5s of keys) — keyboard / code typing reveal, text-being-typed beat. Start as the text begins typing."
|
|
81
|
+
},
|
|
82
|
+
"whoosh-cinematic": {
|
|
83
|
+
"file": "whoosh-cinematic.mp3",
|
|
84
|
+
"duration": 5.54,
|
|
85
|
+
"description": "Cinematic whoosh build (~5.5s) — sweeping scene transition. Align so the swell peaks on the cut."
|
|
86
|
+
},
|
|
87
|
+
"whoosh-short": {
|
|
88
|
+
"file": "whoosh-short.mp3",
|
|
89
|
+
"duration": 0.57,
|
|
90
|
+
"description": "Short whoosh — quick swipe/slide accent, fast element move, snappy transition. Sync to the motion."
|
|
91
|
+
},
|
|
92
|
+
"whoosh": {
|
|
93
|
+
"file": "whoosh.mp3",
|
|
94
|
+
"duration": 0.57,
|
|
95
|
+
"description": "Punchy whoosh/impact — fast reveal or hard transition accent. Sync to the motion."
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Background music (BGM)
|
|
2
|
+
|
|
3
|
+
One music bed per composition, produced by the shared audio engine (`scripts/audio.mjs` → `scripts/lib/bgm.mjs`). Two routes, chosen by the engine's one switch — whether a HeyGen credential is present:
|
|
4
|
+
|
|
5
|
+
- **HeyGen retrieval — the default when credentialed.** Search HeyGen's music catalog by mood, download the top track. No generation; same `~/.heygen` / `$HEYGEN_API_KEY` credential as TTS.
|
|
6
|
+
- **Local generation (Lyria → MusicGen) — the fallback when there is no credential** (or when asked for explicitly). Generate a WAV from a mood prompt. There is **no `npx hyperframes bgm` command**; the engine spawns `scripts/lyria-recipe.py` or an inline MusicGen script directly.
|
|
7
|
+
|
|
8
|
+
> **Run the Preflight first — no credential is not a green light to silently generate locally.** Before generating, complete the sign-in **Preflight** (see `../SKILL.md` → Preflight): run `npx hyperframes auth status`, recommend signing in, and **STOP for the user's choice** (sign in for HeyGen's music library, or continue offline with local generation). This applies to a one-off "generate a BGM" request just as much as inside a full workflow.
|
|
9
|
+
|
|
10
|
+
## Driving it from the request
|
|
11
|
+
|
|
12
|
+
`audio_request.json` → `bgm: { mode?, query?, prompt? }`:
|
|
13
|
+
|
|
14
|
+
- **`mode`** — `retrieve | generate | none`. Omit for **auto** (retrieve when credentialed, else generate). An **explicit** `retrieve` is strict: no credential ⇒ skip, never a detached generate (so a caller with no `wait-bgm` step, e.g. product-launch, can't get a pending job it won't await).
|
|
15
|
+
- **`query`** — the mood, used for retrieval and as a fallback prompt seed (e.g. a storyboard's `music:` field, falling back to `message` → `arc` → `"calm cinematic underscore"`).
|
|
16
|
+
- **`prompt`** — an explicit full prompt for generation; omit and the engine infers one (see Mood inference). Optional `blob` / `archetype` / `arc` feed that inference.
|
|
17
|
+
|
|
18
|
+
## HeyGen retrieval (default)
|
|
19
|
+
|
|
20
|
+
`searchSounds(query, "music", { limit: 5 })` → `GET /audio/sounds?query=<mood>&type=music&limit=5`. Take the top result (ranked by `score`), download its presigned `audio_url` → `assets/bgm/track.mp3`. Synchronous. No match → skip (BGM is optional; never fail the render over it). Cue written to `audio_meta.json`:
|
|
21
|
+
|
|
22
|
+
```jsonc
|
|
23
|
+
{
|
|
24
|
+
"path": "assets/bgm/track.mp3",
|
|
25
|
+
"volume": 0.8,
|
|
26
|
+
"mode": "retrieve",
|
|
27
|
+
"query": "calm cinematic underscore",
|
|
28
|
+
"duration_s": 42.0,
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`volume` is 0.8 under narration, 0.9 for a silent film (no voice). `bgm_pending` is `false` — the file is on disk when the engine returns.
|
|
33
|
+
|
|
34
|
+
## Local generation (fallback) — Lyria → MusicGen
|
|
35
|
+
|
|
36
|
+
Spawned **detached** so voice work isn't blocked; `audio_meta.bgm_pending: true` and `bgm_pid` / `bgm_log` are set until it finishes. **Run `scripts/wait-bgm.mjs` before assembling** — it polls the output file / process / log, detects crashes, and writes `bgm_status.json` (`status: ready | failed | timeout | disabled`). A failed/absent track is simply omitted; it never blocks voice/SFX.
|
|
37
|
+
|
|
38
|
+
| Order | Provider | Env / deps | Speed | Quality |
|
|
39
|
+
| ----- | ------------------------------------ | ------------------------------------------------------------------------------------- | --------------------------------------- | --------------------------- |
|
|
40
|
+
| 1 | Google Lyria RealTime | `$GEMINI_API_KEY` or `$GOOGLE_API_KEY` + `google-genai` (auto-installed on demand) | Real-time stream (≈ requested duration) | Production-grade |
|
|
41
|
+
| 2 | MusicGen (`facebook/musicgen-small`) | Python `transformers + torch + soundfile + numpy` (~300 MB first run; auto-installed) | Slow on CPU; fast on Apple MPS / CUDA | Decent; prompt-only control |
|
|
42
|
+
|
|
43
|
+
Output → `assets/bgm/track.wav`, target = total voice duration. MusicGen generates **one** seed clip (≤28–30s, under the decoder's positional limit) then crossfade-loops it up to the target (or trims down if shorter), avoiding per-segment seams. Backend selection is by what can actually **run**: Lyria only when `import google.genai` succeeds, else MusicGen; if neither can be made to run, BGM is skipped (voice + SFX still render).
|
|
44
|
+
|
|
45
|
+
## Mood inference (the generate prompt)
|
|
46
|
+
|
|
47
|
+
`inferBgmPrompt()` in `scripts/lib/bgm.mjs`: an explicit `prompt` wins; otherwise industry-keyword **base** → narrative-**archetype** shape → emotional-**arc** tiebreaker.
|
|
48
|
+
|
|
49
|
+
| Match in `blob` / `query` | Base prompt | BPM |
|
|
50
|
+
| ------------------------------------------------------ | --------------------------------------------------------------------------- | --- |
|
|
51
|
+
| `crypto / nft / web3 / defi / token / blockchain` | atmospheric electronic, deep bass, futuristic synths, restrained percussion | 100 |
|
|
52
|
+
| `finance / fintech / bank / payment / invest / wealth` | calm cinematic, soft strings, subtle piano, restrained percussion | 92 |
|
|
53
|
+
| `creative / agency / design / studio / art / brand` | playful electronic, warm pads, light percussion | 115 |
|
|
54
|
+
| _(default: SaaS / tech / platform)_ | uplifting corporate tech, bright modern piano with synth pads | 108 |
|
|
55
|
+
|
|
56
|
+
Archetype then reshapes the arc — PAS → "MINOR to MAJOR" build; BAB / future-pacing → aspirational rising; feature-cascade → +10 BPM driving; demo-loop → −8 BPM minimal. The emotional arc breaks remaining ties (tension→relief, excitement, trust/reassurance).
|
|
57
|
+
|
|
58
|
+
## Lyria knobs (direct recipe use)
|
|
59
|
+
|
|
60
|
+
The engine bakes BPM / scale into the **prompt text** (via the inference above) and passes only `--output` / `--duration` / `--prompt` to the recipe. If you invoke `scripts/lyria-recipe.py` directly you can also set: `--bpm` (90–110 calm, 110–130 energetic), `--brightness` (0–1, ≥0.7 promotional), `--density` (0–1, higher = fuller), `--scale` (`MAJOR` / `MINOR` / `PENTATONIC` / …), `--negative-prompt` (styles to exclude). MusicGen ignores all of these — put the mood in the prompt.
|
|
61
|
+
|
|
62
|
+
## Failure modes
|
|
63
|
+
|
|
64
|
+
| Failure | Behavior |
|
|
65
|
+
| --------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
66
|
+
| No music match (retrieve) | `bgm: null`, anomaly logged. Render proceeds without BGM. |
|
|
67
|
+
| Explicit `retrieve`, no credential | Skipped (no silent generate fallback). Use `mode: generate` or omit `mode` for auto. |
|
|
68
|
+
| Neither Lyria nor MusicGen can run (generate) | `bgm` disabled with a `pip install …` hint. Voice + SFX still render. |
|
|
69
|
+
| Generate still rendering at assemble time | `bgm_pending: true`; `wait-bgm.mjs` waits/checks and writes `bgm_status.json` first. |
|
|
70
|
+
| Generate crashed | `wait-bgm.mjs` → `bgm_status.json { status: "failed" }`; the `<audio>` track is omitted. |
|
|
71
|
+
|
|
72
|
+
BGM failure never blocks a render.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Captions
|
|
2
|
+
|
|
3
|
+
Before authoring: confirm the transcript came from the right Whisper model. CLI default `small.en` silently translates non-English audio — see [`../transcribe.md`](../transcribe.md) → "Language Rule" and [`transcript-handling.md`](transcript-handling.md) for the mandatory quality check.
|
|
4
|
+
|
|
5
|
+
Analyze spoken content to determine caption style. If user specifies a style, use that. Otherwise, detect tone from the transcript.
|
|
6
|
+
|
|
7
|
+
## Transcript Source
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
[
|
|
11
|
+
{ "id": "w0", "text": "Hello", "start": 0.0, "end": 0.5 },
|
|
12
|
+
{ "id": "w1", "text": "world.", "start": 0.6, "end": 1.2 }
|
|
13
|
+
]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`id` (`w0`, `w1`, …) is the stable reference for per-word overrides and is added by `hyperframes transcribe`. It's optional for backwards compatibility with hand-authored transcripts. See [`../transcribe.md`](../transcribe.md) → "Output Shape" for how this is produced, and [`transcript-handling.md`](transcript-handling.md) for cleanup before consumption.
|
|
17
|
+
|
|
18
|
+
## Style Detection (When No Style Specified)
|
|
19
|
+
|
|
20
|
+
Read the full transcript before choosing. Four dimensions:
|
|
21
|
+
|
|
22
|
+
**1. Visual feel** — corporate→clean; energetic→bold; storytelling→elegant; technical→precise; social→playful.
|
|
23
|
+
|
|
24
|
+
**2. Color palette** — dark+bright for energy; muted for professional; high contrast for clarity; one accent color.
|
|
25
|
+
|
|
26
|
+
**3. Font mood** — heavy/condensed for impact; clean sans for modern; rounded for friendly; serif for elegance.
|
|
27
|
+
|
|
28
|
+
**4. Animation character** — scale-pop for punchy; gentle fade for calm; word-by-word for emphasis; typewriter for technical.
|
|
29
|
+
|
|
30
|
+
## Per-Word Styling
|
|
31
|
+
|
|
32
|
+
Scan for words deserving distinct treatment:
|
|
33
|
+
|
|
34
|
+
- **Brand/product names** — larger size, unique color
|
|
35
|
+
- **ALL CAPS** — scale boost, flash, accent color
|
|
36
|
+
- **Numbers/statistics** — bold weight, accent color
|
|
37
|
+
- **Emotional keywords** — exaggerated animation (overshoot, bounce)
|
|
38
|
+
- **Call-to-action** — highlight, underline, color pop
|
|
39
|
+
- **Marker highlight** — for beyond-color emphasis (highlight sweep, circle, burst, scribble, sketchout), see `hyperframes-animation/rules/css-marker-patterns.md`.
|
|
40
|
+
|
|
41
|
+
## Script-to-Style Mapping
|
|
42
|
+
|
|
43
|
+
| Tone | Font mood | Animation | Color | Size |
|
|
44
|
+
| ------------ | ------------------------ | ---------------------------------- | --------------------------- | ------- |
|
|
45
|
+
| Hype/launch | Heavy condensed, 800-900 | Scale-pop, back.out(1.7), 0.1-0.2s | Bright on dark | 72-96px |
|
|
46
|
+
| Corporate | Clean sans, 600-700 | Fade+slide, power3.out, 0.3s | White/neutral, muted accent | 56-72px |
|
|
47
|
+
| Tutorial | Mono/clean sans, 500-600 | Typewriter/fade, 0.4-0.5s | High contrast, minimal | 48-64px |
|
|
48
|
+
| Storytelling | Serif/elegant, 400-500 | Slow fade, power2.out, 0.5-0.6s | Warm muted tones | 44-56px |
|
|
49
|
+
| Social | Rounded sans, 700-800 | Bounce, elastic.out, word-by-word | Playful, colored pills | 56-80px |
|
|
50
|
+
|
|
51
|
+
## Word Grouping
|
|
52
|
+
|
|
53
|
+
- **High energy:** 2-3 words. Quick turnover.
|
|
54
|
+
- **Conversational:** 3-5 words. Natural phrases.
|
|
55
|
+
- **Measured/calm:** 4-6 words. Longer groups.
|
|
56
|
+
|
|
57
|
+
Break on sentence boundaries, 150ms+ pauses, or max word count.
|
|
58
|
+
|
|
59
|
+
## Positioning
|
|
60
|
+
|
|
61
|
+
- **Landscape (1920x1080):** Bottom 80-120px, centered
|
|
62
|
+
- **Portrait (1080x1920):** Lower middle ~600-700px from bottom, centered
|
|
63
|
+
- Never cover the subject's face
|
|
64
|
+
- `position: absolute` — never relative
|
|
65
|
+
- One caption group visible at a time
|
|
66
|
+
|
|
67
|
+
## Text Overflow Prevention
|
|
68
|
+
|
|
69
|
+
Use `window.__hyperframes.fitTextFontSize()`:
|
|
70
|
+
|
|
71
|
+
```js
|
|
72
|
+
var result = window.__hyperframes.fitTextFontSize(group.text.toUpperCase(), {
|
|
73
|
+
fontFamily: "Outfit",
|
|
74
|
+
fontWeight: 900,
|
|
75
|
+
maxWidth: 1600,
|
|
76
|
+
});
|
|
77
|
+
el.style.fontSize = result.fontSize + "px";
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Options: `maxWidth` (1600 landscape, 900 portrait), `baseFontSize` (78), `minFontSize` (42), `fontWeight`, `fontFamily`, `step` (2).
|
|
81
|
+
|
|
82
|
+
CSS safety nets: `max-width` on container, `overflow: visible` (**not** `hidden` — hidden clips scaled emphasis words and glow effects), `position: absolute`, explicit `height`. When per-word styling uses `scale > 1.0`, compute `maxWidth = safeWidth / maxScale` to leave headroom.
|
|
83
|
+
|
|
84
|
+
**Container pattern:** Full-width absolute container, centered. Do **not** use `left: 50%; transform: translateX(-50%)` — causes clipping at composition edges.
|
|
85
|
+
|
|
86
|
+
## Caption Exit Guarantee
|
|
87
|
+
|
|
88
|
+
Every group **must** have a hard kill after exit animation:
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
tl.to(groupEl, { opacity: 0, scale: 0.95, duration: 0.12, ease: "power2.in" }, group.end - 0.12);
|
|
92
|
+
// `tl.set` is an instant flip, not a tween — safe to set `visibility` here (core's "no animating
|
|
93
|
+
// visibility" rule applies to tweens, which can't smoothly interpolate non-numeric values anyway).
|
|
94
|
+
tl.set(groupEl, { opacity: 0, visibility: "hidden" }, group.end);
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Self-lint after building timeline — place **before** `window.__timelines[id] = tl` so it runs at composition init:
|
|
98
|
+
|
|
99
|
+
```js
|
|
100
|
+
GROUPS.forEach(function (group, gi) {
|
|
101
|
+
var el = document.getElementById("cg-" + gi);
|
|
102
|
+
if (!el) return;
|
|
103
|
+
tl.seek(group.end + 0.01);
|
|
104
|
+
var computed = window.getComputedStyle(el);
|
|
105
|
+
if (computed.opacity !== "0" && computed.visibility !== "hidden") {
|
|
106
|
+
console.warn(
|
|
107
|
+
"[caption-lint] group " + gi + " still visible at t=" + (group.end + 0.01).toFixed(2) + "s",
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
tl.seek(0);
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Pre-Built Caption Components
|
|
115
|
+
|
|
116
|
+
Before building caption styles from scratch, check the registry — 15 ready-to-use caption components cover the most common styles. Install with `npx hyperframes add <name>` and wire as a sub-composition via `data-composition-src` (see `hyperframes-registry`).
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npx hyperframes catalog --tag caption-style # list all caption components
|
|
120
|
+
npx hyperframes add caption-highlight # install a specific one
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
| Style | Component | Best for |
|
|
124
|
+
| ------------------------- | ---------------------------- | ---------------------------- |
|
|
125
|
+
| TikTok-style highlight | `caption-highlight` | Social, high-energy |
|
|
126
|
+
| Karaoke pill | `caption-pill-karaoke` | Music, lyric videos |
|
|
127
|
+
| Cinematic editorial | `caption-editorial-emphasis` | Documentary, storytelling |
|
|
128
|
+
| Glitch / cyber | `caption-glitch-rgb` | Tech, gaming |
|
|
129
|
+
| Full-screen slam | `caption-kinetic-slam` | Hype, announcements |
|
|
130
|
+
| Neon glow | `caption-neon-glow` | Night, club, neon aesthetics |
|
|
131
|
+
| Neon accent (multi-color) | `caption-neon-accent` | Colorful, playful |
|
|
132
|
+
| Wipe reveal | `caption-clip-wipe` | Clean, modern |
|
|
133
|
+
| Gradient fill | `caption-gradient-fill` | Vibrant, eye-catching |
|
|
134
|
+
| Matrix decode | `caption-matrix-decode` | Sci-fi, tech reveals |
|
|
135
|
+
| Emoji pop | `caption-emoji-pop` | Social, casual |
|
|
136
|
+
| Parallax layers | `caption-parallax-layers` | Depth, cinematic |
|
|
137
|
+
| Particle burst | `caption-particle-burst` | Celebration, impact keywords |
|
|
138
|
+
| Lava texture | `caption-texture` | Bold, dramatic |
|
|
139
|
+
| Weight shift | `caption-weight-shift` | Elegant, typographic |
|
|
140
|
+
|
|
141
|
+
Related: `caption-blend-difference` (tagged `text` / `blend-mode`, not `caption-style`, so it won't appear under the filter above) auto-inverts text against any background via `mix-blend-mode: difference` — useful when the background is busy or unpredictable.
|
|
142
|
+
|
|
143
|
+
Browse all with previews: [hyperframes.heygen.com/catalog](https://hyperframes.heygen.com/catalog)
|
|
144
|
+
|
|
145
|
+
Caption components ship with transparent backgrounds — they're pure overlays. If the underlying video is bright or busy, add a contrast layer (e.g. a semi-transparent dark div) in the host composition beneath the caption sub-composition, not inside the component itself.
|
|
146
|
+
|
|
147
|
+
## Further References
|
|
148
|
+
|
|
149
|
+
- [`motion.md`](motion.md) — karaoke, marker effects, audio-reactive modulation, scatter exits.
|
|
150
|
+
- [`transcript-handling.md`](transcript-handling.md) — input formats, quality checks, cleaning, external API fallback.
|
|
151
|
+
- `hyperframes-animation/rules/css-marker-patterns.md` — marker highlighting (deterministic, fully seekable).
|
|
152
|
+
|
|
153
|
+
## Constraints
|
|
154
|
+
|
|
155
|
+
- Deterministic. No `Math.random()`, no `Date.now()`.
|
|
156
|
+
- Sync to transcript timestamps.
|
|
157
|
+
- One group visible at a time.
|
|
158
|
+
- Every group must have a hard `tl.set` kill at `group.end`.
|
|
159
|
+
- Fonts: the compiler auto-embeds only its **built-in mapped set** (Inter, Roboto, Montserrat, …) — for those, just declare `font-family` in CSS. Any **other** font (a brand/custom font like `TT Norms Pro`, or a non-Latin CJK/Devanagari family) is **not** auto-supplied: it needs an `@font-face` pointing at a real `.woff2` shipped with the project, or the text silently falls back to a generic font in the render. Don't assume a `font-family` you can see locally will render — the render machine is a clean headless Chrome with no installed fonts.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Dynamic Caption Techniques
|
|
2
|
+
|
|
3
|
+
You are here because SKILL.md told you to read this file before writing animation code. Pick your technique combination from the table below based on the energy level you detected from the transcript, then implement using standard GSAP patterns.
|
|
4
|
+
|
|
5
|
+
## Technique Selection by Energy
|
|
6
|
+
|
|
7
|
+
| Energy level | Highlight | Exit | Cycle pattern |
|
|
8
|
+
| ------------ | ------------------------------------- | ------------------- | ----------------------------------------- |
|
|
9
|
+
| High | Karaoke with accent glow + scale pop | Scatter or drop | Alternate highlight styles every 2 groups |
|
|
10
|
+
| Medium-high | Karaoke with color pop | Scatter or collapse | Alternate every 3 groups |
|
|
11
|
+
| Medium | Karaoke (subtle, white only) | Fade + slide | Alternate every 3 groups |
|
|
12
|
+
| Medium-low | Karaoke (minimal scale change) | Fade | Single style, vary ease per group |
|
|
13
|
+
| Low | Karaoke (warm tones, slow transition) | Collapse | Alternate every 4 groups |
|
|
14
|
+
|
|
15
|
+
**All energy levels use karaoke highlight as the baseline.** The difference is intensity — high energy gets accent color + glow + 15% scale pop on active words, low energy gets a gentle white shift with 3% scale.
|
|
16
|
+
|
|
17
|
+
**Emphasis words always break the pattern.** When a word is flagged as emphasis (emotional keyword, ALL CAPS, brand name), give it a stronger animation than surrounding words (larger scale, accent color, overshoot ease). This creates contrast.
|
|
18
|
+
|
|
19
|
+
**Marker highlight modes add a visual layer on top of karaoke.** For emphasis words that need more than color/scale, add a marker-style effect: highlight sweep, circle, burst, scribble, or sketchout. See `hyperframes-animation/rules/css-marker-patterns.md` for implementation details. Match mode to energy: burst for hype, circle for key terms, highlight for standard, scribble for subtle.
|
|
20
|
+
|
|
21
|
+
## Audio-Reactive Captions (Mandatory for Music)
|
|
22
|
+
|
|
23
|
+
**If the source audio is music (vocals over instrumentation, beats, any musical content), you MUST extract audio data and add audio-reactive animations.** This is not optional — music without audio reactivity looks disconnected. Even low-energy ballads get subtle bass pulse and treble glow.
|
|
24
|
+
|
|
25
|
+
No special wiring is needed. The group loop already iterates over every caption group to build entrance, karaoke, and exit tweens. At that point, read the audio data for each group's time range and use it to modulate the group's animation intensity with regular GSAP tweens.
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
// Load audio data inline (same pattern as TRANSCRIPT)
|
|
29
|
+
var AUDIO = JSON.parse(audioDataJson); // { fps, totalFrames, frames: [{ bands: [...] }] }
|
|
30
|
+
|
|
31
|
+
GROUPS.forEach(function (group, gi) {
|
|
32
|
+
var groupEl = document.getElementById("cg-" + gi);
|
|
33
|
+
if (!groupEl) return;
|
|
34
|
+
|
|
35
|
+
// Read peak energy for this group's time range
|
|
36
|
+
var startFrame = Math.floor(group.start * AUDIO.fps);
|
|
37
|
+
var endFrame = Math.min(Math.floor(group.end * AUDIO.fps), AUDIO.totalFrames - 1);
|
|
38
|
+
var peakBass = 0;
|
|
39
|
+
var peakTreble = 0;
|
|
40
|
+
for (var f = startFrame; f <= endFrame; f++) {
|
|
41
|
+
var frame = AUDIO.frames[f];
|
|
42
|
+
if (!frame) continue;
|
|
43
|
+
peakBass = Math.max(peakBass, frame.bands[0] || 0, frame.bands[1] || 0);
|
|
44
|
+
peakTreble = Math.max(peakTreble, frame.bands[6] || 0, frame.bands[7] || 0);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Modulate entrance — louder groups enter bigger and glowier
|
|
48
|
+
tl.to(
|
|
49
|
+
groupEl,
|
|
50
|
+
{
|
|
51
|
+
scale: 1 + peakBass * 0.06,
|
|
52
|
+
textShadow:
|
|
53
|
+
"0 0 " + Math.round(peakTreble * 12) + "px rgba(255,255,255," + peakTreble * 0.4 + ")",
|
|
54
|
+
duration: 0.3,
|
|
55
|
+
ease: "power2.out",
|
|
56
|
+
},
|
|
57
|
+
group.start,
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// Reset at exit so audio-driven values don't persist
|
|
61
|
+
tl.set(groupEl, { scale: 1, textShadow: "none" }, group.end - 0.15);
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
This shapes the animation at build time, not playback time — no per-frame callbacks, no `tl.call()` loops, no async fetch timing issues. Loud groups come in with more weight and glow; quiet groups come in soft. The audio data modulates _how much_, the content determines _what_.
|
|
66
|
+
|
|
67
|
+
Keep audio reactivity subtle — 3-6% scale variation and soft glow. Heavy pulsing makes text unreadable.
|
|
68
|
+
|
|
69
|
+
To generate the audio data file:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
python3 skills/hyperframes-creative/scripts/extract-audio-data.py audio.mp3 --fps 30 --bands 8 -o audio-data.json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Combining Techniques
|
|
76
|
+
|
|
77
|
+
Don't use the same highlight animation on every group — cycle through styles using the group index. Don't combine multiple competing animations on the same word at the same timestamp. Vary techniques across groups to match the content's pace changes.
|
|
78
|
+
|
|
79
|
+
**Marker highlight effects** layer well with karaoke — use karaoke for the word-by-word reveal, then add a marker effect on emphasis words only. For example: karaoke highlights each word in white, but brand names get a yellow highlight sweep and stats get a red circle. Cycle marker modes across groups for visual variety.
|
|
80
|
+
|
|
81
|
+
## Runtime Tools
|
|
82
|
+
|
|
83
|
+
Caption motion uses standard HyperFrames runtime APIs. Use the canonical sources:
|
|
84
|
+
|
|
85
|
+
- **GSAP timeline + tween syntax** — `hyperframes-animation/adapters/gsap.md` (eases, position parameter, performance)
|
|
86
|
+
- **`window.__hyperframes.fitTextFontSize` / `pretext`** — `hyperframes-core/references/determinism-rules.md` → Layout Contract (overflow prevention, per-frame text measurement)
|
|
87
|
+
- **Audio data extraction** — generate via `python3 skills/hyperframes-creative/scripts/extract-audio-data.py audio.mp3 --fps 30 --bands 8 -o audio-data.json`, then load inline as shown in "Audio-Reactive Captions" above
|