Skip to content

fix(live): commit call lines within the 1.5 s G6 bar by writing their speaker as a later revision - #359

Merged
GeiserX merged 2 commits into
mainfrom
fix/g6-call-line-provisional-speaker
Oct 9, 2026
Merged

GeiserX merged 2 commits into
mainfrom
fix/g6-call-line-provisional-speaker

Conversation

@GeiserX

@GeiserX GeiserX commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

With the Nemotron diarizer on, every call line waited for the diarizer to decide who spoke it before it reached the log. Nemotron decides about 2 s behind the audio, so call lines landed late. The G6 gate asks for a committed line within 1.5 s of the end of the utterance. On fp32 the call channel measured 2.42 s at worst on a Mac mini M4 and 4.55 s on four x64 cores. The mic channel and the embeddings diarizer were inside the bar. G6 stayed Partial because of this hold.

The fix

A call line is now written as soon as its segment closes, with the speaker c?. akou already uses that label for "not decided". When Nemotron decides, the host writes the speaker as the line's next seg revision, which carries spk and nothing else. The log stays append-only and the fold shows the decided speaker on the same line. The window, the API, akou watch and the shared link already key lines by id, so nothing is duplicated.

  • A line whose speaker a person set before the decision keeps that speaker.
  • A label that matches the line's current speaker writes nothing. A line Nemotron could not decide stays c?, as before.
  • A replaced Worker numbers its lines from 1 again, so the host forgets the old Worker's held lines and they stay c?. Before this change those lines were never written at all.
  • The second pass no longer holds an utterance back until its labels arrive.
  • The G6 gate script now counts only revision 1 as the committed line. It also reports speakerMs, the time until a call line's speaker lands.

Tests

These were red on main and are green here:

  • [G6] a call line commits within 1.5 s of its end while a slow diarizer decides its speaker. On main the first line committed 2.84 s after its speech ended. A positive control checks that the fake diarizer really decides more than 1.5 s late.
  • [G6] a call line lands as c? when it closes; its speaker follows as a label, in order
  • [G6] every call line is in the log before call.ended, written as c? and labelled by its next revision. This one goes through the host into a real call log.
  • [G6] a speaker a person gave a line before the diarizer decided it is kept. Its positive control is the same label on a line nobody touched, which does get written.
  • [G6] an utterance whose speaker the diarizer has not decided is sent after its lines, without waiting for the labels
  • a diarizer that never answers: the line lands at once, …

Two fold tests pin the invariant. They already pass on main because the fold honours rev. One checks that a later revision relabels the c? line in place, with no second line. The other is the control: a lower revision that arrives later does not win.

bun run check on a Mac mini M4 gave 3150 pass, 34 skip and 2 fail. Both failures hit the 5 s test timeout while the machine's load average was 30 to 38. The two tests are [T4.20] the nightly year-ahead floor… and [spike] no code reads process.argv…, and both pass when run alone on this branch and on main.

G6 gate

Measured on a Mac mini M4 on 2026-10-09. The setup matches the fp32 re-run in docs/gates/M0-results.md: Parakeet fp32, beam search, the 12-word list, the same 24 clips on a 56 s stereo timeline, and Nemotron from the 0.6.2 akou-diarize. The times count from the end of the utterance.

Run Mic line, median and worst Call line, median and worst Call speaker lands, median and worst
main, Nemotron 1.08 s, 1.24 s 1.56 s, 2.41 s the same as the line
this branch, Nemotron 1.06 s, 1.14 s 1.06 s, 1.26 s 1.57 s, 2.42 s

These two runs ran back to back and neither app fell behind (no asr.lag event). Main reproduces the 2.42 s that #350 recorded. On the branch the call channel matches the mic, and the speaker lands when the line used to.

The mini was shared with other lanes' work: a VM, the audio daemon at about 70 % CPU and repeated bun install runs. Nine other runs were spoiled by that load:

  • Five fell 10 to 45 s behind on both channels. Three of those were main runs and two were branch runs.
  • Four failed to start within 3 s.
  • In the rest, the slow lines all sit in the first 10 s of the call, on both channels, on both versions. Main with embeddings, which runs no Nemotron, was hit the same way, at 6.65 s.

Outside those first 10 s the branch's call lines stayed under 1.5 s. The exception is one run whose late blip, up to 2.32 s, also hit the mic channel. In every branch run the call median was 1.03 to 1.07 s. A verdict run for docs/gates/M0-results.md should still be made on a quiet machine.

With embeddings on the branch, the one run that did not fall behind gave a median of 1.07 s and a worst of 1.41 s on the call channel. That path does not change in this PR.

The four x64 cores were not run again. On that machine the mic line already missed 1.5 s on 2026-10-07, at 1.75 s, so x64 needs its own work.

To run it again, see docs/gates/M0-results.md, section G6. Make the clips with scripts/gates/g6-clips.sh, then run scripts/gates/g6-live-latency.ts against a cold headless app. The config sets asr.live parakeet and asr.parakeet.decoding beam, with capture.helper pointing at a wrapper that runs akou-capture … --from-wav <timeline> --realtime. For the second run, set asr.diarizer to embeddings. Read byChannel.call.latencyMs for the bar and byChannel.call.speakerMs for when the speaker lands.

…ecides its speaker

With the Nemotron stream diarizer the live worker held each call line until
the model had decided all of its audio, so the committed call line landed
about 2 s after a mic line and missed the 1.5 s bar of ROADMAP G6 (2.42 s on
a Mac mini M4, 4.55 s on four x64 cores).

