Skip to content

Releases

BiVox v0.2.14 — engine update

Choose a tag to compare

@DirectX DirectX released this 03 Dec 18:40

BiVox v0.2.14 — the tail truncation: LibreOffice counts nChars as BYTES

Good news first: your report says switching between apps works and both
LibreOffice Writer and gnome-text-editor receive text
— the whole
focus/watcher chain (D-020 watcher, decisive refusal) is doing its job.

The two remaining symptoms were one root cause, and it is not the model:

Diagnosis (measured on a real Writer, not guessed)

Replaying your exact fixture through the Rust worker: final text 247 chars,
exact Python parity, zero U+FFFD
— ASR delivers the full sentence. The loss
happens at injection. Field evidence aligned:

  • MISMATCH span=71 want=79 — the injector wanted 79 chars in its span, 71 landed;
  • `` in Writer — a multibyte character cut mid-sequence in the buffer.

Controlled experiment against live LibreOffice Writer via AT-SPI
EditableText.insertText(start, text, nChars):

sent nChars landed
101 cyrillic chars (180 bytes) 101 57 chars = 101 bytes
positions — stay CHAR-based (X@2 landed between аб and вгд)

Writer's VCL a11y bridge spends nChars as a byte budget, cutting the
string at the byte limit — mid-character, producing the replacement glyph.
GTK4 (gnome-text-editor) follows the spec (chars), which is why the tail
survived there; the residual MISMATCH there was the old settle budget
(4×5 ms) giving up before the a11y cache caught up on long finals.

Fix (D-025): verified repair loop, no per-app heuristics

Patcher.apply always sends spec-correct char counts, then:

  1. reads its span; strips any U+FFFD cut-artifact from the buffer;
  2. if the read is a stable short prefix of the target → re-inserts the
    shortfall; each round the quirky widget lands ~half the remainder, so
    convergence takes ≤2 repairs;
  3. discovers the quirk on the first repair (landed-bytes ≈ sent-chars →
    flips byte_cut, subsequent inserts send a byte budget) — one 32 ms
    round-trip on Writer, zero churn on compliant widgets;
  4. budgets: partials 120 ms (streaming feel), final 1.5 s (must converge).
    Drift policy (external conflicts freeze the span) unchanged — data safety
    first: the repair only ever touches OUR span.

Verified

  • Live Writer: 101/101 chars, verify=True, byte_cut discovered, 1 repair,
    32 ms, no U+FFFD in buffer.
  • Emulator (tools/writer_quirk_test.py, 4/4): byte-cut convergence,
    ASCII single-insert (0 repairs — compliant widgets unaffected), streaming
    partials→final, anchored append.
  • Full battery at tag: M1 21/21 · M2 9/9 · M3 13/13 · E2E 8/8 · m4 9/9 ·
    refusal 5/5 · G2 3/3 · stress 2/2 (rust) · guards PASS.

Assets

Code-only release per D-022 (models unchanged, v0.2.8 — URL embedded in deb).

sudo apt install ./bivox_0.2.14_amd64.deb
systemctl --user restart bivox-core bivox-hotkey

The injector ships inside the deb — no models reinstall needed.

Install

Component Package
Engine (code) bivox_0.2.14_amd64.deb (this release)
Models (unchanged, v0.2.8) https://github.com/DirectX/bivox/releases/download/v0.2.13/bivox-models-ru-en_0.2.8_all.deb — already installed if you have any BiVox ≥ 0.2.6
sudo apt install ./bivox_0.2.14_amd64.deb

BiVox v0.2.13 — engine update

Choose a tag to compare

@DirectX DirectX released this 03 Dec 01:07

BiVox v0.2.13 — the red tray was MY packaging bug: manifest shipped mode 600

The nuc saga is over, and the root cause was mine — introduced in v0.2.11 when
I moved the model manifest into git-tracked packaging/. My file-writing tool
created models.manifest.toml with mode 600 (root-only); cp preserved
that mode into the deb; and bivox-core runs as your desktop user — so it
could not read the manifest it was designed to discover. Every symptom
follows: models_path: "", "no unpacked model packs", red tray forever —
while your model files (17, 948 MB) sat perfectly intact on disk after the
dpkg -i.

