Skip to content

feat(final): let a call's final pass fuse the fusion preset's engines - #325

Merged
GeiserX merged 82 commits into
mainfrom
feat/call-fusion-akou-chp-1-l24
Oct 4, 2026
Merged

GeiserX merged 82 commits into
mainfrom
feat/call-fusion-akou-chp-1-l24

Conversation

@GeiserX

@GeiserX GeiserX commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

A file job can fuse Qwen, Whisper and Parakeet word by word (the fusion preset, #303), but a recorded call's final pass still ran one engine. The engines that make the best transcript were there, and a call could not ask for them.

Now a call can. asr.final.model takes a new value, fusion. A call can also choose it for itself with akou start --final fusion, POST /calls {final} or akou_start {final}, and one rerun can with akou finalize --model fusion. The call's pass then runs the fusion preset's engines: asr.final.engines, joined by asr.fusion. It goes through the same runEngines a fusion job runs. There is no second fuser and no second key, and the default stays one engine.

How the call's pass does it:

  • It cuts every part and channel into its pieces first and keeps a 16-bit copy of each piece's audio, about 0.25 GB per hour of a two-channel call on top of the engines (asr.memoryBudgetMb does not count it; the settings doc and DESIGN 3.3 say so). runEngines needs every piece for each engine in turn, so the pass can no longer read one channel at a time. Then the lines come from the fused words, named rover-conf(<ids>), and akou status says Final: ready (Qwen + Whisper + Parakeet).
  • Only the engines of the list that are downloaded run. The rest are named as not downloaded. With none downloaded, the pass runs what auto runs, and akou finalize --model fusion is refused.
  • final.done gains engines (the engines that decoded) and dropped (each engine left out, with its reason and how many pieces). The host's "not downloaded" entries come first, then the pass's own: over asr.memoryBudgetMb, would not load, or went down during the pass.
  • The pass gets its time budget once per engine, plus 300 s when Qwen is in the list. A fusion pass with Qwen in it waits its turn on the one Qwen line, as a Qwen pass does.
  • The call's own choice is written into call.created, so the catch-up after a restart runs it too.

What came over from the old #268, and what did not: #303's runEngines already drops an engine over the memory budget and an engine that goes down mid-pass, so those come from it, now on calls too. #268's own list, its own budget rule and its separate fusion code are gone. Kept from #268: final.done naming the engines and the dropped ones, the per-call choice on every door, and the fused name in akou status. #268's --engines flag became --final fusion, so one key keeps one meaning.

Tests (11 new; the check floors rise by 11):

  • tests/final-fusion.test.ts, new: a call's pass over two parts and both channels with three fake engines, so every engine decodes all four pieces and the lines and final.done name the fusion. Also: a vote where two engines outvote the first one's wrong word, with first as the control that keeps it; an engine that goes down at its third piece (dropped for 2, the pass finishes); an engine over the budget, with no budget as the control; the host's dropped entries coming first; the only engine going down failing the pass.
  • tests/final-model.e2e.test.ts, three new cases through the whole app, with the fake llama-server, the test module's fake Whisper and the fake Parakeet. First, asr.final.model fusion fuses all three, and GET /models and akou status name the fusion. Second, with Whisper's files gone it is dropped as not downloaded, and with all three gone --model fusion is refused. Third, a call started with final: "fusion" fuses although the setting is auto, final: "parakeet" is saved as the id, and a bad value answers 422.
  • The window's Settings page offers fusion for the model after the call, akou_finalize takes it, and the Models page names a fusion by its engines ("Qwen3-ASR, Whisper and Parakeet, combined"); tests/models-rows.test.ts checks that name, and the 16-bit round trip has its own case. tests/ui/settings-labels.test.ts and tests/ui/models-page.test.ts pass headless on the mini.
  • The first 9 fail with main's src/ and pass on this branch, run on a Mac mini. The existing cases in the same files pass on both.
  • Related suites on this branch, run on the mini: final pass, catch-up, quit, progress, Qwen, fusion pass and preset, GPU turn, model set, events, fold, OpenAPI, CLI, settings and MCP references, config, calls API, MCP. 267 pass, 1 skip, 0 fail after adding final to the OpenAPI body list.

This replaces #268, which is closed. It was built before #303 and used asr.final.engines with another meaning.

Beads: akou-chp.6, akou-chp.10

GeiserX added 30 commits October 3, 2026 01:06
Builds are ad-hoc signed, so prompts naming a signed app and grants that
survive a re-signed update can never pass G3 today. G3 now asks what this
build can prove: prompts and grants under akou, real audio on both
channels through the app-spawned helper, and the grant holding across an
app restart. The signed half moves to the Developer ID milestone.
… Codex terms

CI-28 refuses a stable release until the terms table has a dated row.
Both vendors' terms allow akou's harness use on our reading; one question
for Anthropic stays open and is written down. The CI-28 positive control
now fails on the gates, and on the terms once the row is undated.
…puter instead of stopping

With per-app capture, an app that quit, crashed or relaunched for an update
ended the whole call, mic included, logged as if the user pressed Stop, with
no banner and no notification. The call now keeps recording: on
tapped-apps-exited the part restarts as whole-computer capture, make before
break, and the window says why in an amber banner (five minutes, after the
red rows) and a notification when it is not in front.

- tapped-apps-exited counts in needsRestart, so a restart already opening
  that fails is retried as the whole computer instead of dropping the
  fallback.
- The health dot reads only the newest part's own health, so the old part's
  state no longer sticks after the fallback.
- The scripted test helper echoes the scope it was asked for, as the real
  helper does, so the tests depend on the requested scope.
- DESIGN, REQUIREMENTS F0.11, ROADMAP, PRINCIPLES and the DESKTOP
  notification table state the fallback rule.
…r, not at every start

A typo in capture.call (`zoom`, `app:`) saved fine and then made every start from
every door fail at the helper. capture.call (config set, PATCH /config) and
POST /calls `call` now go through one parser with the helper's own rule
(source.rs CallMode::parse), so nothing the helper accepts is refused and a
malformed value answers 422 at once. A malformed value already in config.json
loads as `system`, the default, with one warning.
…r record the whole computer

The refusal only repeated the helper's line ("no running app matches ..."), so a
user or agent did not know what to do. When the helper exits with no device for
an `app:` scope, the 503 capture_failed now adds the two ways out: start the app
and let it play (on macOS an app that has played nothing has no audio process),
or record the whole computer. A whole-computer start keeps the helper's text.
…ng for one app knows it got another

akou_start always attaches, so an agent that asked for `call: "app:us.zoom.xos"`
while a whole-computer call recorded got `attached: true` and nothing else. The
live call's brief (the 409 already_recording body and the attach answer) now
carries `callMode`, from the newest part (or the scope it is starting with), and
the akou_start text names it: the whole computer, only app:<id>, or no call
audio, only the microphone.
With dictation on, the live Worker loaded Parakeet (about 2.2 GB) and the
streaming model (about 1.8 GB) at start and kept both for the life of the
app, although a live dictation never decodes with Parakeet. A call loaded
Parakeet too and nothing ever let it go. Measured with `footprint`, the
app sat at about 3.9 GB idle, the same as right after start.

- The dictation warm-up loads Parakeet only when the dictation's text
  comes from it (`fast`, or no streaming model).
- `asr.modelIdleMinutes` (default 5): once no call and no dictation has
  used the live Worker for that long, it lets go of every model
  (`LiveAsr.releaseIdle`, the shape of the server's job Worker idle
  release) and the app loads again what a dictation needs to start fast.
- tests/idle-memory.e2e.test.ts checks it on the real models with
  `footprint`; it is skipped without them.
GeiserX added 28 commits October 4, 2026 02:44
…in to the measured spread

- One test per in-flight request that keeps the models (a decode, a speech
  check, a warm-up), each red with its rule removed.
- The idle app's footprint read from 1,158 MB under to 529 MB over its fresh
  start across seven runs, so the e2e margin is 1000 MB.
- asr.modelIdleMinutes goes up to 10080, so a Mac with memory to spare can keep
  the models loaded; the LiveAsr option takes JobService's name.
@GeiserX
GeiserX merged commit cd0eb58 into main Oct 4, 2026
6 checks passed
@GeiserX
GeiserX deleted the feat/call-fusion-akou-chp-1-l24 branch October 4, 2026 10:49
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