mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-17 15:24:19 +00:00
Sanitize Codex plugin skills for publication
This commit is contained in:
@@ -35,7 +35,6 @@ Routing procedure (replaces any mode decision):
|
||||
| `stardust` | accumulating poem, condensing letters | words condense from dust and return to it | poetic / memory / science-wonder monologues | one clear column side (probe fails → fall back to `cream`) | theme.json → make-theme |
|
||||
| `stomp` | full-frame takeover cards | hard-cut typographic takeover with a void before the drop | hooks, manifestos, ad openers — the words ARE the show | any (plate runs dimmed) | theme.json → make-theme |
|
||||
| `lastpage` | manuscript rail + a blurred future-field | the future hangs unreadable in the room; one rack-focus reveals every faint line was the apex word | visionary thesis, prophecy-toned talks, trailers, literary content | mid/dark (the field needs air) | theme.json → make-theme |
|
||||
| `nightcity` | corrupted-UI rail + cover-letterform apex | body words boot through a corrupted-cyan frame into acid-yellow UI; the apex slams in BEHIND the subject set in the CP2077 cover replica typeface (cyan offset, baseline streak, circuit trace), tears in as displaced slices, lives as a glitching print | gaming / tech-edge / glitch culture / hype drops, "赛博朋克/游戏封面" asks | any (the lockup carries its own contrast); CP2077-adjacent content only (fan-kit terms) | theme.json → make-theme |
|
||||
| `scoreboard` | split-flap chyron rail + departures-board apex | stadium split-flap mechanics — body words flip-cycle wrong words on tiles before clacking onto the real one; ROW counter + odometer chip furniture; the apex is a giant departures board behind the subject that locks the word letter-by-letter under floodlights and a crowd-flash, status ticker types on | sports, transit/travel, scores, countdowns, reveals, "翻牌/记分牌/机场大屏" asks | any (board + chyron bring their own dark metal contrast) | theme.json → make-theme |
|
||||
| `transit` | LED departure-strip rail + illumination-wipe apex | amber dot-matrix station PA — body words light column-by-column (L→R LED wipe + arrival flicker) on a docked departure strip whose lines page by scroll-snap; platform tag, ticking clock, ⚠ DELAYED → ● ON TIME gag; the apex panel expands behind the subject inside a chasing LED-marquee border, the word illuminates column-by-column under a PA flash + ding pulses, then pages up and collapses | travel/transit, announcements, schedules, countdowns, retro-terminal, "LED屏/车站到站/点阵屏" asks | any (LED strip + panel bring their own dark contrast) | theme.json → make-theme |
|
||||
| `vhs` | camcorder OSD rail + REC-FREEZE tracking-slam apex | tape playback — permanent lens vignette + OSD furniture (▶ PLAY, ● REC, blinking green timestamp); body words carry a permanent red/cyan misregistration fringe, arrive by tracking glitch and REWIND off with flat-white echoes + scrub lines (the deck flips PLAY→REW in dead air); the apex is REC FREEZE: 1-frame white tear + head-switching noise bar, the word slams in behind the subject as three sheared tracking bands that SNAP into register, misregistration breathes through the hold under tape weave + auto-iris, then rewinds off | retro / nostalgia / found-footage / home-video, '90s tech, music & lifestyle edits, "录像带/VHS/复古/DV" asks | any (backlight-comp scrim makes its own contrast on bright skies) | theme.json → make-theme |
|
||||
@@ -65,8 +64,7 @@ Routing procedure (replaces any mode decision):
|
||||
what should explode: a word (`ordnance`), the frame (`stomp`), a decode (`terminal`),
|
||||
every beat (`loud`).
|
||||
- **Named worlds** → direct hits: 控制台/终端 → `terminal`; 霓虹/招牌 → `neonsign`;
|
||||
诗/星尘/记忆 → `stardust`; 军事/重击 → `ordnance`; 预言/未来/悬念揭示 → `lastpage`;
|
||||
赛博朋克/游戏封面/夜之城 → `nightcity`.
|
||||
诗/星尘/记忆 → `stardust`; 军事/重击 → `ordnance`; 预言/未来/悬念揭示 → `lastpage`.
|
||||
- **Scene constraints veto last**: luma > 180 kills cream/screen column looks
|
||||
(→ `ink` or a rail/panel surface); dusk/dark unlocks `neon`/`neonsign`.
|
||||
- **Unsure** → `anchor` (the conservative default: words read, scene safe, zero spectacle).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: embedded-captions
|
||||
description: 'Add captions to a talking-head video. ONE catalog (CATALOG.md) of 32 visual identities behind two engines: column-flow (captions composited INTO the scene — matte occlusion + mix-blend; cream/ink/editorial/keynote/documentary/loud/neon/glitch/chrome/velocity) and themed constitutions (anchor/ordnance/terminal/neonsign/stardust/stomp/scoreboard/transit/vhs/arcade/dossier/laser/thunder/hologram/biolume/aurora/spectrum/papercut/popup/chalkboard/graffiti/brush/inkwater/ransom/lastpage/nightcity — e.g. a glyph-decode climax, a neon sign WRITTEN stroke by stroke, or the quiet `anchor` rail default). Route by identity, never by mode. Trigger on "captions/subtitles", "embed/cinematic captions", "VFX captions", "炸/特效/酷炫字幕", a named identity, or top-tier motion-graphics asks. Embedding every word is wrong for most talking-head content — `anchor` is the verbatim default. Pipeline: transcription → hyperframes remove-background matting → HTML render → ffmpeg overlay. Requires hyperframes and a single-subject clip.'
|
||||
description: 'Add captions to a talking-head video. ONE catalog (CATALOG.md) of 31 visual identities behind two engines: column-flow (captions composited INTO the scene — matte occlusion + mix-blend; cream/ink/editorial/keynote/documentary/loud/neon/glitch/chrome/velocity) and themed constitutions (anchor/ordnance/terminal/neonsign/stardust/stomp/scoreboard/transit/vhs/arcade/dossier/laser/thunder/hologram/biolume/aurora/spectrum/papercut/popup/chalkboard/graffiti/brush/inkwater/ransom/lastpage — e.g. a glyph-decode climax, a neon sign WRITTEN stroke by stroke, or the quiet `anchor` rail default). Route by identity, never by mode. Trigger on "captions/subtitles", "embed/cinematic captions", "VFX captions", "炸/特效/酷炫字幕", a named identity, or top-tier motion-graphics asks. Embedding every word is wrong for most talking-head content — `anchor` is the verbatim default. Pipeline: transcription → hyperframes remove-background matting → HTML render → ffmpeg overlay. Requires hyperframes and a single-subject clip.'
|
||||
metadata:
|
||||
tags: captions, embedded-captions, occlusion, matting, talking-head, rembg-matting, whisper, ffmpeg, cinematic
|
||||
---
|
||||
@@ -258,7 +258,7 @@ track has its own, much simpler spec → **[references/rail.md](references/rail.
|
||||
- **Face must never be 100%-covered continuously** — every 0.3s window, face bbox ≥30% uncovered.
|
||||
- **WCAG contrast** — final render lints; fix palette if it fails.
|
||||
- **Deterministic** — no `Math.random()`, no `Date.now()`, no `repeat:-1`.
|
||||
- **Never grade/recolor the video.** The footage ships untouched — captions are the only addition. No full-frame scanlines / duotone / darken / vignette over the a-roll. Cyberpunk/CRT texture belongs _inside_ a caption element, not over the whole frame.
|
||||
- **Never grade/recolor the video.** The footage ships untouched — captions are the only addition. No full-frame scanlines / duotone / darken / vignette over the a-roll. CRT/glitch texture belongs _inside_ a caption element, not over the whole frame.
|
||||
- **Rail-first for talking-head / explainer.** Don't embed the whole transcript — most text is the rail; embed only peaks. Embedding everything is the default mistake.
|
||||
- **Embed is scarce + spaced.** ≤1 embed per sentence/beat, never two adjacent or co-visible, ≥ a beat apart, at most one `apex`. climax = per-beat peak, **not** "the single payoff of the entire clip."
|
||||
- **Matte = the PERSON (hyperframes `remove-background`, u2net_human_seg, Apache-2.0).** Human segmentation by intent, but not surgically: thin offset furniture (mic boom arms) is usually excluded — captions render over it, behind the person — while large salient objects NEAR the subject (a telescope, a desk rig) can still leak into the matte and occlude captions. Objects HELD by the subject (products, phones) may drop out intermittently, letting captions pass in front. NEVER assume: sample `frames_fg/` at 2-3 timestamps before placing the hero, and prefer hero positions clear of any leaked furniture (`heroAnchor` can be skewed by leaks — cross-check against frames_bg).
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
______ __ __ ___ ____ __________
|
||||
/ ____/_ __/ /_ ___ _________ __ ______ / /__ |__ \ / __ \/__ /__ /
|
||||
/ / / / / / __ \/ _ \/ ___/ __ \/ / / / __ \/ //_/ __/ // / / / / / / /
|
||||
/ /___/ /_/ / /_/ / __/ / / /_/ / /_/ / / / / ,< / __// /_/ / / / / /
|
||||
\____/\__, /_.___/\___/_/ / .___/\__,_/_/ /_/_/|_| /____/\____/ /_/ /_/
|
||||
/____/ /_/
|
||||
|
||||
---Thanks and Rules---
|
||||
|
||||
Thanks for downloading this file! I really appreciate the folks checking out the site and I hope you enjoy using the file or if you just wanted to see what was in it, I hope it meets your expectations! A special thanks also to Eli, Madqueen, & Nikolay for helping me on several of the logos found on this page.
|
||||
|
||||
////// It's my duty to remind you that these are not for commercial usage. All of the logos here are the intellectual property of CD Projekt Red and are therefore not to be used in commercial applications at all. Don't sell it or use it in something that you are going to sell! If you do, you will be subject to the copyright laws of your country and may face legal action and fees.
|
||||
|
||||
Also, companies: Stop using these as a substitute for official files! I'm flattered, but there are differences between my logos and the official ones that can break your contract. In the event that you do, however, remember that you must attribute me, AS PER MY AGREEMENT WITH CD PROJEKT RED. I've got a direct line to legal as they were kind enough to allow me to have this project in the first place. Just use theirs, it's easier and much more official!
|
||||
|
||||
CD PROJEKT®, Cyberpunk®, Cyberpunk 2077® are registered trademarks of CD PROJEKT S.A. © 2020 CD PROJEKT S.A. All rights reserved. All other copyrights and trademarks are the property of their respective owners. //////
|
||||
|
||||
Use these logos to add a bit of realism to your fan pieces as well as any sort of cosplay you're thinking of doing for your favorite Con or event. There are lots of uses out there for these and I hope they come in handy. I always love seeing where these go, so feel free to send a picture our way:
|
||||
|
||||
Valency
|
||||
Twitter/Instagram: @valencygraphics
|
||||
|
||||
Eli
|
||||
Twitter/Instagram: @hey_elium
|
||||
|
||||
The Madqueen
|
||||
Twitter: @madqueenshow
|
||||
Youtube: The Madqueen Show
|
||||
|
||||
Nikolay Verin
|
||||
Twitter: @nikolayverin
|
||||
|
||||
Best of luck, Choombas!
|
||||
|
||||
Valency--- replica font: free for personal use (Lyon ArtZ replica via hyperpix); samurai theme is already fan-kit non-commercial
|
||||
Binary file not shown.
@@ -1,115 +0,0 @@
|
||||
{
|
||||
"unitsPerEm": 1000,
|
||||
"fontBBox": [0.033, -0.3, 1.117, 0.876],
|
||||
"ascent": 0.876,
|
||||
"descent": -0.3,
|
||||
"widths": {
|
||||
"a": 0.713,
|
||||
"b": 0.621,
|
||||
"c": 0.79,
|
||||
"d": 0.7,
|
||||
"e": 0.81,
|
||||
"f": 0.747,
|
||||
"g": 0.664,
|
||||
"h": 0.501,
|
||||
"i": 0.61,
|
||||
"j": 0.614,
|
||||
"k": 0.786,
|
||||
"l": 0.749,
|
||||
"m": 0.728,
|
||||
"n": 0.656,
|
||||
"o": 0.555,
|
||||
"p": 0.713,
|
||||
"q": 0.541,
|
||||
"r": 0.712,
|
||||
"s": 0.502,
|
||||
"t": 0.713,
|
||||
"u": 0.575,
|
||||
"v": 0.64,
|
||||
"w": 0.696,
|
||||
"x": 0.53,
|
||||
"y": 0.588,
|
||||
"z": 0.664,
|
||||
"A": 1.032,
|
||||
"B": 0.888,
|
||||
"C": 1.166,
|
||||
"D": 1.025,
|
||||
"E": 1.174,
|
||||
"F": 1.097,
|
||||
"G": 0.966,
|
||||
"H": 0.708,
|
||||
"I": 0.879,
|
||||
"J": 0.884,
|
||||
"K": 1.155,
|
||||
"L": 1.104,
|
||||
"M": 1.074,
|
||||
"N": 0.955,
|
||||
"O": 0.799,
|
||||
"P": 1.041,
|
||||
"Q": 0.779,
|
||||
"R": 1.033,
|
||||
"S": 0.719,
|
||||
"T": 1.038,
|
||||
"U": 0.821,
|
||||
"V": 0.945,
|
||||
"W": 1.019,
|
||||
"X": 0.761,
|
||||
"Y": 0.867,
|
||||
"Z": 0.96,
|
||||
" ": 0.26
|
||||
},
|
||||
"bounds": {
|
||||
"a": [0.058, -0.131, 0.656, 0.285],
|
||||
"b": [0.058, -0.151, 0.564, 0.504],
|
||||
"c": [0.058, -0.184, 0.731, 0.139],
|
||||
"d": [0.058, -0.159, 0.642, 0.448],
|
||||
"e": [0.058, -0.148, 0.752, 0.292],
|
||||
"f": [0.058, -0.142, 0.69, 0.401],
|
||||
"g": [0.057, -0.16, 0.607, 0.316],
|
||||
"h": [0.057, -0.172, 0.443, 0.441],
|
||||
"i": [0.057, -0.167, 0.553, 0.29],
|
||||
"j": [0.058, -0.158, 0.557, 0.266],
|
||||
"k": [0.057, -0.212, 0.728, 0.354],
|
||||
"l": [0.059, -0.185, 0.692, 0.276],
|
||||
"m": [0.057, -0.286, 0.671, 0.308],
|
||||
"n": [0.058, -0.167, 0.598, 0.252],
|
||||
"o": [0.057, -0.168, 0.499, 0.226],
|
||||
"p": [0.058, -0.258, 0.656, 0.239],
|
||||
"q": [0.056, -0.227, 0.487, 0.245],
|
||||
"r": [0.058, -0.081, 0.655, 0.32],
|
||||
"s": [0.058, -0.153, 0.446, 0.245],
|
||||
"t": [0.057, -0.161, 0.655, 0.276],
|
||||
"u": [0.058, -0.167, 0.518, 0.312],
|
||||
"v": [0.051, -0.209, 0.582, 0.458],
|
||||
"w": [0.057, -0.173, 0.639, 0.391],
|
||||
"x": [0.058, -0.258, 0.472, 0.208],
|
||||
"y": [0.057, -0.292, 0.532, 0.22],
|
||||
"z": [0.058, -0.158, 0.606, 0.295],
|
||||
"A": [0.058, -0.161, 0.974, 0.484],
|
||||
"B": [0.058, -0.161, 0.834, 0.846],
|
||||
"C": [0.058, -0.158, 1.108, 0.342],
|
||||
"D": [0.057, -0.155, 0.967, 0.79],
|
||||
"E": [0.058, -0.164, 1.117, 0.508],
|
||||
"F": [0.054, -0.167, 1.039, 0.67],
|
||||
"G": [0.057, -0.164, 0.908, 0.573],
|
||||
"H": [0.057, -0.161, 0.649, 0.794],
|
||||
"I": [0.057, -0.167, 0.821, 0.529],
|
||||
"J": [0.057, -0.161, 0.826, 0.5],
|
||||
"K": [0.057, -0.262, 1.098, 0.621],
|
||||
"L": [0.056, -0.153, 1.048, 0.567],
|
||||
"M": [0.057, -0.286, 1.017, 0.645],
|
||||
"N": [0.057, -0.197, 0.897, 0.445],
|
||||
"O": [0.057, -0.198, 0.742, 0.408],
|
||||
"P": [0.058, -0.208, 0.984, 0.567],
|
||||
"Q": [0.056, -0.173, 0.72, 0.567],
|
||||
"R": [0.058, -0.166, 0.976, 0.445],
|
||||
"S": [0.057, -0.129, 0.661, 0.494],
|
||||
"T": [0.057, -0.151, 0.983, 0.525],
|
||||
"U": [0.058, -0.159, 0.766, 0.583],
|
||||
"V": [0.057, -0.16, 0.887, 0.876],
|
||||
"W": [0.057, -0.228, 0.962, 0.644],
|
||||
"X": [0.058, -0.233, 0.703, 0.496],
|
||||
"Y": [0.058, -0.3, 0.809, 0.496],
|
||||
"Z": [0.056, -0.154, 0.903, 0.545]
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,6 @@ const SETPIECE_PREF_TOP = {
|
||||
decode: 26,
|
||||
drawon: 18,
|
||||
cpslam: 27,
|
||||
coverword: 27,
|
||||
settle: 27,
|
||||
flapboard: 25,
|
||||
ledwipe: 52,
|
||||
@@ -510,30 +509,6 @@ if (!heroInline && !HEROLESS) {
|
||||
HG.fontPx = Math.min(dna.hero.fontPx || 130, Math.floor((W * 0.92 - n * 6) / em1));
|
||||
Object.assign(HG, sceneHeroXY("ransomnote", HG.fontPx));
|
||||
HG.halfW = (em1 * HG.fontPx + n * 6) / 2;
|
||||
} else if (dna.hero.setpiece === "coverword") {
|
||||
// metric-exact fit from the replica font's advance widths (logo case:
|
||||
// first letter upper, rest lower — the official mark's own arrangement)
|
||||
const CPM = JSON.parse(
|
||||
fs.readFileSync(path.join(SKILL, "assets/brand/cyberpunk-widths.json"), "utf8"),
|
||||
);
|
||||
const disp = heroText[0].toUpperCase() + heroText.slice(1).toLowerCase();
|
||||
const bad = [...disp].filter((c) => !(c in CPM.widths));
|
||||
if (bad.length)
|
||||
throw new Error(
|
||||
`[make-theme] coverword: no replica glyph for ${JSON.stringify(bad)} in "${heroText}" — pick a hero without digits/special chars or use hero.text`,
|
||||
);
|
||||
const em = [...disp].reduce((a, c) => a + CPM.widths[c], 0) + 0.01 * (disp.length - 1);
|
||||
// glyph ink is small inside the em box (x-height ~0.3em) -> size by INK:
|
||||
// dna fontPx = target ink height in px, not nominal font-size
|
||||
const inkTop = Math.max(...[...disp].map((c) => (CPM.bounds[c] || [0, 0, 0, 0.5])[3]));
|
||||
const inkBot = Math.min(...[...disp].map((c) => (CPM.bounds[c] || [0, -0.1, 0, 0])[1]));
|
||||
const inkH = inkTop - inkBot;
|
||||
HG.fontPx = Math.round(Math.min((dna.hero.fontPx || 150) / inkH, (W * 0.84) / em));
|
||||
Object.assign(HG, sceneHeroXY("coverword", Math.round(HG.fontPx * inkH)));
|
||||
HG.halfW = (em * HG.fontPx) / 2 + 0.9 * HG.fontPx;
|
||||
HG.coverEm = em;
|
||||
HG.coverDisp = disp;
|
||||
HG.coverInk = { inkTop, inkBot, inkH };
|
||||
}
|
||||
// keep the word on frame (when wider than the frame, CENTER it — an inverted
|
||||
// Math.max/Math.min clamp would silently pin to the lower bound off-center)
|
||||
@@ -5111,176 +5086,6 @@ function setpieceCpslam() {
|
||||
return { css, html, js };
|
||||
}
|
||||
|
||||
function setpieceCoverword() {
|
||||
// CP2077 COVER-LETTERFORM slam, precision pass: the spoken apex word set in
|
||||
// the replica typeface of the official mark (assets/brand/CyberpunkReplica.ttf
|
||||
// — lowercase glyphs carry the logo's actual brush chops, blade terminals and
|
||||
// spikes), in logo case (First-upper). The setpiece adds only what the FONT
|
||||
// does not carry: the solid cyan duplicate offset down-left, the baseline
|
||||
// streak + cyan pixel debris, the circuit trace off the tail, and the
|
||||
// tear-in/living-print/tear-out choreography. No synthetic letter surgery.
|
||||
const h = dna.hero,
|
||||
p = h.params || {},
|
||||
I = heroIn;
|
||||
const YEL = dna.palette.hot || "#FCEE0A",
|
||||
CYN = dna.palette.accent || "#52BEDC";
|
||||
const srnd = (() => {
|
||||
let a = p.seed || 77;
|
||||
return () => {
|
||||
a |= 0;
|
||||
a = (a + 0x6d2b79f5) | 0;
|
||||
let t = Math.imul(a ^ (a >>> 15), 1 | a);
|
||||
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
|
||||
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
||||
};
|
||||
})();
|
||||
const CPM = JSON.parse(
|
||||
fs.readFileSync(path.join(SKILL, "assets/brand/cyberpunk-widths.json"), "utf8"),
|
||||
);
|
||||
const fontB64 = fs
|
||||
.readFileSync(path.join(SKILL, "assets/brand/CyberpunkReplica.ttf"))
|
||||
.toString("base64");
|
||||
const DISP = HG.coverDisp || heroText[0].toUpperCase() + heroText.slice(1).toLowerCase();
|
||||
const hpx = HG.fontPx;
|
||||
const em =
|
||||
HG.coverEm ||
|
||||
[...DISP].reduce((a, c) => a + (CPM.widths[c] || 0.7), 0) + 0.01 * (DISP.length - 1);
|
||||
const INK = HG.coverInk || { inkTop: 0.5, inkBot: -0.25, inkH: 0.75 };
|
||||
const IH = INK.inkH * hpx; // visual ink height (px)
|
||||
const Wd = em * hpx;
|
||||
const BW = Math.round(Wd + 2.4 * hpx),
|
||||
BH = Math.round(IH + 0.7 * hpx);
|
||||
// baseline placed so the measured ink box is vertically centered
|
||||
const baseY = Math.round(BH / 2 + ((INK.inkTop + INK.inkBot) / 2) * hpx);
|
||||
const feetY = Math.round(baseY - INK.inkBot * hpx); // lowest ink (px, y-down)
|
||||
const x0 = Math.round((BW - Wd) / 2),
|
||||
x1 = Math.round(x0 + Wd);
|
||||
const CX = BW - 120 > W ? W / 2 : Math.max(BW / 2 - 60, Math.min(W - BW / 2 + 60, HG.x)),
|
||||
CY = HG.y;
|
||||
const P = (pts, fill) =>
|
||||
`<polygon points="${pts.map((q) => q[0].toFixed(0) + "," + q[1].toFixed(0)).join(" ")}" fill="${fill}"/>`;
|
||||
// baseline streak: thin brush drag just under the glyph feet, pointed right
|
||||
// tip past the tail (the font's own C/K blades carry the rest of the energy)
|
||||
let extras = "";
|
||||
// streak band MERGES with the glyph feet (official: letters melt into it)
|
||||
const sT = feetY - 0.075 * IH,
|
||||
sB = feetY + 0.012 * IH;
|
||||
extras += P(
|
||||
[
|
||||
[x0 - 0.16 * hpx, sT + 2],
|
||||
[x1 + 0.1 * hpx, sT],
|
||||
[x1 + 0.55 * hpx, sB - 1],
|
||||
[x0 - 0.05 * hpx, sB],
|
||||
],
|
||||
"white",
|
||||
);
|
||||
let cuts = "";
|
||||
for (let k = 0; k < 3; k++) {
|
||||
const gx = x0 + (0.1 + srnd() * 0.8) * Wd,
|
||||
gw = (0.05 + srnd() * 0.1) * hpx;
|
||||
cuts += P(
|
||||
[
|
||||
[gx, sT - 1],
|
||||
[gx + gw, sT - 1],
|
||||
[gx + gw, sB + 1],
|
||||
[gx, sB + 1],
|
||||
],
|
||||
"black",
|
||||
);
|
||||
}
|
||||
// cyan pixel debris along the streak
|
||||
let debris = "";
|
||||
for (let k = 0; k < 8; k++) {
|
||||
const dx = x0 - 0.3 * hpx + srnd() * (Wd + 0.9 * hpx),
|
||||
dw = (0.06 + srnd() * 0.3) * hpx;
|
||||
const dy = sT - 2 + srnd() * (sB - sT + 4);
|
||||
debris += `<rect x="${dx.toFixed(0)}" y="${dy.toFixed(0)}" width="${dw.toFixed(0)}" height="${(1.5 + srnd() * 2.5).toFixed(1)}" fill="${CYN}" opacity="0.85"/>`;
|
||||
}
|
||||
// circuit trace off the tail (the official mark's cyan trace language)
|
||||
const tx = x1 + 0.25 * hpx,
|
||||
ty = feetY + 0.14 * IH;
|
||||
const trace = `<g id="cwT" opacity="0">
|
||||
<path d="M ${x0 + Wd * 0.45} ${ty} H ${tx} l ${0.14 * hpx} ${0.07 * hpx} h ${0.3 * hpx}" stroke="${CYN}" stroke-width="2" fill="none"/>
|
||||
<circle cx="${(tx + 0.05 * hpx).toFixed(0)}" cy="${ty.toFixed(0)}" r="3.5" fill="none" stroke="${CYN}" stroke-width="2"/>
|
||||
<circle cx="${(tx + 0.44 * hpx).toFixed(0)}" cy="${(ty + 0.07 * hpx).toFixed(0)}" r="3.5" fill="${CYN}"/>
|
||||
</g>`;
|
||||
const bnd = [
|
||||
[0, 0.42],
|
||||
[0.42, 0.6],
|
||||
[0.6, 1],
|
||||
];
|
||||
const clipDefs = bnd
|
||||
.map(
|
||||
(b, i) =>
|
||||
`<clipPath id="cwb${i}"><rect x="-60" y="${(b[0] * BH).toFixed(0)}" width="${BW + 120}" height="${((b[1] - b[0]) * BH).toFixed(0)}"/></clipPath>`,
|
||||
)
|
||||
.join("");
|
||||
const layer = (fill) =>
|
||||
`<rect x="0" y="0" width="${BW}" height="${BH}" fill="${fill}" mask="url(#cwm)"/>`;
|
||||
const EX = theme.hero.exitAt ?? Math.min(heroOut - 0.2, I + (p.hold ?? 2.6));
|
||||
const css = `
|
||||
@font-face { font-family:'CPReplica'; src: url(data:font/ttf;base64,${fontB64}) format('truetype'); font-display: block; }
|
||||
#cw { position:absolute; left:${CX}px; top:${CY}px; width:0; height:0; opacity:0; }
|
||||
#cwW { position:absolute; left:0; top:0; transform:translate(-50%,-50%);
|
||||
filter: drop-shadow(0 5px 20px rgba(0,0,0,0.5)); }`;
|
||||
const html = ` <div id="cw">
|
||||
<svg id="cwW" width="${BW}" height="${BH}" viewBox="0 0 ${BW} ${BH}" style="overflow:visible">
|
||||
<defs>
|
||||
<mask id="cwm">
|
||||
<text x="${x0}" y="${baseY}" font-family="'CPReplica'" font-size="${hpx}"
|
||||
letter-spacing="${(hpx * 0.01).toFixed(1)}" fill="white">${esc(DISP)}</text>
|
||||
${extras}
|
||||
${cuts}
|
||||
</mask>
|
||||
${clipDefs}
|
||||
</defs>
|
||||
<g id="cwC" transform="translate(-7 8)">${layer(CYN)}</g>
|
||||
${bnd.map((_, i) => `<g clip-path="url(#cwb${i})"><g id="cwY${i}">${layer(YEL)}</g></g>`).join("\n ")}
|
||||
<g id="cwD">${debris}</g>
|
||||
${trace}
|
||||
</svg>
|
||||
</div>`;
|
||||
const js = `
|
||||
// ---- setpiece: COVERWORD v2 (replica letterforms; tear-in -> living print -> tear-out) ----
|
||||
const I = ${I.toFixed(3)};
|
||||
const wrnd = mulberry32(${p.seed || 77});
|
||||
const TB = (sel, dx, dy, at) => tl.set(sel, { attr: { transform: "translate(" + dx + " " + (dy || 0) + ")" } }, at);
|
||||
// corrupted boot-flick of the whole lockup during the charge
|
||||
tl.set("#cw", { opacity: 0.35, filter: "saturate(0) brightness(1.6)" }, I - 0.30);
|
||||
tl.set("#cw", { opacity: 0 }, I - 0.30 + F);
|
||||
tl.set("#cw", { opacity: 0.5, filter: "saturate(0) brightness(2)" }, I - 0.13);
|
||||
tl.set("#cw", { opacity: 0 }, I - 0.13 + F);
|
||||
// SLAM: crush in with slice displacement, snap into register
|
||||
tl.set("#cw", { opacity: 1, filter: "none" }, I - 0.02);
|
||||
tl.fromTo("#cwW", { scale: 2.4 }, { scale: 1, duration: 0.10, ease: "power4.in" }, I - 0.02);
|
||||
TB("#cwY0", -34, 0, I - 0.02); TB("#cwY1", 26, 0, I - 0.02); TB("#cwY2", -18, 0, I - 0.02);
|
||||
TB("#cwC", -44, 8, I - 0.02);
|
||||
tl.set("#cwD", { opacity: 0 }, I - 0.02);
|
||||
TB("#cwY0", 0, 0, I + 0.10); TB("#cwY1", 0, 0, I + 0.10); TB("#cwY2", 0, 0, I + 0.10);
|
||||
TB("#cwC", -7, 8, I + 0.10);
|
||||
tl.set("#cwW", { scaleX: 1.08, scaleY: 0.94 }, I + 0.10);
|
||||
tl.to("#cwW", { scaleX: 1, scaleY: 1, duration: 0.45, ease: "elastic.out(1.05, 0.38)" }, I + 0.16);
|
||||
tl.set("#cwD", { opacity: 1 }, I + 0.12);
|
||||
tl.set("#cwT", { opacity: 0.9 }, I + 0.34);
|
||||
// living print: seeded slice slips + cyan jolts
|
||||
let gt = I + 0.55;
|
||||
while (gt < ${EX.toFixed(3)} - 0.25) {
|
||||
const r = wrnd();
|
||||
if (r < 0.4) { const b = Math.floor(wrnd() * 3); TB("#cwY" + b, (wrnd() - 0.5) * 22, 0, gt); TB("#cwY" + b, 0, 0, gt + F); }
|
||||
else if (r < 0.7) { TB("#cwC", -16, 8, gt); TB("#cwC", -7, 8, gt + F); }
|
||||
else { tl.set("#cw", { x: (wrnd() - 0.5) * 9 }, gt); tl.set("#cw", { x: 0 }, gt + F); }
|
||||
gt += 0.4 + wrnd() * 0.55;
|
||||
}
|
||||
tl.to("#cwW", { scale: 1.04, duration: 1.1, ease: "power1.inOut" }, I + 0.66);
|
||||
// EXIT: tear cascade -> gone
|
||||
const E = ${EX.toFixed(3)};
|
||||
TB("#cwY0", 52, 0, E); TB("#cwY1", -38, 0, E); TB("#cwY2", 30, 0, E);
|
||||
TB("#cwC", -30, 8, E);
|
||||
tl.set("#cwT", { opacity: 0 }, E);
|
||||
tl.set("#cw", { opacity: 0.45 }, E + F);
|
||||
tl.set("#cw", { opacity: 0, display: "none" }, E + 2 * F);`;
|
||||
return { css, html, js };
|
||||
}
|
||||
function setpieceSettle() {
|
||||
const I = heroIn;
|
||||
const E = theme.hero.exitAt ?? Math.min(heroOut, DUR - 0.12);
|
||||
@@ -8659,7 +8464,6 @@ const SETPIECES = {
|
||||
decode: setpieceDecode,
|
||||
drawon: setpieceDrawon,
|
||||
cpslam: setpieceCpslam,
|
||||
coverword: setpieceCoverword,
|
||||
settle: setpieceSettle,
|
||||
flapboard: setpieceFlapboard,
|
||||
ledwipe: setpieceLedwipe,
|
||||
|
||||
@@ -9,7 +9,7 @@ One theme at a time. The demo is the spec; the engine is the law.
|
||||
final_fx.mp4 + strip.png (ground truth of how it should look).
|
||||
- Engine: `scripts/make-theme.cjs` — read the header + the existing paradigms
|
||||
(rail/panel/poem/takeover) and setpieces (detonation/decode/drawon/assembly/
|
||||
colorflip/cpslam/coverword/settle) before writing anything.
|
||||
colorflip/cpslam/settle) before writing anything.
|
||||
|
||||
## Process
|
||||
|
||||
|
||||
@@ -81,7 +81,6 @@ scrims work; never the screen-blend index_fg path, which can only add light).
|
||||
| `decode` | slot-machine glyph reels (steps() ease, seek-safe) lock left→right with RGB jitter → lock snap → CRT power-off exit | pairs with `redact-until-hero` |
|
||||
| `drawon` | the word is WRITTEN stroke-by-stroke from a single-line font (Hershey) — per-stroke paths revealed sequentially at constant pen speed, nib rides `getPointAtLength`, hops at pen lifts; then hum + buzz dip | any word, zero tuning: `gen-stroke-path.py` lays out glyph pen-paths at compile time |
|
||||
| `cpslam` | acid-yellow stencil word slams in BEHIND the subject with REAL diagonal notch cuts (SVG mask = true transparency over footage), chromatic split that settles to a PERMANENT cyan/red registration error, seeded glitch ticks, katakana tag, glitch-out exit | bounded hold (~2.6s default, `params.hold` / `hero.exitAt` override) — a climax is an event, not wallpaper |
|
||||
| `coverword` | the spoken apex word SET IN the replica typeface of the CP2077 cover mark (`assets/brand/CyberpunkReplica.ttf` — lowercase glyphs carry the logo's real brush chops, blade terminals and spikes; logo case = First-upper rest-lower). The setpiece adds only what the font lacks: solid cyan duplicate offset (-7,8), baseline streak merged with the glyph feet + cyan debris, circuit trace off the tail, tear-in slices / living print / tear-out | metric-exact layout from `cyberpunk-widths.json` (advance widths + ink bounds; `fontPx` = target INK height). No digits in the replica → compile ERROR with guidance. Replica font: personal-use license — samurai is already fan-kit non-commercial |
|
||||
| `assembly` | (inline, poem) apex word condenses BIG while star particles fly into it | |
|
||||
| `colorflip` | (inline, takeover) accent-color crush card + dim kick + squash/settle + loom | pairs with fx flash + plate punch/shake |
|
||||
| `flapboard` | split-flap departures board takeover: floodlight dim/scrim swing on, the housing clacks down (rotationX, squash, elastic) behind the subject, one giant flap tile per char flip-cycles 3–5 seeded wrong glyphs then LOCKS left→right across `params.lockWindow` (hot flash → cools to bone) under baked clack y-jitter; lock-complete = big clack + amber glow flicker + rule wipe + steps() status-ticker; hold = loom + one tile re-flutter; exit = tiles flip to blank cascade, housing flips away | pairs with `fx.crowdflash` (pops at lock start/end) and `plate.punchOffset = lockWindow` so the plate punch lands on the lock-complete clack, not the hero onset |
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
{
|
||||
"name": "nightcity",
|
||||
"voice": "broken-UI hardware register meets the cover mark — body words BOOT in as corrupted cyan for a frame before settling to acid-yellow UI (minors keep a cyan/red registration shadow); the apex word slams in BEHIND the subject SET IN the replica typeface of the CP2077 cover lettering (real brush chops, blade terminals, spikes in the glyphs; logo case), with the cyan duplicate offset, a baseline streak merged into the glyph feet, cyan debris and a circuit trace off the tail. Tear-in slices, living print, tear-out.",
|
||||
"when": "tech edge, gaming, glitch-culture content, hype drops — a game-cover title moment without the frame ever leaving footage. Loud register.",
|
||||
"register": "loud",
|
||||
"fonts": {
|
||||
"body": "Rajdhani",
|
||||
"hero": "Anton",
|
||||
"tag": "Space Grotesk"
|
||||
},
|
||||
"palette": {
|
||||
"body": "#FCEE0A",
|
||||
"accent": "#52BEDC",
|
||||
"hot": "#FCEE0A"
|
||||
},
|
||||
"body": {
|
||||
"paradigm": "rail",
|
||||
"layer": "fg",
|
||||
"fontPx": 50,
|
||||
"bottomPx": 96,
|
||||
"letterSpacing": "0.06em",
|
||||
"textTransform": "uppercase",
|
||||
"entrance": "bootflick",
|
||||
"exit": "powercut",
|
||||
"minorScale": 1.3,
|
||||
"yield": {
|
||||
"dim": 0.4,
|
||||
"pre": 0.2,
|
||||
"post": 0.9
|
||||
}
|
||||
},
|
||||
"hero": {
|
||||
"setpiece": "coverword",
|
||||
"layer": "bg",
|
||||
"fontPx": 150,
|
||||
"params": {
|
||||
"seed": 77
|
||||
}
|
||||
},
|
||||
"fx": {
|
||||
"flash": 0.55,
|
||||
"seed": 20260611
|
||||
},
|
||||
"plate": {
|
||||
"punch": 0.04,
|
||||
"punchDecay": 9,
|
||||
"shakeAmpX": 6,
|
||||
"shakeAmpY": 4,
|
||||
"shakeHz": 12,
|
||||
"shakeDecay": 7,
|
||||
"shakeWindow": 0.5,
|
||||
"rgbashift": 4,
|
||||
"grain": 6
|
||||
},
|
||||
"linkages": []
|
||||
}
|
||||
@@ -63,18 +63,12 @@ export function hyperframesPackageSpec(packageName) {
|
||||
const version = readBundledHyperframesVersion();
|
||||
if (version) return `${packageName}@${version}`;
|
||||
|
||||
// Global skill installs (e.g. ~/.claude/skills) have no hyperframes package.json
|
||||
// in their ancestor chain, so the bundled version is unknowable. Fall back to
|
||||
// @latest instead of throwing: already-installed packages still import, and a
|
||||
// bootstrap install can still proceed (@latest satisfies the pinned-spec guard).
|
||||
process.stderr.write(
|
||||
throw new Error(
|
||||
[
|
||||
`hyperframes: could not determine the bundled version for ${packageName}; using @latest.`,
|
||||
`Set ${VERSION_OVERRIDE_ENV}=<version> to pin it.`,
|
||||
"",
|
||||
`hyperframes: could not determine the bundled version for ${packageName}.`,
|
||||
`Set ${VERSION_OVERRIDE_ENV}=<version> to allow dependency bootstrap.`,
|
||||
].join("\n"),
|
||||
);
|
||||
return `${packageName}@latest`;
|
||||
}
|
||||
|
||||
function resolvePackageEntry(packageName) {
|
||||
@@ -109,6 +103,9 @@ function readBundledHyperframesVersion() {
|
||||
join(ancestor, "packages", "cli", "package.json"),
|
||||
);
|
||||
if (monorepoCliVersion) return monorepoCliVersion;
|
||||
|
||||
const pluginVersion = readCodexPluginVersion(join(ancestor, ".codex-plugin", "plugin.json"));
|
||||
if (pluginVersion) return pluginVersion;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -125,6 +122,18 @@ function readPackageVersion(packageJsonPath) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function readCodexPluginVersion(pluginJsonPath) {
|
||||
try {
|
||||
const manifest = JSON.parse(readFileSync(pluginJsonPath, "utf8"));
|
||||
if (manifest.name === "hyperframes") {
|
||||
return typeof manifest.version === "string" ? manifest.version : null;
|
||||
}
|
||||
} catch {
|
||||
// Keep searching ancestor plugin manifests.
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function envNodeModulesDirs() {
|
||||
return (process.env[NODE_MODULES_ENV] ?? "").split(delimiter).filter(Boolean);
|
||||
}
|
||||
|
||||
@@ -35,10 +35,10 @@ test("hyperframesPackageSpec: resolvable in-repo version pins it", async () => {
|
||||
}
|
||||
});
|
||||
|
||||
// (c) unresolvable + no override -> @latest fallback, no throw (global-install case).
|
||||
// (c) unresolvable + no override -> fail closed rather than bootstrapping @latest.
|
||||
// Copy the loader into an isolated temp dir whose ancestor chain has no hyperframes
|
||||
// package.json, and run node from there so cwd cannot resolve one either.
|
||||
test("hyperframesPackageSpec: unresolvable falls back to @latest without throwing", () => {
|
||||
test("hyperframesPackageSpec: unresolvable requires an explicit version override", () => {
|
||||
const dir = mkdtempSync(join(tmpdir(), "hf-pkgloader-"));
|
||||
try {
|
||||
copyFileSync(join(HERE, "package-loader.mjs"), join(dir, "package-loader.mjs"));
|
||||
@@ -52,9 +52,9 @@ test("hyperframesPackageSpec: unresolvable falls back to @latest without throwin
|
||||
].join("\n"),
|
||||
);
|
||||
const res = spawnSync(process.execPath, [probe], { cwd: dir, encoding: "utf8" });
|
||||
assert.equal(res.status, 0, res.stderr);
|
||||
assert.equal(res.stdout.trim(), "@hyperframes/producer@latest");
|
||||
assert.match(res.stderr, /using @latest/);
|
||||
assert.notEqual(res.status, 0);
|
||||
assert.equal(res.stdout.trim(), "");
|
||||
assert.match(res.stderr, /could not determine the bundled version/);
|
||||
assert.match(res.stderr, new RegExp(ENV));
|
||||
} finally {
|
||||
rmSync(dir, { recursive: true, force: true });
|
||||
|
||||
@@ -63,18 +63,12 @@ export function hyperframesPackageSpec(packageName) {
|
||||
const version = readBundledHyperframesVersion();
|
||||
if (version) return `${packageName}@${version}`;
|
||||
|
||||
// Global skill installs (e.g. ~/.claude/skills) have no hyperframes package.json
|
||||
// in their ancestor chain, so the bundled version is unknowable. Fall back to
|
||||
// @latest instead of throwing: already-installed packages still import, and a
|
||||
// bootstrap install can still proceed (@latest satisfies the pinned-spec guard).
|
||||
process.stderr.write(
|
||||
throw new Error(
|
||||
[
|
||||
`hyperframes: could not determine the bundled version for ${packageName}; using @latest.`,
|
||||
`Set ${VERSION_OVERRIDE_ENV}=<version> to pin it.`,
|
||||
"",
|
||||
`hyperframes: could not determine the bundled version for ${packageName}.`,
|
||||
`Set ${VERSION_OVERRIDE_ENV}=<version> to allow dependency bootstrap.`,
|
||||
].join("\n"),
|
||||
);
|
||||
return `${packageName}@latest`;
|
||||
}
|
||||
|
||||
function resolvePackageEntry(packageName) {
|
||||
@@ -109,6 +103,9 @@ function readBundledHyperframesVersion() {
|
||||
join(ancestor, "packages", "cli", "package.json"),
|
||||
);
|
||||
if (monorepoCliVersion) return monorepoCliVersion;
|
||||
|
||||
const pluginVersion = readCodexPluginVersion(join(ancestor, ".codex-plugin", "plugin.json"));
|
||||
if (pluginVersion) return pluginVersion;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -125,6 +122,18 @@ function readPackageVersion(packageJsonPath) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function readCodexPluginVersion(pluginJsonPath) {
|
||||
try {
|
||||
const manifest = JSON.parse(readFileSync(pluginJsonPath, "utf8"));
|
||||
if (manifest.name === "hyperframes") {
|
||||
return typeof manifest.version === "string" ? manifest.version : null;
|
||||
}
|
||||
} catch {
|
||||
// Keep searching ancestor plugin manifests.
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function envNodeModulesDirs() {
|
||||
return (process.env[NODE_MODULES_ENV] ?? "").split(delimiter).filter(Boolean);
|
||||
}
|
||||
|
||||
@@ -35,10 +35,10 @@ test("hyperframesPackageSpec: resolvable in-repo version pins it", async () => {
|
||||
}
|
||||
});
|
||||
|
||||
// (c) unresolvable + no override -> @latest fallback, no throw (global-install case).
|
||||
// (c) unresolvable + no override -> fail closed rather than bootstrapping @latest.
|
||||
// Copy the loader into an isolated temp dir whose ancestor chain has no hyperframes
|
||||
// package.json, and run node from there so cwd cannot resolve one either.
|
||||
test("hyperframesPackageSpec: unresolvable falls back to @latest without throwing", () => {
|
||||
test("hyperframesPackageSpec: unresolvable requires an explicit version override", () => {
|
||||
const dir = mkdtempSync(join(tmpdir(), "hf-pkgloader-"));
|
||||
try {
|
||||
copyFileSync(join(HERE, "package-loader.mjs"), join(dir, "package-loader.mjs"));
|
||||
@@ -52,9 +52,9 @@ test("hyperframesPackageSpec: unresolvable falls back to @latest without throwin
|
||||
].join("\n"),
|
||||
);
|
||||
const res = spawnSync(process.execPath, [probe], { cwd: dir, encoding: "utf8" });
|
||||
assert.equal(res.status, 0, res.stderr);
|
||||
assert.equal(res.stdout.trim(), "@hyperframes/producer@latest");
|
||||
assert.match(res.stderr, /using @latest/);
|
||||
assert.notEqual(res.status, 0);
|
||||
assert.equal(res.stdout.trim(), "");
|
||||
assert.match(res.stderr, /could not determine the bundled version/);
|
||||
assert.match(res.stderr, new RegExp(ENV));
|
||||
} finally {
|
||||
rmSync(dir, { recursive: true, force: true });
|
||||
|
||||
@@ -113,12 +113,12 @@ Assets are cached automatically on resolve. Subsequent resolves for the same pro
|
||||
| `ffprobe` | Probe duration, dimensions, codec on adopt | Yes |
|
||||
| `heygen` | Audio catalog, asset search | For providers |
|
||||
|
||||
Install the `heygen` CLI (single static binary, no runtime) and authenticate:
|
||||
Install the `heygen` CLI with the official installer for your environment and authenticate outside the conversation:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://static.heygen.ai/cli/install.sh | bash # installs latest to ~/.local/bin
|
||||
heygen update # if already installed: needs >= v0.1.6
|
||||
export HEYGEN_API_KEY=<your-key> # or: heygen auth login --key <key>
|
||||
heygen --version # confirm it is on PATH
|
||||
heygen update # needs >= v0.1.6
|
||||
heygen auth login # or set HEYGEN_API_KEY in your shell
|
||||
```
|
||||
|
||||
Requires **heygen >= v0.1.6** — the providers tag requests with the allowlisted `--headers 'X-HeyGen-Client-Source: media-use'` flag, added in v0.1.6. `asset search` is a pre-launch command hidden from `heygen --help`, but it runs. Without a `heygen` on PATH (or a valid key) the providers print a one-line diagnostic to stderr and resolve falls through to "no provider could resolve".
|
||||
|
||||
@@ -878,7 +878,7 @@ Do NOT add a mute button inside the composition. The `#sfx-mute` coral button pa
|
||||
</script>
|
||||
```
|
||||
|
||||
**Sourcing SFX files:** use the HeyGen MCP `search_audio_sounds` tool with `type=sound_effects` and keywords like "whoosh", "click", "transition". Download the results to a local `sfx/` directory next to `demo.html` and reference them by relative path. Do not fetch SFX at render time — the HyperFrames determinism rule forbids runtime network requests; pre-download and commit them.
|
||||
**Sourcing SFX files:** use bundled SFX, `media-use`, or another user-approved local/source-controlled sound library. Download or copy results to a local `sfx/` directory next to `demo.html` and reference them by relative path. Do not fetch SFX at render time — the HyperFrames determinism rule forbids runtime network requests; pre-download and commit them.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -58,12 +58,12 @@ Ask the user which voice provider they'd like:
|
||||
> 2. **ElevenLabs** — Large voice library, very natural output. Requires ElevenLabs API key. Does not return word timestamps — you'll transcribe separately.
|
||||
> 3. **Kokoro** (Free) — Runs locally, no API key needed. Decent quality but more robotic than the others. Good for drafts or budget runs.
|
||||
|
||||
If the user picks ElevenLabs or HeyGen and doesn't have a key set up yet, help them:
|
||||
If the user picks ElevenLabs or HeyGen and doesn't have a key set up yet, help them configure credentials outside the conversation. Do **not** ask the user to paste API keys or bearer tokens into chat.
|
||||
|
||||
- **ElevenLabs:** "Add `ELEVENLABS_API_KEY=your-key` to a `.env` file in the project root, or just paste it here and I'll set it up."
|
||||
- **HeyGen:** "Add `HEYGEN_API_KEY=your-key` to a `.env` file, or paste it here."
|
||||
- **ElevenLabs:** Ask the user to set `ELEVENLABS_API_KEY` in their shell or in a local project `.env` file that they create.
|
||||
- **HeyGen:** Prefer `npx hyperframes auth login`. If they need an account API key instead, ask them to set `HEYGEN_API_KEY` in their shell or in a local project `.env` file that they create.
|
||||
|
||||
Don't judge or critique if the user pastes a key directly in chat — just use it and move on.
|
||||
After setup, verify with a command that reports status without printing the secret value.
|
||||
|
||||
## Audition voices
|
||||
|
||||
@@ -71,8 +71,7 @@ After the provider is selected, audition at least 2 voices with the first senten
|
||||
|
||||
**ElevenLabs:**
|
||||
|
||||
- If the ElevenLabs MCP is available: use `mcp__elevenlabs__search_voices` to browse, `mcp__elevenlabs__text_to_speech` to generate.
|
||||
- If no MCP: call the REST API directly:
|
||||
- With `ELEVENLABS_API_KEY` configured, call the REST API directly:
|
||||
|
||||
```bash
|
||||
# List voices
|
||||
@@ -91,8 +90,7 @@ After the provider is selected, audition at least 2 voices with the first senten
|
||||
|
||||
**HeyGen TTS:**
|
||||
|
||||
- If the HeyGen MCP is available: use the TTS tool directly.
|
||||
- If no MCP: use the v3 API (current; v1/v2 deprecated, supported until Oct 2026). **Auth depends on credential type:** the `x-api-key` header below works only with an **account API key** (`HEYGEN_API_KEY`). If you authenticated via **OAuth** (e.g. claude.ai / the HeyGen MCP login), `x-api-key` will 401 — send `Authorization: Bearer $HEYGEN_OAUTH_TOKEN` instead, or just use the MCP TTS tool above.
|
||||
- With `HEYGEN_API_KEY` configured, use the v3 API (current; v1/v2 deprecated, supported until Oct 2026). The `x-api-key` header below works only with an **account API key**. For browser OAuth from `npx hyperframes auth login`, prefer the HyperFrames media scripts or `npx hyperframes auth status` instead of manually handling bearer tokens.
|
||||
|
||||
```bash
|
||||
# List voices — response shape: { "data": [...], "has_more": bool }
|
||||
@@ -126,7 +124,7 @@ After the provider is selected, audition at least 2 voices with the first senten
|
||||
npx hyperframes tts SCRIPT.md --voice af_nova --output narration.wav
|
||||
```
|
||||
|
||||
No API key, no MCP needed. Runs locally. Use `--list` to see all 54 available voices.
|
||||
No API key needed. Runs locally. Use `--list` to see all 54 available voices.
|
||||
|
||||
Pick the voice that sounds most natural and conversational. Listen for pacing — does it breathe between sentences? Does it sound like a person or a robot?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user