Repository navigation
Description
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.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn review
Activity
fix(backend): don't overwrite colliding VAD segment exports from dist…
undivisible commentedon Oct 15, 2026
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.