Repository navigation
feat(final): fuse Qwen and Parakeet after the call when asked, 8.26 against 8.63 WER for Qwen alone - #268
Closed
GeiserX wants to merge 100 commits into
Closed
feat(final): fuse Qwen and Parakeet after the call when asked, 8.26 against 8.63 WER for Qwen alone#268GeiserX wants to merge 100 commits into
GeiserX wants to merge 100 commits into
Conversation
…o stale The hand-written tool list in docs/agents.md named 22 of the 37 tools the server lists. docs/reference/mcp.md is now rendered from tools/list (names, titles, descriptions, parameters, input schemas and annotations) by scripts/mcp-reference.ts, and tests/mcp-reference.test.ts fails whenever the committed page differs from what the server generates.
… key and job in the server log
A client with jobs in flight could not change where its callbacks go without
replacing its key, which loses its earlier jobs and feed. PATCH /v1/keys/{id}
and akou keys update now replace the hosts under the keys.json lock and keep
the key, its secret and its jobs.
The server log now carries key.created, key.updated and key.revoked (with the
client's address, or keys.json for a CLI edit) and job.created beside the
existing job.done, job.failed, key.refused and webhook lines. Never the audio
or the text.
Below 1248 px the sidebar drops to 10 rem so the transcript keeps half the window next to the side pane. A page (Settings, Models, Dictation) has no side pane, yet it got the narrow sidebar too, so call titles there were cut short for nothing. A page now keeps the 13.75 rem sidebar at any width.
…nloaded A job that named no model always ran Parakeet, even on a server with Qwen3-ASR on disk and a GPU free. auto now follows the app's final-pass rule: best wherever Qwen and its llama-server are on disk, else fast while Parakeet is, else best on a GPU with 16 GB and fast elsewhere. GET /v1/server says which and why, the Models page's Automatic row shows it, and `akou models pull auto` pulls the same preset. A test pins every built preset's engines to the catalog.
A backslash at the end of a description or type would have escaped the cell's closing pipe and broken the table. Cells now escape backslashes before pipes, and the escaping test covers both.
…rely on them Each route declares the refusals it answers, by status; the file renders them with the shared ones (guard, body, query) and lists every code once in components.schemas.ErrorCode. A range refusal now answers in the one error shape too. No existing code is renamed. Beads: akou-3n5.6
At 480 px, the shell's minimum, the full sidebar left the Models page too little room and it scrolled sideways.
The door parity test failed on the new PATCH /v1/keys/{id}: no row named it.
It reaches the CLI and the API; the Keys page and MCP do not change hosts.
…ize default, the bound address, each failed callback GET /v1/server listed the auto preset as unavailable while jobs on auto ran as fast, so a client trusting the flag hid its own default. auto now names what it resolves to and is available when that is. The route also reports server.default_diarize, the one default it left out. The startup line printed http://127.0.0.1 while the server listened on every address; it now names the address bound. A failed webhook try logged nothing until the whole schedule ran out, so an operator could not see callbacks failing. Each failed try with another to come logs webhook.retry with the event id, the try number, the status or error class and the next try's time, never the URL or the body.
…no server mode needed `akou transcribe FILE` against the desktop app exited 69 "file jobs need akou in server mode", although the models, the job Worker and the token were all there. server.enabled is about keys, bind and proxies for other machines, not about whether this akou may transcribe a file for its own user. The job service now starts in both modes and the job routes are served in both, reached with the app's token. The desktop app leaves out what server mode adds: no keys, no webhook secrets (capabilities.webhooks stays false), no remotes and no dictation lane; the model sweep stays the app's, and it now also keeps what a queued or running job needs. Keys and the OpenAI door stay server-only.
…oute Job results came back with a null language for every clip a client sent with language auto, because auto ran Parakeet, which names none, and the OpenAI route turned that into "unknown", which is not a language code. With auto running Qwen wherever it is on disk, a result now names the language it heard (en, es); the OpenAI route answers BCP-47 "und" when nothing names one, and its doc says words stay empty because no built engine gives word times. A model-gated test runs an English and a Spanish clip through auto on the real models.
…a running test The Linux check now measures coverage and holds src/ to 90 % of lines and 88 % of functions and src/core/ to 98 % of lines, summed from the lcov file, because Bun's own coverageThreshold holds every file to the bar on its own. A new traps job reads the JUnit files of check, ui and the capture e2e and fails when a reached trap in docs/TRAPS.md has no test named after its id that ran and asserted.
…and draw the side column as b2 With Claude Code or Codex missing, or no API key, the Ask card printed the provider's reason verbatim, naming provider.harnessPath or provider.apiKey. It now says it in one plain line that points at Settings; the CLI and the API keep the provider's own words. The side column follows b2: time-only citation chips with the speaker in their label, a one-line answer status, an HH:MM note gutter, Action and Open question under those notes, and a 340 px column.
… for a job the server forgot
A long job could not be told from a hung one: GET /v1/jobs/{id} showed only
the status and the start time. A running job now answers progress (stage
decode, diarize or transcribe, and the seconds of audio done), and a done job
answers timings, the wall seconds of each stage, also in its result.
A driver could not tell an expired job from a typo: both answered 404. A job
the caller once had, deleted or past server.retain_days, now answers 410 gone
with retain_days in the body; an unknown id still answers 404. A remote's 410
counts as a lost job, like its 404.
…irst job runs on it The first best job on a fresh box unpacked the pinned build inside its own start, after the host had last asked a build on disk, so it ran with every layer on a GPU nobody had confirmed. The server now asks the build's --list-devices once, before that first start, and runs on the CPU when it lists no such device. Also from the same review: a changed asr.accelerator asking the build again is now tested, the asr.llamaServer doc says an own build on the CPU gets --device none, and two comments point at llama-catalog.ts, where the build table lives.
…nding out dead akou:// links
An agent could not run the final pass, share a call, read a template, edit
or delete a note, open the window or read the settings, and every start
answered with an akou:// link nothing registers. The window's RPC also had
no check that each of its methods exists on the API.
MCP gains akou_finalize, akou_share_on/off/status, akou_template_list/get,
akou_edit_note, akou_delete_note, akou_open_window and a read-only
akou_config_get, plus mic and withoutModels on akou_start. GET
/templates/{name} and akou templates list|show read a template as the
notes would use it, the user's override included. POST /calls keeps url,
now null and typed nullable in the OpenAPI file. The parity test reads
every AkouRpc method from its type and fails on one with no route and no
written reason.
…s size Kept dictation audio was a 16 kHz 16-bit WAV, about 1.9 MB a minute, because the app has no Opus codec. The capture helper already links libopus for a call's parts, so it now does both ends for dictations too: `akou-capture encode` writes a mono Ogg Opus file at 24 kbps (about 180 KB a minute) and the existing `decode` reads it back. A WAV kept before is still read, served and deleted; with no helper or a failed encode the audio is kept as WAV rather than lost. The encode runs off the main thread; a read waits for it and a delete asked meanwhile removes what it wrote.
…ce ends are kept The Worker cut a Parakeet dictation at pauses on the raw signal, and the cut rule's -50 dBFS trim took the ends of quiet sentences; a clip whose peak sat under it gave no span and came back empty. The cutter now judges a copy gained as each span is decoded. On 20 quiet FLEURS English clips the cut decode goes from 21.60 to 7.99 WER with no empty clip; Spanish is unchanged.
…urces by id GET /devices and GET /apps answer the capture helper's device query, whose line now also lists the apps with audio (macOS by bundle id, Windows by executable name; Linux says it cannot capture one app). akou devices, akou apps, the Dictation mic picker and a new akou_devices MCP tool read them. A helper that refuses, such as in file-only mode, is answered as a refusal. Beads: akou-3n5.7
The type column still escaped only pipes, so a backslash in an enum value could have broken the table the same way.
…d say when llama-server may open the wrong GPU On an Intel UHD 770 with SR-IOV, the docs said to pass /dev/dri whole; llama-server then opened a virtual function instead of the GPU akou had detected, and the GPU hung. llama.cpp picks among the render nodes it can open by its own order and Mesa pins a device only by PCI ids, which the virtual functions share, so the fix is to pass one node. The docs now say so, and GET /v1/server's accelerator reason lists the nodes and names the one to pass whenever akou can open more than one. The docs also record the measured UHD 770 numbers: the Vulkan image ran about 1.2 times slower than real time and the CPU image on the same box about 1.5 times faster.
…pps-route-akou-3n5-2-l6
…gainst 8.63 WER for Qwen alone
The final pass ran one model. `asr.final.engines` lists several: each one that is
downloaded decodes every piece, and confidence ROVER fuses their words, the first
breaking ties. Empty by default, so the pass stays on the one model
`asr.final.model` picks.
Models leave from the end of the list while together they would hold more than
60 % of the machine's memory; one that goes down mid-pass is dropped and the rest
finish it. `final.done` names the engines that ran and the dropped ones with why.
`akou start --engines`, `POST /calls {engines}` and `akou_start {engines}` set the
list for one call, kept in `call.created`; `GET /models` names it.
|
Important Review skippedToo many files! This PR contains 136 files, which is 36 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configuration
📒 Files selected for processing (136)
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…s, and test the upload cap beside the real job route The app counted the job service's default recognizer as one of its own defaults, so Parakeet showed as a default model on a setup that never uses it. The upload-cap test added its stand-in job route behind the real one, which now exists in both modes.
…sing in L0 The L0 row still named the MCP reference as not generated while the TS-12 row says it is. The type column's pipe and backslash escaping had no test, so it is now pinned with an enum value holding both.
…n a GPU by PCI bus The last commit said Mesa can pin a Vulkan device only by its PCI vendor and device id. That is wrong: Mesa's device-select layer also pins by PCI bus address (DRI_PRIME=pci-<bus>!), which an SR-IOV virtual function does not share with its GPU. The docs and the code comment now say the pin exists and is not built yet, because it needs a run on a box with virtual functions. The several-render-nodes warning told a native install to run docker with one --device. Only an image gets that advice now; a native install is told which nodes llama-server may open. The warning names the detected node instead of saying "this one", which read wrong after "asr.accelerator is vulkan".
…tion shows no false chip The server now answers und where it used to answer unknown when its engine names no language. The desktop's remote dictation client only treated unknown as no language, so a dictation sent to a Parakeet-only server came back tagged und and drew an Unknown language chip. It now treats both as no language, so it still reads older servers too. The SV-J4 failing control now asserts the engine is not Qwen directly instead of a pair that the next line already implied.
With the speech models missing the body keeps the welcome's class under a page, and the welcome's narrow rule won between 900 and 1247 px. The welcome rule now skips a page. A test opens Models over the welcome at 1024 px and checks the sidebar width, and the 1024 px test now also checks 899 px.
…dalone-2-l1 [skip ci]
…ou-w51-1-l20 [skip ci]
…u-3n5-2-l6 [skip ci]
…5an-3-l8 [skip ci]
…p-1-l24 [skip ci]
With GET /devices answering, each assistant save on the Settings page waited for the capture helper's device query before it redrew, so the page showed the previous assistant's state for that long and a page closed meanwhile left a request in flight. A save now keeps the list the page read when it opened. The same change as 51b65bf on the devices-route branch.
…5an-3-l8 [skip ci]
…p-1-l24 [skip ci]
…-5an-1-l13 [skip ci]
…n-2-l17 [skip ci]
…zm-1-l18 [skip ci]
…dalone-2-l1 [skip ci]
…ou-w51-1-l20 [skip ci]
…u-3n5-2-l6 [skip ci]
…5an-3-l8 [skip ci]
…p-1-l24 [skip ci]
Owner
Author
GeiserX
added a commit
that referenced
this pull request
Oct 4, 2026
…#325) 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The final pass could only run one model. Our benchmark says two or more models voting word by word make fewer mistakes than the best one alone (Qwen and Parakeet fused: 8.26 % WER pooled over the eight sets, against 8.63 for Qwen alone with the call's language set; docs/research/asr-architecture.md section 4). akou had the voting code (
rover.ts) but used it only for the in-call rewrite, and nothing let a user ask for more than one model after the call.This adds
asr.final.engines: an ordered list of models for the final pass. It is empty by default, so nothing changes for anyone who does not set it: one model, the oneasr.final.modelpicks (Qwen when it is downloaded).When the list names two or more models:
rover-conf(<ids>), andakou statussaysFinal: ready (Qwen + Parakeet).final.donegainsengines(the models that decoded to the end) anddropped(each one left out, with why: not downloaded, over the memory budget, or failed during the pass).The other doors take the list too:
akou start --engines qwen,parakeet,POST /calls {engines}andakou_start {engines}set it for one call and record it incall.created, so a pass after a restart still runs them.GET /modelsnames the list and what the next pass runs. The Settings page shows it under Speech engines, Final transcript.akou finalize --modelstill runs one model whatever the list says. DESIGN 3.3, the event tables, the generated settings page and the OpenAPI file follow.Not in this PR:
asr.memoryBudgetMband noasr.fusionkey. The budget is the fixed 60 %, and confidence ROVER is the only fuser: frequency voting measured worse past three engines and the LLM fusers are dropped (akou-chp.9). A key with one useful value is not worth adding.Tests:
tests/final-engines.test.ts(new, fails on main: the list, the budget and thefinal.donefields do not exist there): fake engines from 1 to 5, each decoding every piece; a vote where two engines outvote a wrong one in any position, with the wrong engine alone as the control; ties going to the first engine; one engine going down after its first piece (dropped, the pass finishes,final.donenames it); the last engine going down failing the pass; one engine over the memory budget, with a budget that holds all three as the control; models the host left out reachingdropped; the setting's values and short names.tests/final-model.e2e.test.ts, three new cases through the whole app with the fake llama-server and the fake Parakeet: the list fusing Qwen and Parakeet on every final line,GET /modelsandakou statusnaming it; Parakeet's files gone, so it lands indropped, and--model parakeetstill running it alone; a call's ownenginesbeating the setting and staying incall.created, with a bad id refused (422).asr-final,final-pass-qwen,final-progress,model-set,events,fold,live-setup.e2e,openapi) pass unchanged except two expectations: the OpenAPI body field list gainsengines, andmodel-set.e2e'sGET /modelsfinalgainsengines: []on the Parakeet path.asr-finalchecks that a pass over two engines gets the decode budget twice (one engine as the control), since each engine decodes the whole call;asr-enginechecks that Parakeet in a fused pass decodes with the call's decode list under beam, with greedy and a model that takes no hotwords as the controls.tests/floors.json: the check floors rise by the 14 new tests.Beads: akou-chp.6, akou-chp.10