Skip to content

feat(demo): remotion demo video with workers ai voiceover - #4

Merged
smithclay merged 7 commits into
mainfrom
demo-video
Oct 12, 2026
Merged

smithclay merged 7 commits into
mainfrom
demo-video

Conversation

@smithclay

@smithclay smithclay commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Draft. Stacked on #3 (demo-prep); retarget to main once #3 merges.

Renders the competition video from code: demo/video, built with Remotion. The voiceover and captions are generated on Workers AI.

Structure (~5:12)

Keynote style: open on the result, one idea per scene, each told with an animated diagram (often a before and after) and a few words on screen. The voiceover carries the detail, and the technical depth stays.

  1. Hook: 32.2% → 46.2%, same model and prompt. Hard tasks 23.5% → 38.6%. "+ memory".
  2. Title on the lava lamp wall.
  3. Every agent starts from zero: code dissolving after each run.
  4. Code Mode (brief context): model ⇄ tools ping-pong vs one program in an isolate.
  5. The gap: the isolate collapses and the plan falls away.
  6. Phase 1: agents → their own Artifacts repos.
  7. Under the hood: disposeExecution → SQLite outbox in the Durable Object → isomorphic-git → Artifacts.
  8. Recording slot: git log of an agent.
  9. Recording slot: the swarm.
  10. Phase 2: michelle's repo → Workers AI → Vectorize → matthew, with a Codemode-Examples provenance arrow.
  11. Recording slot: the michelle → matthew walkthrough.
  12. Learning curve: median tokens by position in the run.
  13. Accuracy bars.
  14. Which memory works: a skill hub spreading errors vs raw runs.
  15. Close: npm install, three lines, the tagline.

How it works

  • src/script.ts: each scene's voiceover line and diagram. minSeconds reserves time for recordings.
  • scripts/voiceover.mjs: speech from @cf/deepgram/aura-2-en (voice orion) and word timings from @cf/openai/whisper, cached per scene by a hash of its text. It calls a local cf dev Worker with a Workers AI binding (your cf login), or the REST API with CLOUDFLARE_API_TOKEN.
  • Timing: animations key off the spoken word (cue("forty-six")). Captions use the script's words with Whisper's timings, because Whisper misheard "Cloudflare's".
  • Recordings: public/clips/<scene>.mp4 replaces a scene's diagram when its id is listed in public/clips/index.json.
  • Isolation: demo/video is outside the npm workspaces.

Status

  • Voiceover: 15 scenes, about 2,850 characters, about $0.09.
  • Render: 5:12, 25 MB, H.264 + AAC.
  • npm run typecheck passes for both the video and the Worker.

Not done yet

@smithclay
smithclay added this pull request to stack #6 October 12, 2026 23:17
Base automatically changed from demo-prep to main October 12, 2026 23:38
…sper captions

- demo/video: a Remotion composition of 10 scenes from src/script.ts:
  lava lamp wall cold open, Code Mode contrast, isolate lifecycle, code
  memory on Artifacts, fleet, michelle→matthew, architecture, DABstep charts,
  which memory works, close.
- scripts/voiceover.mjs: Aura-2 speech and Whisper word timings, cached per
  scene by text hash. Uses a local cf dev Worker with a Workers AI binding,
  or the REST API with CLOUDFLARE_API_TOKEN.
- Scene length follows the audio; captions use the script's words with
  Whisper's timings.
- Kept outside the npm workspaces so CI and the library install skip Remotion.
…er text

- Open on the result (32.2% → 46.2%, same model and prompt), then the
  title. Code Mode becomes a short before/after context beat.
- 15 scenes, each one animated diagram with a few words on screen:
  vanishing code, tool-call ping-pong vs one program, the isolate
  collapsing, agents → Artifacts repos, the outbox/isomorphic-git write
  path, retrieval with a provenance arrow, the learning curve, accuracy
  bars, and skill contagion vs raw runs.
- Animations are timed to the spoken word via Whisper timings (cue()).
- Recording slots (minSeconds, public/clips/index.json) for the git log,
  swarm and michelle → matthew; total ~5:12.
- DEMO.md: the run of show now matches the video.
…proving

- New first scene: "What if Cloudflare Artifacts could make Code Mode
  self-improving?", built phrase by phrase, landing on the name.
- The result follows as proof ("We tried it…"). The separate title
  scene is gone.
- voiceover.mjs: retry transient Workers AI errors and save the manifest
  after each scene.
- Narration moves from src/script.ts to demo/video/transcript.md, one
  "## <scene>" section per scene (HTML comments are not spoken).
  voiceover.mjs checks sections against the scene list, and saves each
  clip's text, so captions always match the audio.
- Dead air: the gap between scenes drops from 2.1s to 0.8s (LEAD_IN 0.2,
  HOLD 0.6), and recording slots stretch only once their recording exists.
- npm run voiceover prints a per-scene runtime report and warns below 5:00.
- Remove 8 voiceover MP3s left over from the first draft.
- Rename the scene to code-memory (ids can't contain spaces;
  voiceover.mjs now says so instead of misreading the heading).
- Fix transcript typos the voice would read aloud.
- Re-key cues to the new wording ("code goes", "git pushes",
  "searches", "Keep the code").
- On-screen text matches the narration: "Code Mode in Workers", and the
  close reads "Keep the code. Your Workers get smarter over time."
- Thesis: the subtitle leaves before the name arrives.
…mory"; robot agents

- New title in the README heading, the submission's project name, DEMO.md
  and the video's opening scene. codemode-git stays the package name.
- Tagline follows the new close: keep the code, and your Workers get
  smarter over time.
- Video: agents are drawn as 🤖 inside a state-colored ring.
- next-steps scene: record outcomes as git notes, index on push with
  Artifacts events, learn between tasks.
- new-worker scene: a VHS recording (terminal/new-worker.tape) of cf init,
  installing Code Mode and codemode-git, the connector and bindings, and
  cf deploy --dry-run. scripts/record.mjs encodes the frames with ffmpeg,
  because VHS's own encoding fails silently with ffmpeg 9.
- credits exit slide: built by Clay Smith, with tech stack credits.
- Runtime 5:06.
@smithclay
smithclay marked this pull request as ready for review October 12, 2026 23:39
@smithclay
smithclay merged commit fb418de into main Oct 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant