hyperframes 0.2.0 → 0.2.2-alpha.1

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.
@@ -1,11 +1,25 @@
1
1
  ---
2
2
  name: hyperframes-captions
3
- description: Build tone-adaptive captions from whisper transcripts. Detects script energy (hype, corporate, tutorial, storytelling, social) and applies matching typography, color, and animation. Supports per-word styling for brand names, ALL CAPS, numbers, and CTAs. Use when adding captions, subtitles, or lyrics to a HyperFrames composition. Lyric videos ARE captions — any text synced to audio uses this skill.
4
- trigger: Use this skill whenever a task involves syncing text to audio timing. This includes captions, subtitles, lyrics, karaoke, transcription overlays, and any word-level or phrase-level text timed to speech or music.
3
+ description: Captions, subtitles, lyrics, and karaoke synced to audio in HyperFrames. Tone-adaptive detects script energy and applies matching typography, color, and animation with per-word styling.
4
+ trigger: Syncing text to audio timing captions, subtitles, lyrics, karaoke, transcription overlays, word-level or phrase-level text timed to speech or music.
5
5
  ---
6
6
 
7
7
  # Captions
8
8
 
9
+ ## Language Rule (Non-Negotiable)
10
+
11
+ **Never use `.en` models unless the user explicitly states the audio is English.** `.en` models (small.en, medium.en) TRANSLATE non-English audio into English instead of transcribing it. This silently destroys the original language.
12
+
13
+ When transcribing:
14
+
15
+ 1. If the user says the language → use `--model small --language <code>` (no `.en` suffix)
16
+ 2. If the user says it's English → use `--model small.en`
17
+ 3. If the language is unknown → use `--model small` (no `.en`, no `--language`) — whisper auto-detects
18
+
19
+ **Default model is `small` (not `small.en`).** Only add `.en` when explicitly told the audio is English.
20
+
21
+ ---
22
+
9
23
  Analyze the spoken content to determine caption style. If the user specifies a style, use that. Otherwise, detect tone from the transcript.
10
24
 
11
25
  ## Transcript Source
@@ -25,98 +39,7 @@ This is the only format the captions composition consumes. Use it directly:
25
39
  const words = JSON.parse(transcriptJson); // [{ text, start, end }]