Why doctor lied: my v0.2.12 check conflated "manifest unreadable" with "dir
not unpacked" — the giveaway was the empty path in
model pack: …ru-en.toml -> NOT UNPACKED ✗ (the parsed dir was empty
because the file could not be read). Reproduced locally: extract the deb under
umask 077 → manifest 600 → identical doctor output.

Instant repair (if your tray is red on v0.2.11/0.2.12)

sudo chmod 644 /usr/share/bivox/models.d/ru-en.toml
systemctl --user restart bivox-core bivox-hotkey

That's it — the models were already there.

What this release changes

  • models-ru-en 0.2.8: manifest installed with install -m644 (verified:
    normal-user read + worker loads + G2 parity from the extracted tree).
  • Hash-gate is mode-aware: a file-permission regression can never be
    "UNCHANGED" again — the gate hashes content + modes.
  • Release pipeline tracks what was actually shipped (packaging/models.shipped.ver):
    v0.2.12 had built models 0.2.8 locally but never attached them to a release,
    while the gate marked them current — the next release would have skipped
    them forever. Now a version mismatch forces the ship (no bump).
  • Doctor tells three states honestly: UNREADABLE ✗ (Permission denied)
    with the exact chmod 644 repair, NOT UNPACKED ✗ with the wget/dpkg
    sequence, ON DISK ✓. All verified against reproduced trees.
  • Core's status/tooltip carry the honest reason: worker_error and the
    red-tray tooltip now say "manifests unreadable by this user (mode?) —
    repair: sudo chmod 644 …" instead of blaming apt for a permissions bug.
  • Dev-fallback hardened: <repo>/models is only consulted on machines
    with NO installed manifests at all — never when manifests exist but are
    unreadable/unpacked (the v0.2.10 leak class, closed completely).

Honest post-mortem

Four releases (0.2.9→0.2.12) chased symptoms while the defect sat in my
packaging step. The chain of my mistakes: (1) tool-created 600 mode → cp →
deb; (2) content-only hashing missed it; (3) doctor conflated unreadable with
missing; (4) repair advice assumed files were absent. Each was individually
plausible; together they wasted your week. The guards added here (mode-aware
gate, shipped.ver tracking, 3-state doctor, no-dev-paths test) are designed so
this specific class cannot recur.

Assets

Component Package
Engine (code) bivox_0.2.13_amd64.deb (this release)
Models (manifest-mode fix) bivox-models-ru-en_0.2.8_all.deb (this release)
sudo apt install ./bivox_0.2.13_amd64.deb ./bivox-models-ru-en_0.2.8_all.deb
systemctl --user restart bivox-core bivox-hotkey

Suites at tag: M1 21/21 · M2 9/9 · M3 13/13 · E2E 8/8 · m4 9/9 · refusal 5/5 ·
G2 3/3 · stress 2/2 (rust) · no-dev-paths guard PASS · 3-state doctor verified.

Install

Component Package
Engine (code) bivox_0.2.13_amd64.deb (this release)
Models (updated, v0.2.8) bivox-models-ru-en_0.2.8_all.deb (this release)
sudo apt install ./bivox_0.2.13_amd64.deb
sudo apt install ./bivox-models-ru-en_0.2.8_all.deb

BiVox v0.2.12 — engine update

Choose a tag to compare

@DirectX DirectX released this 02 Dec 19:13

BiVox v0.2.12 — doctor repairs itself: disk check, download integrity, dpkg-first repair

Your nuc box hit the one state the software cannot fix alone: dpkg believes
bivox-models-ru-en is installed (the manifest survived) but the ~920 MB of
graphs were never unpacked — the classic signature of a truncated 499 MB
download
or a disk that filled mid-extract. My earlier repair advice was
wrong twice more: apt install --reinstall can answer "already newest
version" while files are missing, and dpkg-deb --info validates only the
control metadata, not the data archive.

What changed

bivox-ctl doctor at NOT UNPACKED now prints a repair sequence that
actually works for this exact state:

disk free at /usr/share: … (need ~1 GB)          <- diagnoses the usual cause
wget -c https://github.com/DirectX/bivox/releases/download/v0.2.8/bivox-models-ru-en_0.2.7_all.deb
dpkg-deb -c ./bivox-models-ru-en_0.2.7_all.deb >/dev/null || echo CORRUPT-DOWNLOAD
sudo dpkg -i ./bivox-models-ru-en_0.2.7_all.deb   <- dpkg ALWAYS re-extracts files
sudo apt install -f -y
systemctl --user restart bivox-core bivox-hotkey
  • wget -c resumable (weak links on mini-PCs);
  • dpkg-deb -c reads the data archive — a truncated download fails here,
    before wasting your time on install;
  • dpkg -i bypasses the apt solver that was lying "already installed";
  • services restarted at the end — the slow-retry (v0.2.9) would heal within
    30 s anyway, but this makes it instant.
  • postinst gained a disk preflight warning (< 2 GB free on /usr/share) at the
    models-missing check.

Verified locally

Deb integrity: extracted tree = 17 files, 948 MB stream_step intact; worker
loads from the extracted layout in 2.6 s and reproduces G2 parity. Doctor
simulation (manifest + missing dir) prints exactly the block above.

Run this on the nuc box

sudo apt install ./bivox_0.2.12_amd64.deb
bivox-ctl doctor        # prints the exact repair commands
# then execute them (copy-paste the block it shows)

Assets

Code-only release per D-022 (models unchanged, v0.2.7 — URL embedded in deb).

Suites at tag: M1 21/21 · M2 9/9 · M3 13/13 · E2E 8/8 · m4 9/9 · refusal 5/5 ·
stress 2/2 (rust) · G2 3/3 · no-dev-paths guard PASS.

Install

Component Package
Engine (code) bivox_0.2.12_amd64.deb (this release)
Models (unchanged, v0.2.7) https://github.com/DirectX/bivox/releases/download/v0.2.8/bivox-models-ru-en_0.2.7_all.deb — already installed if you have any BiVox ≥ 0.2.6
sudo apt install ./bivox_0.2.12_amd64.deb

BiVox v0.2.11 — engine update

Choose a tag to compare

@DirectX DirectX released this 02 Dec 18:52

BiVox v0.2.11 — doctor prints the exact repair command

Follow-up to your v0.2.10 field report: the red tray behaved exactly as
designed
now (models_path: "", honest no unpacked model packs — sudo apt install bivox-models-ru-en, no dev-path leak). The remaining pain was purely
operational: your box has the manifest but not the models dir, and which
models deb to fetch wasn't discoverable on the machine.

Also — my repair instruction in v0.2.10 notes was wrong twice: it told you to
--reinstall models before installing the new code, and on a clean box
bivox-models-ru-en cannot be installed before bivox at all (models
Depends on code). Corrected below and in the notes.

What changed

  • bivox-ctl doctor is now self-healing advice: when a pack is
    NOT UNPACKED, it prints the exact wget URL + apt install --reinstall
    command. The URL is baked into the code package at build time
    (/usr/share/bivox/models.url, maintained by the release pipeline per
    D-022 — every models-shipping release records its download URL in git).
  • Repair order, correctly: one apt call with both debs — apt resolves the
    order itself (models Depends bivox >= 0.2.6, code never depends on models).
  • M2 test launcher now passes dev python explicitly (--python from
    config.toml) — D-023 closed the binary's dev-path defaults, and the test
    had been relying on them (caught by the battery, fixed honestly).

Repair your nuc box (code 0.2.10 already installed — models only)

wget https://github.com/DirectX/bivox/releases/download/v0.2.8/bivox-models-ru-en_0.2.7_all.deb
sudo apt install --reinstall ./bivox-models-ru-en_0.2.7_all.deb
systemctl --user restart bivox-core bivox-hotkey
bivox-ctl doctor   # expect: model pack … ON DISK ✓, worker running, bus bound

