Skip to content

feat(diar): min-cut-interval to suppress spurious rapid turn cuts#4

Merged
m5d215 merged 1 commit into
mainfrom
feat/diar-min-cut-interval
Jun 25, 2026
Merged

feat(diar): min-cut-interval to suppress spurious rapid turn cuts#4
m5d215 merged 1 commit into
mainfrom
feat/diar-min-cut-interval

Conversation

@m5d215

@m5d215 m5d215 commented Jun 25, 2026

Copy link
Copy Markdown
Owner

What

Don't fire a turn boundary within 1.5s of the previous cut (and don't update
the tracked speaker while suppressed). A short cross-talk excursion is absorbed
when the original speaker returns before the interval elapses. Debounce already
guards single-update flicker; this guards rapid real flips and diarizer
flicker.

Why / validation

Same-audio A/B — the production build (no min-cut) vs this — over a full day of
real calls:

  • sub-1.5s inter-boundary gaps: 14% → 0%
  • diarizer flicker no longer chops a single speaker's phrase into a tiny
    standalone record (observed: a phrase that production cut into its own 5-char
    record stays attached to its sentence here)
  • normal turns (>1.5s apart) unaffected

Honest caveat

This does not move the overall share of ≤5-char records. Measurement shows
those are mostly SpeechAnalyzer-side short finals, not diarizer over-cuts —
trimming them is a separate lever (the Transcriber min-length filter), not in
scope here. So this is a clean, low-risk quality fix (removes spurious
fragmentation, no downside on normal turns) rather than a fix for the
micro-fragment count.

minCutInterval is a single tunable constant in SpeakerSegmenter.

Test plan

  • swift build clean
  • make install, production app runs with it
  • full-day same-audio A/B vs the no-min-cut production build

Don't fire a turn boundary within 1.5s of the previous cut (and don't update
the tracked speaker while suppressed). A short cross-talk excursion is absorbed
when the original speaker returns before the interval elapses; debounce already
guards single-update flicker, this guards rapid real flips.

Same-audio A/B (production build without it, vs this): sub-1.5s inter-boundary
gaps drop 14% -> 0%, and diarizer flicker no longer chops a single speaker's
phrase into a tiny standalone record. Normal turns (>1.5s apart) are unaffected.

Note: this does NOT move the overall share of <=5-char records — measurement
shows those are mostly SpeechAnalyzer-side short finals, not diar over-cuts.
Trimming those is a separate lever (the Transcriber min-length filter). Doc
updated to record the finding.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@m5d215
m5d215 merged commit 375e32c into main Jun 25, 2026
2 checks passed
@m5d215
m5d215 deleted the feat/diar-min-cut-interval branch June 25, 2026 10:19
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