26
40
  ```
27
41
 
28
- ### How transcripts are generated
29
-
30
- `hyperframes transcribe` handles both transcription and format conversion:
31
-
32
- ```bash
33
- # Transcribe audio/video (uses whisper.cpp locally, no API key needed)
34
- npx hyperframes transcribe audio.mp3
35
-
36
- # Use a larger model for better accuracy
37
- npx hyperframes transcribe audio.mp3 --model medium.en
38
-
39
- # Filter to English only (skips non-English speech)
40
- npx hyperframes transcribe audio.mp3 --language en
41
-
42
- # Import an existing transcript from another tool
43
- npx hyperframes transcribe captions.srt
44
- npx hyperframes transcribe captions.vtt
45
- npx hyperframes transcribe openai-response.json
46
- ```
47
-
48
- ### Supported input formats
49
-
50
- The CLI auto-detects and normalizes these formats:
51
-
52
- | Format | Extension | Source | Word-level? |
53
- | --------------------- | --------- | --------------------------------------------------------------------------- | ----------------- |
54
- | whisper.cpp JSON | `.json` | `hyperframes init --video`, `hyperframes transcribe` | Yes |
55
- | OpenAI Whisper API | `.json` | `openai.audio.transcriptions.create({ timestamp_granularities: ["word"] })` | Yes |
56
- | SRT subtitles | `.srt` | Video editors, subtitle tools, YouTube | No (phrase-level) |
57
- | VTT subtitles | `.vtt` | Web players, YouTube, transcription services | No (phrase-level) |
58
- | Normalized word array | `.json` | Pre-processed by any tool | Yes |
59
-
60
- **Word-level timestamps produce better captions.** SRT/VTT give phrase-level timing, which works but can't do per-word animation effects.
61
-
62
- ### Whisper model guide
63
-
64
- The default model (`small.en`) balances accuracy and speed. For better results, use a larger model:
65
-
66
- | Model | Size | Speed | Accuracy | When to use |
67
- | ----------- | ------ | -------- | --------- | ------------------------------------- |
68
- | `tiny.en` | 75 MB | Fastest | Low | Quick previews, testing pipeline |
69
- | `base.en` | 142 MB | Fast | Fair | Short clips, clear audio |
70
- | `small.en` | 466 MB | Moderate | Good | **Default** — good for most content |
71
- | `medium.en` | 1.5 GB | Slow | Very good | Important content, noisy audio, music |
72
- | `large-v3` | 3.1 GB | Slowest | Best | Multilingual, production captions |
73
-
74
- `.en` models are English-only and more accurate for English. Drop the `.en` suffix for multilingual (e.g., `medium` instead of `medium.en`).
75
-
76
- **Music and vocals over instrumentation**: `small.en` will misidentify lyrics — use `medium.en` as the minimum, or import lyrics manually. Even `medium.en` struggles with heavily produced tracks; for music videos, providing known lyrics as an SRT/VTT and importing with `hyperframes transcribe lyrics.srt` will always beat automated transcription.
77
-
78
- ### Using external transcription APIs
79
-
80
- For the best accuracy, use an external API and import the result:
81
-
82
- **OpenAI Whisper API** (recommended for quality):
83
-
84
- ```bash
85
- # Generate with word timestamps, then import
86
- curl https://api.openai.com/v1/audio/transcriptions \
87
- -H "Authorization: Bearer $OPENAI_API_KEY" \
88
- -F file=@audio.mp3 -F model=whisper-1 \
89
- -F response_format=verbose_json \
90
- -F "timestamp_granularities[]=word" \
91
- -o transcript-openai.json
92
-
93
- npx hyperframes transcribe transcript-openai.json
94
- ```
95
-
96
- **Groq Whisper API** (fast, free tier available):
97
-
98
- ```bash
99
- curl https://api.groq.com/openai/v1/audio/transcriptions \
100
- -H "Authorization: Bearer $GROQ_API_KEY" \
101
- -F file=@audio.mp3 -F model=whisper-large-v3 \
102
- -F response_format=verbose_json \
103
- -F "timestamp_granularities[]=word" \
104
- -o transcript-groq.json
105
-
106
- npx hyperframes transcribe transcript-groq.json
107
- ```
108
-
109
- ### If no transcript exists
110
-
111
- 1. Check the project root for `transcript.json`, `.srt`, or `.vtt` files
112
- 2. If none found, ask the user to provide one or run:
113
- ```bash
114
- npx hyperframes transcribe <audio-or-video-file>
115
- ```
116
- 3. If transcription quality is poor (words at wrong times, gibberish), suggest upgrading the model:
117
- ```bash
118
- npx hyperframes transcribe audio.mp3 --model medium.en
119
- ```
42
+ For transcription commands, whisper model selection, external APIs (OpenAI, Groq), and supported input formats, see [transcript-guide.md](./transcript-guide.md).
120
43
 
121
44
  ## Style Detection (Default — When No Style Is Specified)
122
45
 
@@ -174,6 +97,7 @@ For each detected word, specify:
174
97
  - Color override (specific hex value)
175
98
  - Weight/style change (bolder, italic)
176
99
  - Animation variant (overshoot entrance, glow pulse, scale pop)
100
+ - **Marker highlight mode** — for visual emphasis beyond color/scale, add a marker-style effect: highlight sweep behind the word, hand-drawn circle around it, burst lines radiating from it, or scribble underline beneath it. See the `/marker-highlight` skill for patterns and the energy-to-mode mapping table.
177
101
 
178
102
  ## Script-to-Style Mapping
179
103
 
@@ -207,28 +131,19 @@ Break groups on sentence boundaries (period, question mark, exclamation), pauses
207
131
 
208
132
  Use `window.__hyperframes.fitTextFontSize()` to measure actual rendered text width and compute the correct font size. This replaces character-count heuristics with pixel-accurate measurement powered by [pretext](https://github.com/chenglou/pretext).
209
133
 
210
- **Usage in composition scripts:**
211
-
212
134
  ```js
213
135
  GROUPS.forEach(function (group, gi) {
214
- // Measure with text-transform applied (captions typically uppercase)
215
136
  var result = window.__hyperframes.fitTextFontSize(group.text.toUpperCase(), {
216
137
  fontFamily: "Outfit",
217
138
  fontWeight: 900,
218
139
  maxWidth: 1600,
219
140
  });
220
-
221
- // Apply computed font size to all word spans
222
141
  wordEls.forEach(function (el) {
223
142
  el.style.fontSize = result.fontSize + "px";
224
143
  });
225
-
226
- // If result.fits is false, text exceeds minFontSize — overflow: hidden catches it
227
144
  });
