Skip to content

docs(engineering): Editor Studio's render helper, measured - #678

Merged
5hirish merged 1 commit into
mainfrom
claude/cool-cerf-f2mb25
Dec 5, 2026
Merged

5hirish merged 1 commit into
mainfrom
claude/cool-cerf-f2mb25

Conversation

@5hirish

@5hirish 5hirish commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

What and why

What Editor Studio's render helper (#599) is made of, measured rather than estimated. #599 guessed the first-use download at 100–170 MB and had no plan for forced alignment, which today needs PyTorch. This spike ran the Ship with AI engine and its aligner the way the desktop helper would run them.

Part Result Download
Edit engine as one Bun binary Same timeline.otio and same decoded frames as Node 38–52 MB
Aligner without PyTorch (ONNX Runtime + numpy) Every word of an 18.5-min take on the same millisecond as torch; 60 s vs 65 s runtime ~17 MB
Aligner model, int8 on the transformer only 2,287 of 2,300 words exact, 12 off by one 20 ms frame 98 MB

The first download comes to about 180–210 MB. The doc's last table lists what is still open: the engine's licence, ONNX library loading on macOS, alignment memory on long recordings (1.4 GB at 18.5 min, about 15 GB at an hour), ffmpeg's licence and size, and speed on laptops.

Docs only: no code in Duct changes.

Refs #599

Area

  • backend/ — FastAPI / Python
  • app/ — Next.js
  • desktop/ — Tauri shell / sidecar
  • site/ — static marketing site
  • CI / tooling / docs

Verification

python3 scripts/check_docs.py   # the new record passes; the 5 problems reported are older
                                # reference docs, a shallow-clone artefact of this checkout

The measurements, all in a 4-core Linux container:

  • Engine: bun build --compile of scripts/edit/cli.mjs for darwin-arm64/x64, linux-x64 and windows-x64; the engine's integration fixture rendered by node and by the linux binary, compared by cmp on the timeline and md5 of the decoded video.

  • Aligner: 146 LibriSpeech utterances (CC BY 4.0) joined into one 18.5-min take, with word times smeared by up to 0.5 s. Reference: the engine's align.py, unchanged. Compared word by word with an ONNX export (fp32, int8 on every layer, int8 on MatMul only) plus a numpy CTC Viterbi, which matched torchaudio.functional.forced_align's path exactly. onnxruntime-node under Bun, plain and compiled, gave emissions identical to Python's.

  • Not covered: a real recording with fillers (Ep 0004's audio was not reachable), WebKit or WebView2, macOS, any laptop.

  • I ran the checks for the areas I touched (see CONTRIBUTING.md)

  • I read the AGENTS.md for each directory I edited

  • I read my own diff back looking for the reason to reject it, and read it
    against the code around it (STYLE.md)

AI assistance

  • An AI coding agent wrote or substantially shaped this change
  • I have read every line of this diff and can explain why each part is there

Generated by Claude Code

What the helper #599 downloads on first use is made of, measured rather
than estimated: the edit engine compiled to one Bun binary renders the
same video as Node; forced alignment runs without PyTorch (ONNX Runtime
for the model, a numpy port of the CTC alignment) and lands every word of
an 18.5-minute take on the same millisecond as torch; and int8 on the
transformer alone halves the model while keeping the cuts.

It also records what is still open before phase 1 builds on it: the
engine's licence, loading the ONNX library on macOS, and alignment memory
on long recordings.

Refs #599

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016C6UbipzM9LzsqoXb6jEem
@5hirish
5hirish marked this pull request as ready for review December 5, 2026 12:54
@5hirish
5hirish merged commit b402a79 into main Dec 5, 2026
9 checks passed
5hirish pushed a commit that referenced this pull request Dec 5, 2026
#653 was squash-merged and main's tree is this branch's merged base
plus #678's spike doc, so the conflicts resolve to this branch's side
and the doc comes in unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016C6UbipzM9LzsqoXb6jEem
5hirish pushed a commit that referenced this pull request Dec 5, 2026
#655 was squash-merged and main's tree is this branch's merged base
plus #678's spike doc, so the conflicts resolve to this branch's side
and the doc comes in unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016C6UbipzM9LzsqoXb6jEem
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.

2 participants