asr-keyword-glow — Claude Code rule for word-level speech highlighting
asr-keyword-glow — a rule that makes words light up and scale up as they get "spoken", driven by per-word timestamps. For promo clips and narrated videos where you need to pace the emphasis.
AGPL-3.0 ★ 78,316 updated 2026-10-24
.claude/rules/asr-keyword-glow.mdWhat asr-keyword-glow does
Each word carries start and end timestamps. Every frame computes an attack–sustain–release envelope: zero before start, a linear ramp to peak, hold at one, then decay to a rest level of 0.25 with a faint lingering glow. The envelope feeds both the textShadow blur radius and the word scale, so a stronger blur and bigger scale mean a louder visual accent.
The rule lays out the HTML with one span per word, CSS for the scene and phrase, and a GSAP timeline with a single driver object spanning the whole scene duration. The brand word gets a .brand class, wider letter spacing, and a longer emphasis window.
Variations include a sine pulse during sustain, a color lerp at the peak, a karaoke mode that dims inactive words, and a 3D pop-out via translateZ. The rule recommends karaoke for short 5–10 word phrases because the subtle default reads too faint on video. You need GSAP 3.14.2 from a CDN or the timeline will not build.
What it helps with
- highlight a word exactly when the voiceover hits it
- pace emphasis in a promo clip without real audio
- keep a breadcrumb of recently spoken words via rest glow
- build karaoke-style highlighting for a short phrase
Example prompts for the agent
- Build a scene with the asr-keyword-glow rule: six words, brand word last
- Highlight the words in this HTML using my voiceover timings, karaoke variant
- Set up the GSAP timeline with the envelope for this phrase and add the peak color shift
How to install asr-keyword-glow
Manually: put the files in place
.claude/rules/asr-keyword-glow.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/asr-keyword-glow.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/asr-keyword-glow.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/asr-keyword-glow.mdManually: put the files in place
.clinerules/asr-keyword-glow.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about asr-keyword-glow
How do I install asr-keyword-glow in Claude Code?
Place the rule file at .claude/rules/asr-keyword-glow.md. The agent can then apply it when generating scenes with word highlighting.
What does asr-keyword-glow do?
It creates a spoken-word effect: a word brightens and grows at its timestamp, then falls back to a subtle rest glow. Timings can be hardcoded, so no real ASR output is required.
What does the rule depend on?
GSAP 3.14.2 loaded from a CDN. Without it, the timeline the rule describes will not run.