Skip to content

feat(speaker): add linear decay to speaker attribution#27

Merged
odsod merged 1 commit into
mainfrom
speaker-decay
Jun 15, 2026
Merged

feat(speaker): add linear decay to speaker attribution#27
odsod merged 1 commit into
mainfrom
speaker-decay

Conversation

@odsod

@odsod odsod commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Speaker detection relies on Google Meet's CSS indicator which only fires in brief 2-3s pulses with median 6.7s gaps — covering ~24% of actual speaking time
  • Whisper segments falling in indicator-off gaps get no attribution (55% of sys lines unattributed today)
  • Add configurable linear decay: when indicator goes off, speaker weight decays 1.0 → 0.0 over decayDurationS seconds
  • Coverage() integrates the decay weight function (trapezoid area) instead of binary on/off
  • DecayDuration=0 preserves existing binary behavior (no-op path)
  • Expected to raise sys attribution from ~45% to ~75-80%

Test plan

  • Existing binary coverage tests pass unchanged
  • 7 new decay-specific tests (mid-decay, beyond-decay, reactivation, two-speaker stagger, threshold filtering, pre-window decay, zero-equivalence)
  • mise run build passes (lint, test, tidy, binary)
  • Manual: run recorder with "decayDurationS": 10 during next meeting, compare attribution rate

Speaker detection relies on Google Meet's CSS speaking indicator, which
fires in brief 2-3s pulses with median 6.7s gaps — only ~24% of actual
speaking time is covered. Whisper segments falling in indicator-off gaps
get no attribution (55% of sys lines today).

Add a configurable linear decay model: when the indicator goes off, the
speaker's weight decays from 1.0 to 0.0 over `decayDurationS` seconds.
Coverage() integrates the weight function (trapezoid area) rather than
binary on/off time.

- DecayDuration=0 preserves existing binary behavior (no-op path)
- New config field: `speaker.decayDurationS`
- Expected to raise sys attribution from ~45% to ~75-80%
@odsod odsod merged commit 9fcecee into main Jun 15, 2026
1 check passed
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