(v0.2.11's doctor will print these exact two commands itself once installed.)

Assets

Code-only release per D-022 (models unchanged, v0.2.7 — URL now embedded in
the deb).

Suites at tag: M1 21/21 · M2 9/9 · M3 13/13 · E2E 8/8 · m4 9/9 · refusal 5/5 ·
stress 2/2 (rust) · G2 3/3 · no-dev-paths guard PASS.

Install

Component Package
Engine (code) bivox_0.2.11_amd64.deb (this release)
Models (unchanged, v0.2.7) https://github.com/DirectX/bivox/releases/download/v0.2.8/bivox-models-ru-en_0.2.7_all.deb — already installed if you have any BiVox ≥ 0.2.6
sudo apt install ./bivox_0.2.11_amd64.deb

BiVox v0.2.10 — engine update

Choose a tag to compare

@DirectX DirectX released this 02 Dec 18:21

BiVox v0.2.10 — production binaries contain zero dev paths

Your question — "why on earth is /home/denis/projects/ai/bivox/ at all on a
client machine?"
— exposed an architectural defect that should never have
shipped. You were right to demand it fixed at the root.

What happened (two layers)

  1. The trigger (your box): doctor showed model pack: …ru-en.toml -> NOT UNPACKED ✗ — the manifest file survived but the models directory it
    points to did not (half-installed/broken package). Correct behavior:
    "models missing" → red tray + apt hint.
  2. The defect (my code): scan_models() fell through to a hardcoded
    dev fallback
    <repo>/models, and repo defaulted to
    /home/denis/projects/ai/bivox baked into the binary. So a production
    worker went looking in MY dev checkout — NoSuchFile ×3 → crash-loop →
    slow-retry (v0.2.9) faithfully retried the wrong path forever. The
    slow-retry was healing correctly; it was healing toward a lie.

The fix (D-023 — zero dev literals in shipped binaries)

  • Repo root: derived from the executable's own location (walk-up to the
    directory containing tools/atspi_inject.py), or BIVOX_REPO env in dev
    launchers. /usr layouts resolve to /usr/share/bivox. No absolute path
    is baked in anymore.
  • Python: resolved env → CLI → config worker.python → system
    /usr/bin/python3. The dev conda path now lives ONLY in the dev
    config.toml — production configs never reference it.
  • Worker models: env → manifests (each pack's dir must be actually
    unpacked
    — half-installed = missing) → dev CWD ./models → actionable
    exit 4
    naming bivox-models-ru-en. Never a guessed path.
  • Missing packs ⇒ worker NOT spawned: red tray, tooltip
    ⛔ models missing: sudo apt install bivox-models-ru-en, and the 30 s
    slow-retry re-checks manifests — an apt repair heals without restart.
  • Guard: new tools/no_dev_paths_test.py fails if /home/denis,
    miniconda3, or projects/ai/bivox appears in the shipped binaries
    (toolchain panic-path metadata whitelisted) or if a no-models run doesn't
    name the apt remedy. It runs in every release checklist from now on.

Also

  • core.worker_binary = "" (documented as "empty = default") previously
    produced an EMPTY spawn path — now properly derives
    <repo>/asr-rs/target/release/asr-worker.

Your nuc box — one command

Your models pack is broken (manifest present, dir not unpacked). Reinstall it:

sudo apt install --reinstall ./bivox-models-ru-en_0.2.7_all.deb
# or from the release:
wget https://github.com/DirectX/bivox/releases/download/v0.2.9/bivox-models-ru-en_0.2.7_all.deb  # (linked in v0.2.9 notes)
sudo apt install ./bivox-models-ru-en_0.2.7_all.deb
sudo apt install ./bivox_0.2.10_amd64.deb

After that, bivox-ctl doctor must show model pack: … -> … ON DISK ✓,
worker: asr-worker (rust) running, bus bound, and the tray goes blue
(standby). v0.2.10 will never look in /home/denis again — and if any future
change tries, the guard fails the release.

Assets

Code-only release per D-022 (models unchanged, v0.2.7 linked below).

Suites at tag: M1 21/21 · M2 9/9 · M3 13/13 · E2E 8/8 · refusal 5/5 ·
G2 3/3 · stress 2/2 (rust backend) · no-dev-paths guard PASS.

Install

Component Package
Engine (code) bivox_0.2.10_amd64.deb (this release)
Models (unchanged, v0.2.7) https://github.com/DirectX/bivox/releases/download/v0.2.8/bivox-models-ru-en_0.2.7_all.deb — already installed if you have any BiVox ≥ 0.2.6
sudo apt install ./bivox_0.2.10_amd64.deb

BiVox v0.2.9 — engine update

Choose a tag to compare