A call line is now written as c? when its segment closes, and once the model
decides it the host writes the speaker as the line's next seg revision,
carrying spk alone. The log stays append-only, the fold shows the decided
speaker on the same line, and a line whose speaker a person set first keeps
theirs. An utterance for the second pass no longer waits for the label.
…speaker lands

A call line's speaker is now a later seg revision, so the gate counts only
revision 1 as the committed line and adds speakerMs per row and per channel.
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: GeiserX/akou/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b40e0c7e-b155-495d-b3ac-e93e959a09e7

📥 Commits

Reviewing files that changed from the base of the PR and between 121d948 and dea9815.


📒 Files selected for processing (8)
  • docs/DESIGN.md
  • scripts/gates/g6-live-latency.ts
  • src/main/asr/live-worker.ts
  • tests/asr-stream.test.ts
  • tests/fixtures/asr-fake.ts
  • tests/fold.test.ts
  • tests/live-streaming.test.ts
  • tests/live-upgrade.test.ts


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@GeiserX
GeiserX merged commit 34a2777 into main Oct 9, 2026
29 checks passed
@GeiserX
GeiserX deleted the fix/g6-call-line-provisional-speaker branch October 9, 2026 09:36
GeiserX added a commit that referenced this pull request Oct 9, 2026
…'s call lines now commit within 1.5 s (#363)

G6 was Partial because every call line waited for Nemotron to decide its speaker. #359 removed that wait, and this re-run records what the committed line does now. G6 stays Partial, and the reason is now only the four x64 cores.

## The run

We measured `origin/main` `34a27777` on 2026-10-09 with the 2026-10-07 setup: fp32, beam search, the 12 words, and the same 24 clips and 56 s timeline. Every run started a cold app, one at a time, and the runs alternated Nemotron and embeddings. The timer stops at the committed line, which is `seg` revision 1. `speakerMs` shows when the call speaker lands.

- **A Mac mini M4:** eight runs back to back, in `docs/gates/g6-after-hold-mac.json`.
- **A Windows x64 box:** six runs, pinned to four performance cores with affinity `0x55`, in `docs/gates/g6-after-hold-x64.json`.

Every run committed 24 of 24 lines and wrote no `asr.lag`. The times below are worst cases.

| | Mic | Call | Call speaker lands |
|---|---|---|---|
| Mac, Nemotron, runs 2 to 4 | 1.15 s | **1.18 s** | 2.42 s |
| Mac, embeddings, runs 1 and 2 | 1.16 s | **1.29 s** | with the line |
| x64, Nemotron, runs 1 to 3 | **1.85 s** | **2.27 s** | 5.22 s |
| x64, embeddings, runs 2 and 3 | **1.85 s** | **1.82 s** | with the line |

Five of the eight Mac runs commit every line within 1.5 s. In the other three, the first one to three lines came in at 1.52 to 5.77 s, all in the first 9 s after a cold start. Every later line in those runs was within 1.5 s. The load at each run's start does not explain this, and the doc leaves the cause open.

On x64, the 1.85 s mic worst is the first mic line of its run. Without each channel's first line, the x64 mic worst is 1.80 s, and the call worst of 2.27 s comes mid-call, so the x64 result does not move. In one x64 embeddings run, every line was 3.77 to 4.32 s late from the 17 s mark on. That run is in the file and stays out of the verdict.

## The verdict we wrote

The G6 row reads Partial. The committed line passes on the Mac with either diarizer. On four x64 cores it misses on both channels with either diarizer, the mic included. The mic misses there, so the open half is the recognizer's speed on four x64 cores and not the speaker labels.

The ROADMAP bullet and status line follow the row. G6 stays in the Partial list of the CI-28 control in `tests/release-evidence.test.ts`, and only its comment changes.
GeiserX added a commit that referenced this pull request Oct 9, 2026
…aker and akou start and akou quit finish (#374)

## Problem

On 0.6.4, with the Nemotron diarizer on, every call line waited about 2 s for its speaker before it reached the transcript. The first `akou start` after an install gave up at 3 s while the app was still coming up. `akou quit` on Linux could hang after a call. All three are fixed on main and no release carries them yet.

## What 0.6.5 ships

- A call line is written when its segment closes, and its speaker follows as a correction to the same line (#359).
- `akou start` waits up to 20 s for a slow first launch and stops the idle launcher afterwards (#360).
- `akou quit` always finishes on Linux (#367).
- A search hit names the speaker who said the matched word (#365).
- A file job without speaker labels fetches, and is admitted for, only the models it runs (#364).
- Three messages no longer point at a command that cannot help (#366).
- Behind the scenes: G1 and G3 pass, G4, G6 and G7 stay Partial (#354, #357, #358, #362, #363, #371, #372), the dictation audio tests wait for the write (#361), and `glama.json` (#373).

The Known limitations list in CHANGELOG.md names what the reviews left open: late first lines after a cold start, the four-core x64 line latency, a launcher left by an earlier failed launch, the silent wait in `akou quit`, and two search citation cases.

## The bump

- `scripts/stamp-version.ts --set 0.6.5` wrote the 11 stamped places.
- By hand: the install line in README.md, the image tags and the `--branch` line in docs/server.md and docs/server-hardware.md, and the "Known in" line in docs/troubleshooting.md. The menu bar item still moves, since nothing touched it after 0.6.4.
- docs/gates and docs/ROADMAP.md keep the versions their evidence ran on.
- `stamp-version.ts --check --tag v0.6.5` passes, and `--tag v0.6.6` fails as the control.

The tag is pushed after the merge.
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