Worker pipeline and message protocol for local engines #9
Labels
No labels
NaNs
area/audio
area/build
area/docs
area/dsh
area/engine
area/security
area/ui
needs-operator
priority/later
priority/next
priority/now
type/bug
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-whale-noises#9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Keep WASM/ONNX and model bytes off the UI thread. The Worker boundary every local engine shares.
Scope
/pluginsroute (it serves onlyclient*.jschunks): Blob URL from an inline source string, or a pinned CDN module — decide and document. No arbitrary static route until the asset ADR (#18).{ id, type: 'init' | 'synthesize' | 'cancel' | 'dispose', payload }; responsesprogress/result/error; correlate byid; reject duplicate ids.Float32ArrayPCM out, model bytes in; never structured-clone big buffers.postMessage/onmessagestub).Acceptance
Notes
Done in
f586bbc. The worker is built separately fromsrc/worker/entry.jsand embedded as a source string (the/pluginsroute still serves onlyclient*.js): one Blob worker, request/response ids, progress forwarding, AbortSignal cancel (best-effort), crash → reject + respawn, dispose. WAV→PCM decoder lives insrc/audio/wav.jsso the adapter never needsAudioContextin the worker. 6 worker-client tests + 4 WAV tests; 110 total. Next: browser proof in #11.