@DirectX DirectX released this 02 Dec 15:01

BiVox v0.2.9 — red tray is no longer terminal

Your doctor output diagnosed it precisely: models repaired (0.2.7 on disk,
manifest visible to doctor) — but the tray stayed red forever, and
worker_restarts: 3 with budget exhausted in the journal.

Root cause: three compounding supervisor flaws

  1. Terminal budget. 3 fast crashes → core NEVER respawns again. The budget
    exists to stop tight crash-loops, but it turned every transient failure
    (boot with models missing/broken) into a permanent dead state requiring a
    manual systemctl --user restart bivox-core.
  2. Ready computed once at boot. Your sequence: code 0.2.8 installed →
    core booted while models were still broken (0.2.6's hard dep) → manifest
    scan empty → dev-fallback path → worker NoSuchFile ×3 → budget dead.
    Repairing models afterwards changed NOTHING without a restart.
  3. Indistinguishable red. Tooltip said "models missing" even though models
    were present — the real state was "worker crashing".

Fix (verified on a reproduction of your exact sequence)

  • Budget exhaustion degrades to a slow retry: worker respawned every 30 s,
    and before each attempt core re-reads model manifests + ready state.
    The moment bivox-models-ru-en becomes valid (apt repair, or any fix), the
    next retry resets the budget and connects — no manual restart, ever.
  • Successful bus connect clears slow-retry + resets budget.
  • Tooltip now distinguishes: ⛔ models missing: sudo apt install bivox-models-ru-en
    vs ⛔ worker crashing (last error line), retrying every 30s.
  • bivox-ctl status gained models_path, slow_retry, worker_error;
    doctor verifies the manifest's dir is actually unpacked (ON DISK ✓ /
    NOT UNPACKED ✗) and interprets the degraded state with the exact cause.

Reproduction test: rust worker + bad manifest dir → 3 crashes → "budget
exhausted — slow retry every 30s" → repair manifest → healed in 6 s
(model packs appeared since boot — budget reset → worker bus connected),
zero manual intervention.

Also

  • M2 suite made deterministic (latent since day one): the systemd bivox-core
    service raced the test core for sockets (2 s respawn after pkill), and the
    G fixture's --exit-after 0.8 let the worker exit gracefully right before
    the bus-alive assertion. Now: units stopped/restored around the test,
    fixture holds through the assertion window. 9/9 twice in a row.

Assets

Code-only release per D-022: models payload unchanged (v0.2.7, see install
matrix). If your tray is red right now: do nothing — v0.2.9 heals it
within 30 s of the models becoming valid; or upgrade and it heals instantly.

Suites at tag: M1 21/21 · M2 9/9×2 · M3 13/13 · E2E 8/8 · refusal 5/5 ·
G2 3/3 · stress 2/2 · boot-race recovery verified.

Install

Component Package
Engine (code) bivox_0.2.9_amd64.deb (this release)
Models (unchanged, v0.2.7) https://github.com/DirectX/bivox/releases/download/v0.2.8/bivox-models-ru-en_0.2.7_all.deb — already installed if you have any BiVox ≥ 0.2.6
sudo apt install ./bivox_0.2.9_amd64.deb

BiVox v0.2.8 — engine update

Choose a tag to compare

@DirectX DirectX released this 02 Dec 10:02

BiVox v0.2.8 — endpoint tail fix + focus stickiness refusal

Both issues from your nuc field report (dictation works in gnome-text-editor —
big progress!) are addressed. Code-only release: models unchanged (still
v0.2.6 payload).

1. Last word truncated on auto-commit

Root cause: the Rust worker's endpoint branch drained the mel accumulator
(acc) but not the sub-packet PCM remainder (pcm). The mic delivers
bursty chunks, so when VAD silence fired the endpoint, the final ~160 ms of
speech sat in pcm and never reached the decoder. The Python worker had this
fixed (711cb94) but the Rust port's endpoint path missed it.

Fix: endpoint now runs push_leftover(pcm → acc) before drain_tail, exactly
matching the ctl stop path. Also clears pcm on session start so
leftover speech from a previous session can't leak in as ghost words. G2 parity
re-verified 3/3 (the drain is tail-only; steady-state packets unchanged).