228
145
  ```
229
146
 
230
- **Options:**
231
-
232
147
  | Option | Default | Description |
233
148
  | -------------- | ---------- | ---------------------------------------------------- |
234
149
  | `maxWidth` | `1600` | Container width in px (1600 landscape, 900 portrait) |
@@ -238,7 +153,7 @@ GROUPS.forEach(function (group, gi) {
238
153
  | `fontFamily` | `"Outfit"` | Must match the CSS font-family |
239
154
  | `step` | `2` | Decrement step in px per iteration |
240
155
 
241
- **Important:** The `fontWeight` and `fontFamily` options must match the CSS applied to the text elements exactly, or measurements will be inaccurate.
156
+ `fontWeight` and `fontFamily` must match the CSS applied to the text elements exactly, or measurements will be inaccurate.
242
157
 
243
158
  **Safety nets (still required in CSS):**
244
159
 
@@ -251,8 +166,6 @@ GROUPS.forEach(function (group, gi) {
251
166
 
252
167
  Captions that stick on screen are the most common caption bug. Every caption group **must** have a hard kill after its exit animation.
253
168
 
254
- **The pattern:**
255
-
256
169
  ```js
257
170
  // Animate exit (soft — can fail if tweens conflict)
258
171
  tl.to(groupEl, { opacity: 0, scale: 0.95, duration: 0.12, ease: "power2.in" }, group.end - 0.12);
