Repository navigation
perf(batch): skip GPU work on silence and single-speaker audio - #22358
Merged
Merged
Conversation
Diarize only padded VAD and word evidence, mapped back to capture clocks, and take the existing skipped_single result for one short contiguous utterance. Both decisions are ship-on kill switches (BATCH_PIPELINE_DIARIZE_SPEECH_ONLY_ENABLED, BATCH_PIPELINE_SHORT_SPEECH_SINGLE_ENABLED). ASR input and words are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
- Short single-speaker skip ships off: unset env and Helm default are false; enable only after a paired prod-revision qualification (documented). - Dense (>80% kept) fallback now records omi_fallback_total with reason=kept_over_80pct; error fallbacks keep reason=other. - Docs and code agree: pauses up to 0.5 s (inclusive) join a short region. - Prometheus counters for diarization decisions, unit vs diarized seconds, and compacted results with unassigned words. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level
added a commit
that referenced
this pull request
Oct 19, 2026
…ker-gpu Compose flight packing with speech-only diarization. When speech-only is on, the compacted waveform keeps its serial pyannote apply: there is no full-unit packed embedding or cached segmentation, and the uncached get_embeddings hook uses the per-file shared trunk only. Packed segmentation still feeds VAD. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 19, 2026
Git-on-my-level
added a commit
that referenced
this pull request
Oct 19, 2026
…and GPU paired-run gates (#22426) * feat(parity): contract (j) parity gate, (h) soak checks, F6 corpus and GPU paired-run gates Lane 5 of the legacy-retire swarm (M1 slice): - scripts/parity/parity_gate.py: rows 1-8 of contract (j) on --surface staging and --surface prod-shadow (rows 3-6 gate ladder ADVANCE), parity_report.json, PARITY_PASS/FAIL/PENDING last line, data_loss for rows 5/7 (ROLLBACK_ZERO). - scripts/parity/soak_check.py: the ten 12h legacy-dark soak checks; the lost-recording census must start at draining; all four legacy queues including sync-backfill-fresh; read-only live collectors. - scripts/parity/fleet_sample.py: rows 3/4 from the fleet gate's JSON sample (strict 121s dispatch breach) and the gate's data-loss tokens. - testing/quality_corpus: pinned public corpus (AMI/LibriSpeech/VoxConverse + silence), production-chain runner, scorer, and the paired runs gating #22368 (flight batching: qualify receipt re-verified plus chain pair) and #22358 (short-speech skip: fired units vs full diarizer), with an L4 Job template for staging. No GCP access in tests; reports carry aggregates and opaque keys only. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(parity): load scipy/jiwer at import so timed unit calls stay under the CPU guard Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
What
The batch GPU worker ran pyannote diarization over the whole unit, silence included (
diarizer/batch_pipeline.py,self.diarize(state['samples'])). Meanwhile ASR already saw only padded VAD windows, and silence-only units already skipped both stages. Diarization is the main GPU cost per unit. This PR changes only the decision of whether, and on which samples, diarization runs. Batching, ASR and VAD are untouched.BATCH_PIPELINE_DIARIZE_SPEECH_ONLY_ENABLEDis a ship-on kill switch (Helmworker.diarizeSpeechOnlyEnabled).omi_fallback_total{component="vad",from="batch_speech_only_diarization"}:reason="kept_over_80pct",outcome="recovered";reason="other",outcome="degraded".omi_batch_pipeline_diarization_decisions_total{decision}: one count per decision.omi_batch_pipeline_diarization_audio_seconds_total{kind=unit|diarized}: unit seconds against diarized seconds, which gives the measured retained fraction in prod.omi_batch_pipeline_compacted_unassigned_{units,words}_total: compacted results where a diarizer gap inside a retained piece leaves words with no turn.BATCH_PIPELINE_SHORT_SPEECH_SINGLE_ENABLED(Helmworker.shortSpeechSingleEnabled=false). Onlytrueturns it on, so an unset env means off.skipped_singleSPEAKER_00payload plussingle_evidence: short_speech. Pauses of at most 0.5 s (inclusive) join; a longer pause splits.3533c8cf8e369892e6b79ff1bf80f7b0286a54ee. The run must show the full diarizer returning a single speaker on the gate's own evidence (VAD plus words), including two bursts at most 0.5 s apart.outcome: silence. The strict-speech guard is untouched (worker_silencedisposition andno_recoverable_speechpaths). Nothing new can mark speech-bearing audio as silence.New pure module:
utils/batch_pipeline/diarization_gate.py. The flags are registered inconfig/feature-flags.yaml, the deployment classification and the chart. Docs:diarizer/batch_pipeline_runtime.mdanddocs/listen_pusher_pipeline.mdx.Equivalence evidence
Transcript. By construction, ASR inputs, words, word clocks and
speech_spansare identical with either switch on or off. Unit testtest_sparse_unit_diarizes_speech_only_with_identical_words_and_asrasserts identical ASR calls and an identicalwordspayload. It also asserts that every word midpoint falls inside a mapped turn.Speaker labels: public AMI fixtures.
8a52737, which is not prod's3533c8c. VAD uses the prod construction (min_duration_on/off=0). Runs were on MPS (M5) at nice 19, comparing the full-unit path against the speech-only path. Fixtures insert -55 dBFS noise gaps to imitate wearable capture.assign_wordslabels only words, so the rise does not reach transcript labels.Short single-speaker skip (shipped off). We built 357 isolated AMI excerpts of 1–3 s inside 28 s of quiet. Of these, 223 qualified for the skip. On the full path, pyannote returned more than one speaker on 0 of 223 (reference had 2 or more speakers on 50 of them). On those excerpts the skip changed no word label relative to the full path: 0 of 1,796 pseudo-words were off the full-path majority. This does not qualify the skip for prod, for three reasons:
That is why the switch ships off.
GPU-time estimate (estimate, from code structure)
Verification
tests/unit/test_batch_pipeline_diarization_gate.py: 40 tests covering the pure gate, a 25-seed property test that every evidence sample is retained and maps back exactly, worker integration, fallbacks, fatal CUDA still fencing the chain, the short-single skip, silence, and the kill switches.tests/unit/test_batch_pipeline_worker.py: the existing suite is pinned to the full-stage path.tests/unit/test_batch_pipeline_chart.py: chart defaults and the false render.bin/omi-heavywithnice -n 19.scripts/check_feature_flag_registry.pyand the line-count ratchet are OK./Volumes/Ephemeral/scratch/opus-silence-skip/(local workspace record).Rollback: set Helm
worker.diarizeSpeechOnlyEnabled=false. The short-single skip is already off.Review (Grok, FIX-FIRST) is addressed in the merge commit: short-single now defaults off in both code and Helm, the dense fallback is counted, the pause boundary is documented as inclusive, and the Prometheus counters above are added. The branch was merged with origin/main (#22352), not rebased.
Product invariants affected
none
🤖 Generated with Claude Code