2. Text kept landing in the abandoned editor after switching apps

Root cause: my own v0.2.6 design flaw. The watcher stores last_editable
sticky (deliberately, so moving to a headerbar button doesn't lose the target),
but when you switched to an app with no editable a11y tree (GNOME Terminal,
Nautilus, Electron-without-a11y), the sticky record survived and the
sole-editable fallback re-selected the old editor — writing text where nobody
was looking. A data-safety violation.

Fix: the current focus (last_any) is now decisive. Resolution logic:

  • focus is on an app with an editable tree → target it;
  • focus is on the same app as the sticky editable (transient headerbar/toolbar
    widget) → stay on that app (the original reason for stickiness);
  • focus is on a different app with no editable tree → refuse injection
    (never fall through to state-scan heuristics — that was the leak);
  • no fresh focus events at all (fresh boot, watcher not yet fired) →
    non-decisive, legacy fallback chain runs.

New tools/refusal_test.py (5 cases) locks this against regression — no live
a11y bus needed. E2E 8/8 and M3 13/13 still pass (the test suite clicks into
the editor, so focus is always on an editable target).

3. Doctor: boot-race honesty

Your output showed worker: asr-worker (rust) running but core said
worker down / bus_alive: false — not a contradiction: you ran doctor seconds
after boot, and model load takes ~3.4 s (worker binds the bus after loading).
Doctor now reports LOADING (models ~3s, bus not yet bound) vs
running, bus bound vs NO WORKER RUNNING, so the boot window is unmistakable.

Honest limitation

Injection into Electron apps (VS Code, Chrome, Telegram Desktop) remains
best-effort: they expose unreliable/absent editable a11y trees, so the decisive
refusal above means BiVox will correctly decline rather than guess. The real
fix for those is the uinput blind-diff fallback (D-003 phase 2) — next major
item after this polish settles.

Assets

Component Package
Engine (code) bivox_0.2.8_amd64.deb (this release)
Models unchanged v0.2.6 — see install matrix below (already installed if you have any BiVox ≥ 0.2.6)

Suites at tag: G2 3/3 · M1 21/21 (rust, G4) · M3 13/13 · E2E 8/8 · refusal 5/5 · M2 9/9.

4. Packaging fix — models dependency (D-022 root-cause)

While testing you hit a genuine bug in my release policy, not just the app:

bivox-models-ru-en : Depends: bivox (= 0.2.6) but 0.2.8 is to be installed

The shipped models_0.2.6 carried a hard Depends: bivox (= 0.2.6) (built
before I loosened it), and my permanent cross-release link pointed at exactly
that file — so any clean install of new code + old models failed, and anyone
who upgraded code to 0.2.8 got a broken models package.

Three compounding mistakes, all fixed:

  1. Hash-gate measured only the ONNX payload, not package metadata. A
    = → >= change alters the .deb but the gate saw "UNCHANGED" — pinning the
    broken build forever. Gate now hashes payload + control + manifest.
  2. Models version was static. Even a rebuild wouldn't raise the number, so
    apt saw no upgrade. Now the gate auto-bumps the last component
    (0.2.6 → 0.2.7) whenever the package hash changes.
  3. Metadata lived inline in the build script (invisible to hashing). Moved
    to tracked packaging/models.control.in + packaging/models.manifest.toml.

This release therefore ships both bivox_0.2.8_amd64.deb and
bivox-models-ru-en_0.2.7_all.deb (the corrected dependency). Verified with
apt install --dry-run of the two together: solves cleanly, no conflict.

Install

Component Package
Engine (code) bivox_0.2.8_amd64.deb (this release)
Models (dependency-fixed) bivox-models-ru-en_0.2.7_all.deb (this release)
# fresh install
sudo apt install ./bivox_0.2.8_amd64.deb ./bivox-models-ru-en_0.2.7_all.deb

# already have models 0.2.6 from an earlier install? repair the broken dep:
sudo apt install ./bivox-models-ru-en_0.2.7_all.deb   # bumps 0.2.6 -> 0.2.7 (>= bivox 0.2.6)
sudo apt install -f                                   # if apt flagged bivox-models-ru-en broken

Models 0.2.7 installs alongside any BiVox code ≥ 0.2.6, so future
code-only releases won't break it again.

Suites at tag: G2 3/3 · M1 21/21 (rust, G4) · M2 9/9 · M3 13/13 · E2E 8/8 ·
refusal 5/5 · apt dry-run solve rc=0 for code 0.2.8 + models 0.2.7.

BiVox v0.2.6 — focus resolution overhaul

Choose a tag to compare

@DirectX DirectX released this 02 Dec 05:18

BiVox v0.2.6 — focus resolution overhaul

Your nuc doctor output finally cracked the last layer: the whole pipeline
works (ASR committed "Раз, два, три, четыре, пять. Вышел зайчик погулять.",
rust worker healthy, editor present on the a11y bus) — but the injector's
auto-resolution returned focused app = '' on BOTH boxes.

Root cause (confirmed by experiment, not guesswork)

On GNOME 50 / GTK4 stacks, client apps frequently never expose
STATE_FOCUSED/STATE_ACTIVE
on their frames or widgets — verified locally:
even a freshly-launched gnome-text-editor (WM-given focus) shows
frame[showing] only, grabFocus via AT-SPI errors out, and Shell's
Introspect.GetWindows is access-denied. Focus events do fire on real
transitions, but only while the keyboard focus actually moves — a session
started after the user already switched to the editor sees nothing, because
the event was consumed before the patcher spawned. State-polling is simply
blind on this stack.

What v0.2.6 changes

  1. Persistent focus watcher (atspi_inject.py --watch): spawned by core
    at boot (when autostart_patcher is on), supervised & respawned on death.
    It captures every focus / object:state-changed:focused EVENT into
    $XDG_RUNTIME_DIR/bivox/focus.json (atomic replace, last_editable is
    never clobbered by non-edit focus moves). The injector now reads this
    fresh record FIRST — so clicking into an editor at ANY time before
    Right-Alt makes that editor the target. This is the architecture fix:
    events are reliable, states are not.
  2. Guaranteed pin target: autostart_patcher = "gnome-text-editor" (or
    any app name) resolves via find_app() + find_editable() with NO focus
    detection at all — verified working on both stacks. The ambiguity error
    message now prints this as the copy-paste fix.
  3. --probe mode: atspi_inject.py --probe dumps the single-pass a11y
    scan (frames/states/editable presence), shell's own focus node, and the
    watcher file state — one command to diagnose any future resolution issue.
  4. Single-pass scanner (scan_apps()): depth 35 (gnome-text-editor's
    SourceView nests ~27 deep — the old depth-9/600-budget probes literally
    could not reach the text widget), one walk per app collecting frames +
    editable-presence + focused-edit; ~1.7 s per full scan, reused by all
    three resolution paths instead of O(n·m) re-walks.
  5. Injector auto-loop bounded to ≤2 scans / ≤6 s (was: unbounded re-polling
    that could hang a session's injection leg for its whole lifetime).

Workaround available TODAY (before upgrading)

Set in /usr/share/bivox/config.toml:

autostart_patcher = "gnome-text-editor"

then systemctl --user restart bivox-core. Dictation will append into the
focused gnome-text-editor window regardless of focus detection. (Other apps:
put their a11y name — see bivox-ctl doctor / --probe output.)

Honest status

  • Watcher + pin + probe all verified on dev; live keyboard-focus capture
    could not be verified here
    because the dev screen is currently locked
    (shell holds modal focus — no client events). The nuc box is the test
    ground: after upgrade, click into the editor once, press Right-Alt — the
    watcher file makes it stick. If it still misses, --probe output will
    show exactly which link is cold.
  • Electron apps remain best-effort (their a11y trees are the problem, not
    focus); GNOME Terminal still refuses by design.

Assets

Asset Size
bivox_0.2.6_amd64.deb 7.9 MB
bivox-models-ru-en_0.2.6_all.deb 499 MB

Suites at tag: M3 13/13 · E2E 8/8 · M1 21/21 · M2 9/9.

BiVox v0.2.5 — root-shell install fix & honest doctor

Choose a tag to compare

@DirectX DirectX released this 01 Dec 18:28

BiVox v0.2.5 — root-shell install fix, honest doctor logs

Your doctor output on the fresh 0.2.4 install decoded the remaining mystery:

1. Nothing was running — postinst skipped the desktop session

Evidence: v0.2.3's message printed usermod -aG input root → your install ran
from a root shell with no SUDO_USER. My service-activation block was
guarded by [ -n "$SUDO_USER" ] → skipped entirely; the XDG autostart enabler
only fires at next login. Fix: postinst now resolves the desktop user as
${SUDO_USER:-owner of the active /run/user/<uid>} and activates
bivox-core/bivox-hotkey in that session regardless; on failure it prints
the exact one-line remedy.

2. Stale worker errors looked like the boot bug was back

worker.out still showed NoSuchFile: /home/denis/projects/ai/bivox/models/...
— those were v0.2.2-era lines: supervisors open logs in append mode with
no separator, so doctor's tail mixed past and present. Fixed three ways:

  • every supervised spawn writes a timestamped === [<stamp>] spawn <cmd> ===
    separator line;
  • doctor tails only the last run block (stale-proof, with fallback for
    pre-0.2.5 logs);
  • doctor gained a journalctl section (timestamped systemd truth: last 2
    lines per unit) — immune to any log-file staleness.

3. Actionable doctor

When core is unreachable, doctor now ends with the copy-paste remedy:
systemctl --user enable --now bivox-core bivox-hotkey (+ the root-shell
caveat). Injector auto-mode focus wait bumped 2→3 s (fresh sessions where the
editor registers late).

Verified on your machine's data

  • rust worker running (v0.2.4 boot fix effective), model pack discovered,
  • gnome-text-editor present on the a11y bus (self-heal worked) — restart it
    once after install if it was opened earlier, then dictation lands,
  • packaged worker reproduces G2 text parity exactly (28 partials + final).

Assets

Asset Size
bivox_0.2.5_amd64.deb 7.9 MB
bivox-models-ru-en_0.2.5_all.deb 499 MB

Suites at tag: M1 21/21 · M2 9/9 · E2E 8/8 · packaged parity PASS.

BiVox v0.2.4 — boot-models fix & postinst polish

Choose a tag to compare

@DirectX DirectX released this 01 Dec 17:44

BiVox v0.2.4 — boot-models bug, postinst dedup & $SUDO_USER

Your doctor output decoded the last blocker exactly:

1. Worker died at boot, recovered on respawn — fixed (the real bug)

log worker.out showed: models loaded in 2.9s after
NoSuchFile: /home/denis/projects/ai/bivox/models/onnx/...stream_frontend.onnx.
Cause: core's initial spawn passed no --models, while the restart
path did — so the first worker fell back to the hardcoded dev path, died, and
the supervisor respawned it correctly (~2.9 s of dead ASR at every boot).
Fix: single worker_extra_args() helper — always explicit --models from
the manifest-resolved path; boot spawn logs its resolved models dir for
visibility. Python worker accepts --models as a no-op (torch loads from HF
cache), so both backends stay compatible.

2. Postinst message fixes

  • Duplicate GTK-editor guidance block — removed (was pasted twice).
  • sudo usermod -aG input root — $USER is root under sudo; now
    ${SUDO_USER:-$USER} → prints your real login.
  • bivox-ctl doctor promoted to its own bullet; added the reminder that
    apps opened before install are invisible to AT-SPI until restarted.

3. Doctor hint trimmed

(injectable: GTK editors/apps; Electron — best-effort; GNOME Terminal refuses synthetic input by design.) — replaced the stale line that
contradicted itself by listing Terminal* as injectable.

Status of your second machine (from your paste)

  • rust worker: running (the earlier "NO WORKER" was doctor's 15-char
    comm truncation bug, fixed in v0.2.3)
  • a11y bridge: healthy, 14 apps on the bus, model pack discovered
  • gedit/GNOME Text Editor absent from the app list → it was launched
    before the a11y flip; restart it once (or log out/in) and dictation lands.
    VS Code/Chrome/Telegram in the list are Electron — best-effort only.

Assets

Asset Size
bivox_0.2.4_amd64.deb 7.9 MB
bivox-models-ru-en_0.2.4_all.deb 499 MB

Suites at tag: M1 21/21 (python) · M1 21/21 (rust, G4) · M2 9/9 · E2E 8/8.