@@ -261,18 +174,11 @@ tl.to(groupEl, { opacity: 0, scale: 0.95, duration: 0.12, ease: "power2.in" }, g
261
174
  tl.set(groupEl, { opacity: 0, visibility: "hidden" }, group.end);
262
175
  ```
263
176
 
264
- **Why both?** The `tl.to` exit can fail to fully hide a group when:
265
-
266
- - Karaoke word-level tweens (`scale`, `color`) on child elements conflict with the parent exit tween
267
- - `fromTo` entrance tweens lock start/end values that override later tweens on the same property
268
- - Timeline scrubbing lands between the exit start and end
177
+ **Why both?** The `tl.to` exit can fail to fully hide a group when karaoke word-level tweens conflict with the parent exit tween, `fromTo` entrance tweens lock values that override later tweens, or timeline scrubbing lands between the exit start and end. The `tl.set` at `group.end` is a deterministic kill — it fires at an exact time, doesn't animate, and can't be overridden.
269
178
 
270
- The `tl.set` at `group.end` is a deterministic kill — it fires at an exact time, doesn't animate, and can't be overridden by other tweens at different times.
271
-
272
- **Self-lint rule:** After building the timeline, verify every caption group has a hard kill. Run this check before registering the timeline:
179
+ **Self-lint rule:** After building the timeline, verify every caption group has a hard kill:
273
180
 
274
181
  ```js
275
- // Caption lint: verify every group has a hard kill
276
182
  GROUPS.forEach(function (group, gi) {
277
183
  var el = document.getElementById("cg-" + gi);
278
184
  if (!el) return;
@@ -280,20 +186,22 @@ GROUPS.forEach(function (group, gi) {
280
186
  var computed = window.getComputedStyle(el);
281
187
  if (computed.opacity !== "0" && computed.visibility !== "hidden") {
282
188
  console.warn(
283
- "[caption-lint] group " +
284
- gi +
285
- " ('" +
286
- group.text +
287
- "') still visible at t=" +
288
- (group.end + 0.01).toFixed(2) +
289
- "s",
189
+ "[caption-lint] group " + gi + " still visible at t=" + (group.end + 0.01).toFixed(2) + "s",
290
190
  );
291
191
  }
292
192
  });
293
- tl.seek(0); // reset after lint
193
+ tl.seek(0);
294
194
  ```
295
195
 
296
- Place this **before** `window.__timelines[id] = tl` so it runs at composition init. Warnings appear in the browser console during `hyperframes preview`.
196
+ Place this **before** `window.__timelines[id] = tl` so it runs at composition init.
197
+
198
+ ## References
199
+
200
+ For dynamic animation techniques (karaoke, clip-path reveals, slam words, scatter exits, elastic entrances, 3D rotation, audio-reactive captions, pretext-based positioning and grouping), see [dynamic-techniques.md](./dynamic-techniques.md).
201
+
202
+ For animated text emphasis (highlight sweeps, hand-drawn circles, burst lines, scribble underlines, sketchout effects) that pairs with per-word styling, see the `/marker-highlight` skill.
203
+
204
+ For transcription commands, whisper models, external APIs, and troubleshooting, see [transcript-guide.md](./transcript-guide.md).
297
205
 
298
206
  ## Constraints
299
207
 
@@ -0,0 +1,90 @@
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, or scribble — using the `/marker-highlight` skill. 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/gsap-effects/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** (from the `/marker-highlight` skill) 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 (see the mode-to-energy mapping in the marker-highlight skill).
80
+
81
+ ## Available Tools
82
+
83
+ These tools are available in the HyperFrames runtime. Use them when they solve a real problem — not every composition needs all of them.
84
+
85
+ | Tool | What it does | Access | When it's useful |
86
+ | ------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
87
+ | **pretext** | Pure-arithmetic text measurement without DOM reflow. 0.0002ms per call. | `window.__hyperframes.pretext.prepare(text, font)` / `.layout(prepared, maxWidth, lineHeight)` | Per-frame text reflow, shrinkwrap containers, computing layout before render |
88
+ | **fitTextFontSize** | Finds the largest font size that fits text on one line. Built on pretext. | `window.__hyperframes.fitTextFontSize(text, { maxWidth, fontFamily, fontWeight })` | Overflow prevention for long phrases, portrait mode, large base sizes |
89
+ | **audio data** | Pre-extracted per-frame RMS energy and frequency bands. | Extract with `extract-audio-data.py`, load inline or via `fetch("audio-data.json")` | Audio-reactive visuals — modulate intensity based on the music |
90
+ | **GSAP** | Animation timeline with tweens and callbacks. | `gsap.to()`, `gsap.set()`, `tl.to()`, `tl.set()` | All caption animation |
@@ -0,0 +1,151 @@
1
+ # Transcript Guide
2
+
3
+ ## How Transcripts Are Generated
4
+
5
+ `hyperframes transcribe` handles both transcription and format conversion:
6
+
7
+ ```bash
8
+ # Transcribe audio/video (uses whisper.cpp locally, no API key needed)
9
+ npx hyperframes transcribe audio.mp3
10
+
11
+ # Use a larger model for better accuracy
12
+ npx hyperframes transcribe audio.mp3 --model medium.en
13
+
14
+ # Filter to English only (skips non-English speech)
15
+ npx hyperframes transcribe audio.mp3 --language en
16
+
17
+ # Import an existing transcript from another tool
18
+ npx hyperframes transcribe captions.srt
19
+ npx hyperframes transcribe captions.vtt
20
+ npx hyperframes transcribe openai-response.json
21
+ ```
22
+
23
+ ## Supported Input Formats
24
+
25
+ The CLI auto-detects and normalizes these formats:
26
+
27
+ | Format | Extension | Source | Word-level? |
28
+ | --------------------- | --------- | --------------------------------------------------------------------------- | ----------------- |
29
+ | whisper.cpp JSON | `.json` | `hyperframes init --video`, `hyperframes transcribe` | Yes |
30
+ | OpenAI Whisper API | `.json` | `openai.audio.transcriptions.create({ timestamp_granularities: ["word"] })` | Yes |
31
+ | SRT subtitles | `.srt` | Video editors, subtitle tools, YouTube | No (phrase-level) |
32
+ | VTT subtitles | `.vtt` | Web players, YouTube, transcription services | No (phrase-level) |
33
+ | Normalized word array | `.json` | Pre-processed by any tool | Yes |
34
+
35
+ **Word-level timestamps produce better captions.** SRT/VTT give phrase-level timing, which works but can't do per-word animation effects.
36
+
37
+ ## Whisper Model Guide
38
+
39
+ The default model (`small.en`) balances accuracy and speed. For better results, use a larger model:
40
+
41
+ | Model | Size | Speed | Accuracy | When to use |
42
+ | ---------- | ------ | -------- | --------- | ------------------------------------- |
43
+ | `tiny` | 75 MB | Fastest | Low | Quick previews, testing pipeline |
44
+ | `base` | 142 MB | Fast | Fair | Short clips, clear audio |
45
+ | `small` | 466 MB | Moderate | Good | **Default** — good for most content |
46
+ | `medium` | 1.5 GB | Slow | Very good | Important content, noisy audio, music |
47
+ | `large-v3` | 3.1 GB | Slowest | Best | Production quality |
48
+
49
+ **Only add `.en` suffix when the user explicitly says the audio is English.** `.en` models are slightly more accurate for English but will TRANSLATE non-English audio instead of transcribing it.
50
+
51
+ **Critical: `.en` models translate non-English audio into English** — they don't transcribe it. If the audio might not be English, always use a model without the `.en` suffix and pass `--language` to specify the source language. If you're unsure of the language, use `small` (not `small.en`) without `--language` — whisper will auto-detect.
52
+
53
+ ```bash
54
+ # Spanish audio
55
+ npx hyperframes transcribe audio.mp3 --model small --language es
56
+
57
+ # Unknown language — let whisper auto-detect
58
+ npx hyperframes transcribe audio.mp3 --model small
59
+ ```
60
+
61
+ **Music and vocals over instrumentation**: `small.en` will misidentify lyrics — use `medium.en` as the minimum, or import lyrics manually. Even `medium.en` struggles with heavily produced tracks; for music videos, providing known lyrics as an SRT/VTT and importing with `hyperframes transcribe lyrics.srt` will always beat automated transcription.
62
+
63
+ ## Transcript Quality Check (Mandatory)
64
+
65
+ After every transcription, **read the transcript and check for quality issues before proceeding.** Bad transcripts produce nonsensical captions. Never skip this step.
66
+
67
+ ### What to look for
68
+
69
+ | Signal | Example | Cause |
70
+ | ---------------------------- | -------------------------------------- | ---------------------------------------------------------------------------- |
71
+ | Music note tokens (`♪`, `�`) | `{ "text": "♪" }` or `{ "text": "�" }` | Whisper detected music, not speech |
72
+ | Garbled / nonsense words | "Do a chin", "Get so gay", "huh" | Model misheard lyrics or background noise |
73
+ | Long gaps with no words | 20+ seconds of only `♪` tokens | Instrumental section — expected, but high ratio means speech is being missed |
74
+ | Repeated filler | Many "huh", "uh", "oh" entries | Model is hallucinating on music |
75
+ | Very short word spans | Words with `end - start < 0.05` | Unreliable timestamp alignment |
76
+
77
+ ### Automatic retry rules
78
+
79
+ **If more than 20% of entries are `♪`/`�` tokens, or the transcript contains obvious nonsense words, the transcription failed.** Do not proceed with the bad transcript. Instead:
80
+
81
+ 1. **Retry with `medium.en`** if the original used `small.en` or smaller:
82
+ ```bash
83
+ npx hyperframes transcribe audio.mp3 --model medium.en
84
+ ```
85
+ 2. **If `medium.en` also fails** (still >20% music tokens or garbled), tell the user the audio is too noisy for local transcription and suggest:
86
+ - Providing lyrics manually as an SRT/VTT file
87
+ - Using an external API (OpenAI or Groq Whisper — see below)
88
+ 3. **Always clean the transcript** before building captions — filter out `♪`/`�` tokens and entries where `text` is a single non-word character. Only real words should reach the caption composition.
89
+
90
+ ### Cleaning a transcript
91
+
92
+ After transcription (even with a good model), strip non-word entries:
93
+
94
+ ```js
95
+ var raw = JSON.parse(transcriptJson);
96
+ var words = raw.filter(function (w) {
97
+ if (!w.text || w.text.trim().length === 0) return false;
98
+ if (/^[♪�\u266a\u266b\u266c\u266d\u266e\u266f]+$/.test(w.text)) return false;
99
+ if (/^(huh|uh|um|ah|oh)$/i.test(w.text) && w.end - w.start < 0.1) return false;
100
+ return true;
101
+ });
102
+ ```
103
+
104
+ ### When to use which model (decision tree)
105
+
106
+ 1. **Is this speech over silence/light background?** → `small.en` is fine
107
+ 2. **Is this speech over music, or music with vocals?** → Start with `medium.en`
108
+ 3. **Is this a produced music track (vocals + full instrumentation)?** → Start with `medium.en`, expect to need manual lyrics or an external API
109
+ 4. **Is this multilingual?** → Use `medium` or `large-v3` (no `.en` suffix)
110
+
111
+ ## Using External Transcription APIs
112
+
113
+ For the best accuracy, use an external API and import the result:
114
+
115
+ **OpenAI Whisper API** (recommended for quality):
116
+
117
+ ```bash
118
+ # Generate with word timestamps, then import
119
+ curl https://api.openai.com/v1/audio/transcriptions \
120
+ -H "Authorization: Bearer $OPENAI_API_KEY" \
121
+ -F file=@audio.mp3 -F model=whisper-1 \
122
+ -F response_format=verbose_json \
123
+ -F "timestamp_granularities[]=word" \
124
+ -o transcript-openai.json
125
+
126
+ npx hyperframes transcribe transcript-openai.json
127
+ ```
128
+
129
+ **Groq Whisper API** (fast, free tier available):
130
+
131
+ ```bash
132
+ curl https://api.groq.com/openai/v1/audio/transcriptions \
133
+ -H "Authorization: Bearer $GROQ_API_KEY" \
134
+ -F file=@audio.mp3 -F model=whisper-large-v3 \
135
+ -F response_format=verbose_json \
136
+ -F "timestamp_granularities[]=word" \
137
+ -o transcript-groq.json
138
+
139
+ npx hyperframes transcribe transcript-groq.json
140
+ ```
141
+
142
+ ## If No Transcript Exists
143
+
144
+ 1. Check the project root for `transcript.json`, `.srt`, or `.vtt` files
145
+ 2. If none found, run transcription — pick the starting model based on the content type:
146
+ - Speech/voiceover → `small.en`
147
+ - Music with vocals → `medium.en`
148
+ ```bash
149
+ npx hyperframes transcribe <audio-or-video-file> --model medium.en
150
+ ```
151
+ 3. **Read the transcript and run the quality check** (see above). If it fails, retry with a larger model or suggest manual lyrics.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: hyperframes-compose
3
- description: Create HyperFrames HTML video compositions. Use when asked to create a video, build an animation, make a composition, add a title card, or generate any HTML-based video content for HyperFrames.
3
+ description: Create video compositions, animations, title cards, or overlays in HyperFrames HTML. Use when asked to build any HTML-based video content.
4
4
  ---
5
5
 
6
6
  # Compose Video
@@ -140,6 +140,7 @@ Video must be `muted playsinline`. Audio is always a separate `<audio>` element:
140
140
  For PiP, title cards, and slide show patterns, see [patterns.md](./patterns.md).
141
141
  For data, stats, and infographics, see [data-in-motion.md](./data-in-motion.md).
142
142
  For typewriter text and other GSAP animation effects, see the `gsap-effects` skill.
143
+ For audio-driven animation (beat sync, glow, pulse), see the `audio-reactive` skill.
143
144
 
144
145
  ## Output Checklist
145
146
 
@@ -150,3 +151,5 @@ For typewriter text and other GSAP animation effects, see the `gsap-effects` ski
150
151
  - [ ] `window.__timelines` registered for every composition
151
152
  - [ ] 100% deterministic — no randomness
152
153
  - [ ] Each composition includes GSAP: `<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>`
154
+ - [ ] `npx hyperframes lint` passes with 0 errors
155
+ - [ ] `npx hyperframes validate` passes with 0 errors (run both before opening the studio)
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: hyperframes-tts
3
+ description: Generate speech audio locally using Kokoro-82M (no API key). Use when asked to create narration, voiceover, or text-to-speech audio for compositions, or when a user needs spoken audio from text. Covers voice selection, speed tuning, and integrating TTS output with compositions and captions.
4
+ ---
5
+
6
+ # Text-to-Speech
7
+
8
+ ## Voice Selection
9
+
10
+ Match voice to content. Default is `af_heart`.
11
+
12
+ | Content type | Voice | Why |
13
+ | ----------------- | --------------------- | ----------------------------- |
14
+ | Product demo | `af_heart`/`af_nova` | Warm, professional |
15
+ | Tutorial / how-to | `am_adam`/`bf_emma` | Neutral, easy to follow |
16
+ | Marketing / promo | `af_sky`/`am_michael` | Energetic or authoritative |
17
+ | Documentation | `bf_emma`/`bm_george` | Clear British English, formal |
18
+ | Casual / social | `af_heart`/`af_sky` | Approachable, natural |
19
+
20
+ Run `npx hyperframes tts --list` for all 54 voices (8 languages: EN, JP, ZH, KO, FR, DE, IT, PT).
21
+
22
+ ## Speed Tuning
23
+
24
+ - **0.7-0.8** — Tutorial, complex content, accessibility
25
+ - **1.0** — Natural pace (default)
26
+ - **1.1-1.2** — Intros, transitions, upbeat content
27
+ - **1.5+** — Rarely appropriate; test carefully
28
+
29
+ ## Composing with TTS Audio
30
+
31
+ Generate a voiceover and use it as the audio track:
32
+
33
+ ```bash
34
+ npx hyperframes tts "Your script here" --voice af_nova --output narration.wav
35
+ ```
36
+
37
+ Then reference it in the composition as a standard `<audio>` element:
38
+
39
+ ```html
40
+ <audio
41
+ id="narration"
42
+ data-start="0"
43
+ data-duration="auto"
44
+ data-track-index="2"
45
+ src="narration.wav"
46
+ data-volume="1"
47
+ ></audio>
48
+ ```
49
+
50
+ ## TTS + Captions Workflow
51
+
52
+ Generate speech, then transcribe it back for word-level caption timestamps:
53
+
54
+ ```bash
55
+ # 1. Generate speech
56
+ npx hyperframes tts script.txt --voice af_heart --output narration.wav
57
+
58
+ # 2. Transcribe for word-level timestamps
59
+ npx hyperframes transcribe narration.wav
60
+
61
+ # 3. Result: narration.wav + transcript.json ready for captions
62
+ ```
63
+
64
+ This avoids manually timing captions — whisper extracts precise word boundaries from the generated audio.
65
+
66
+ ## Long Scripts
67
+
68
+ For scripts longer than a few paragraphs, write the text to a `.txt` file and pass the path:
69
+
70
+ ```bash
71
+ npx hyperframes tts script.txt --voice bf_emma --output narration.wav
72
+ ```
73
+
74
+ The model handles long text well but very long inputs (>5 minutes of speech) may benefit from splitting into segments.
75
+
76
+ ## Requirements
77
+
78
+ - Python 3.8+ with `kokoro-onnx` and `soundfile` installed (`pip install kokoro-onnx soundfile`)
79
+ - Model downloads automatically on first use (~311 MB + ~27 MB voices, cached in `~/.cache/hyperframes/tts/`)
@@ -0,0 +1 @@
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.bottom-2{bottom:.5rem}.bottom-6{bottom:1.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.right-3{right:.75rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.z-\[200\]{z-index:200}.z-\[2\]{z-index:2}.z-\[90\]{z-index:90}.z-\[91\]{z-index:91}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-1\.5{margin-left:.375rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1080px\]{height:1080px}.h-\[3px\]{height:3px}.h-\[45px\]{height:45px}.h-\[5px\]{height:5px}.h-full{height:100%}.h-screen{height:100vh}.max-h-24{max-height:6rem}.max-h-\[70\%\]{max-height:70%}.max-h-\[80vh\]{max-height:80vh}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-7{min-height:1.75rem}.min-h-8{min-height:2rem}.min-h-9{min-height:2.25rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[160px\]{width:160px}.w-\[1920px\]{width:1920px}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-7{min-width:1.75rem}.min-w-8{min-width:2rem}.min-w-9{min-width:2.25rem}.min-w-\[140px\]{min-width:140px}.min-w-\[160px\]{min-width:160px}.min-w-\[56px\]{min-width:56px}.min-w-\[72px\]{min-width:72px}.max-w-\[280px\]{max-width:280px}.max-w-full{max-width:100%}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-crosshair{cursor:crosshair}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-\[4px\]{border-radius:4px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-green-500\/30{border-color:#22c55e4d}.border-neutral-600{--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity, 1))}.border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity, 1))}.border-neutral-700\/20{border-color:#40404033}.border-neutral-700\/40{border-color:#40404066}.border-neutral-700\/50{border-color:#40404080}.border-neutral-700\/60{border-color:#40404099}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-neutral-800\/30{border-color:#2626264d}.border-neutral-800\/40{border-color:#26262666}.border-neutral-800\/50{border-color:#26262680}.border-neutral-800\/60{border-color:#26262699}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-700\/50{border-color:#b91c1c80}.border-studio-accent{--tw-border-opacity: 1;border-color:rgb(60 230 172 / var(--tw-border-opacity, 1))}.border-studio-accent\/25{border-color:#3ce6ac40}.border-studio-accent\/30{border-color:#3ce6ac4d}.border-studio-accent\/50{border-color:#3ce6ac80}.border-studio-accent\/60{border-color:#3ce6ac99}.border-transparent{border-color:transparent}.bg-\[\#0a0a0b\]{--tw-bg-opacity: 1;background-color:rgb(10 10 11 / var(--tw-bg-opacity, 1))}.bg-\[\#3CE6AC\]\/10{background-color:#3ce6ac1a}.bg-\[\#3CE6AC\]\/5{background-color:#3ce6ac0d}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-green-500\/20{background-color:#22c55e33}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-neutral-600{--tw-bg-opacity: 1;background-color:rgb(82 82 82 / var(--tw-bg-opacity, 1))}.bg-neutral-600\/60{background-color:#52525299}.bg-neutral-700{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}.bg-neutral-700\/40{background-color:#40404066}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.bg-neutral-800\/50{background-color:#26262680}.bg-neutral-800\/60{background-color:#26262699}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity, 1))}.bg-neutral-900\/50{background-color:#17171780}.bg-neutral-950{--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity, 1))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-red-900\/60{background-color:#7f1d1d99}.bg-red-900\/90{background-color:#7f1d1de6}.bg-red-950\/30{background-color:#450a0a4d}.bg-studio-accent{--tw-bg-opacity: 1;background-color:rgb(60 230 172 / var(--tw-bg-opacity, 1))}.bg-studio-accent\/10{background-color:#3ce6ac1a}.bg-studio-accent\/15{background-color:#3ce6ac26}.bg-studio-accent\/20{background-color:#3ce6ac33}.bg-studio-accent\/\[0\.03\]{background-color:#3ce6ac08}.bg-studio-accent\/\[0\.05\]{background-color:#3ce6ac0d}.bg-studio-accent\/\[0\.06\]{background-color:#3ce6ac0f}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0\.5{padding-bottom:.125rem}.pb-3{padding-bottom:.75rem}.pr-1\.5{padding-right:.375rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-wider{letter-spacing:.05em}.text-\[\#09090B\]{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-neutral-100{--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}.text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity, 1))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.text-neutral-700{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.text-neutral-950{--tw-text-opacity: 1;color:rgb(10 10 10 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-200{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-studio-accent{--tw-text-opacity: 1;color:rgb(60 230 172 / var(--tw-text-opacity, 1))}.text-studio-accent\/50{color:#3ce6ac80}.text-studio-accent\/60{color:#3ce6ac99}.text-studio-accent\/80{color:#3ce6accc}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.accent-studio-accent{accent-color:#3CE6AC}.opacity-25{opacity:.25}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/40{--tw-shadow-color: rgb(0 0 0 / .4);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-1{outline-width:1px}.-outline-offset-1{outline-offset:-1px}.outline-\[\#3CE6AC\]\/30{outline-color:#3ce6ac4d}.outline-\[\#3CE6AC\]\/40{outline-color:#3ce6ac66}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-studio-accent{--tw-ring-opacity: 1;--tw-ring-color: rgb(60 230 172 / var(--tw-ring-opacity, 1))}.ring-white\/50{--tw-ring-color: rgb(255 255 255 / .5)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}body{margin:0;padding:0;background:#0a0a0a;color:#e5e5e5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;overflow:hidden}#root{width:100vw;height:100vh}.cm-editor{height:100%;font-size:13px}.cm-editor .cm-scroller{font-family:JetBrains Mono,Fira Code,SF Mono,monospace}.cm-editor.cm-focused{outline:none}.placeholder\:text-neutral-600::-moz-placeholder{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.placeholder\:text-neutral-600::placeholder{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.last\:border-0:last-child{border-width:0px}.hover\:border-neutral-600:hover{--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity, 1))}.hover\:border-studio-accent\/50:hover{border-color:#3ce6ac80}.hover\:bg-neutral-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-600:hover{--tw-bg-opacity: 1;background-color:rgb(82 82 82 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.hover\:bg-neutral-800\/30:hover{background-color:#2626264d}.hover\:bg-neutral-800\/50:hover{background-color:#26262680}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.hover\:bg-red-800\/60:hover{background-color:#991b1b99}.hover\:bg-red-900\/30:hover{background-color:#7f1d1d4d}.hover\:bg-studio-accent:hover{--tw-bg-opacity: 1;background-color:rgb(60 230 172 / var(--tw-bg-opacity, 1))}.hover\:bg-studio-accent\/25:hover{background-color:#3ce6ac40}.hover\:bg-studio-accent\/80:hover{background-color:#3ce6accc}.hover\:text-amber-300:hover{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.hover\:text-green-400:hover{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.hover\:text-neutral-200:hover{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity, 1))}.hover\:text-neutral-300:hover{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.hover\:text-neutral-400:hover{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-studio-accent:hover{--tw-text-opacity: 1;color:rgb(60 230 172 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:ring-1:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-white\/30:hover{--tw-ring-color: rgb(255 255 255 / .3)}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-\[\#3CE6AC\]:focus{--tw-border-opacity: 1;border-color:rgb(60 230 172 / var(--tw-border-opacity, 1))}.focus\:border-neutral-600:focus{--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity, 1))}.focus\:border-studio-accent:focus{--tw-border-opacity: 1;border-color:rgb(60 230 172 / var(--tw-border-opacity, 1))}.focus\:border-studio-accent\/40:focus{border-color:#3ce6ac66}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.active\:scale-\[0\.97\]:active{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-\[0\.98\]:active{--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:bg-studio-accent\/80:active{background-color:#3ce6accc}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:scale-125{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}