Skip to content

Sync VAD overwrites distinct WAL audio when speech starts at the same timestamp #20686

Closed

Description

@chinokikiss

Core audio loss before transcription

backend/utils/sync/pipeline.py::retrieve_vad_segments() uses only the absolute
speech-start timestamp for a VAD export's filename. Two distinct accepted WAL
sources in the same job can therefore overwrite each other before STT.

Synthetic reproduction on main ffeb8a132cba0f969b65071a065bd617bed59ba7:

Source Capture start VAD speech Samples Expected output
audio_omi_pcm16_16000_1_1710000000.wav T 1–3 seconds PCM16 value 1000 32,000 frames, start T+1
audio_omi_pcm16_16000_1_1710000001.wav T+1 0–4 seconds PCM16 value 2000 64,000 frames, start T+1

Both currently export to <job>/1710000001.wav. The later write destroys the
earlier bytes, the shared path set has one entry, and the source-frame mapping
collides. The actual _run_sync_vad_phase() then cleans up both originals and
continues with only one segment. The same loss reproduces in either sequential
order, so a particular thread schedule is not required.

The regression uses real WAV read/slice/write and the real concurrent VAD phase;
only the VAD provider result and executor dispatch are isolated. It fails on main
in all three collision cases. Per-source export directories preserve both files,
their exact sample values/frame counts and source offsets. Numeric segment
basenames and durable content identities can remain unchanged.

Impact: loss of an affected capture shard before transcription. Production
incidence is unknown; this report does not claim every sync is affected.

Overlap audit: 91 scoped open PRs, with patches examined for 10 touching sync
modules. #20659 adds timing instrumentation; #20662 bounds resources and handles
export failures but still uses the timestamp-only path. Neither repairs this
collision. No duplicate issue/PR for this precise failure was found in those
queries; current main and relevant heads will be checked again before submission.

Bounty proposal

@josancamon19 @kodjima33 — proposing US$100 for the separate, demonstrated
core audio-loss repair and regression evidence. This is a proposed amount, not
an existing funded bounty or standard rate. Approval, eligibility and payment
depend on the maintainers and merge under the
contribution guide.
If approved, payment details will be supplied privately through its PayPal process.

Disclosure: prepared with an AI assistant for @chinokikiss. A fix and regression
tests will be submitted as a draft PR; full repository validation on this Windows
host remains limited by the check harness.

Fix submitted in #20688, with 402 affected-suite tests passing and the same three
collision cases failing on unchanged main. The PR remains a draft pending complete
canonical validation; upstream workflows currently require maintainer action.

Activity

  1. added
    captureLayer: Audio recording, device pairing, BLE
    p3Priority: Backlog (score <14)
    p1Priority: Critical (score 22-29)
    and removed
    captureLayer: Audio recording, device pairing, BLE
    p3Priority: Backlog (score <14)
    on Oct 6, 2026
  2. undivisible commented on Oct 15, 2026

    @undivisible
    Collaborator

    Already fixed on main: PR #20936 adds locked collision-safe VAD path reservation; main has the lock wiring and regression test for distinct sources.

    Closing. Reopen if you still see it on the latest build.

  3. moved this from In progress to In review in omi TODO / bountieson Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    captureLayer: Audio recording, device pairing, BLEp1Priority: Critical (score 22-29)

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions