Skip to content

feat(meeting): meeting-tuned diarization defaults (fix under-segmentation) - #37

Merged
WingedGuardian merged 1 commit into
mainfrom
feat/meeting-diarization-tuning
Jul 14, 2026
Merged

feat(meeting): meeting-tuned diarization defaults (fix under-segmentation)#37
WingedGuardian merged 1 commit into
mainfrom
feat/meeting-diarization-tuning

Conversation

@WingedGuardian

Copy link
Copy Markdown
Owner

Why

The meeting_bridge built its Speechmatics session from a bare AmbientConfig(), inheriting the ambient bridge's near-field anti-over-split diarization posture (prefer_current_speaker=True, speaker_sensitivity=None). On the first real multi-speaker capture this under-segmented — the transcript collapsed into long merged mega-turns.

What

Give the meeting bridge its own diarization knobs with meeting-appropriate defaults (segment more), env-tunable per room:

Env Default Effect
MEETING_PREFER_CURRENT_SPEAKER false Allow re-attributing to a different speaker at a boundary instead of sticking with the current one. Set true if a room over-splits.
MEETING_SPEAKER_SENSITIVITY 0.6 Higher ⇒ splits new speakers more readily (Speechmatics range 0–1, SDK default 0.5). Blank/none ⇒ defer to the SDK.
  • config.py: two fields + _env_bool / _env_float_or_none helpers mirroring ambient_bridge/config.py.
  • session.py: mapped into the existing active_prefer_current_speaker / active_speaker_sensitivity fields that ambient_bridge/active_session.py:_diar_kwargs already consumes (it omits None, so False passes through explicitly and None sensitivity is dropped).
  • Tests: config defaults/overrides/None-sentinels + a factory-wiring test proving both values reach the built session (ActiveSession stubbed; built against the real AmbientConfig, so a wrong field name would TypeError).
  • Docs: README config table, deploy/meeting.env.example, CONTRACTS.md §1c.

Meeting-bridge only — does not touch the ambient bridge.

Verification

  • ruff (--no-cache) clean, compileall clean.
  • 42 meeting-bridge tests pass (config + session + server + vad).
  • speaker_sensitivity=0.6 confirmed valid against Speechmatics docs (0–1, and 0.6 is their own docs example).
  • Diff: +147, 0 deletions.

Notes

  • The defaults are a first calibration from one noisy real capture — direction is strongly indicated (inherited ambient tuning under-splits meetings), but the exact values are meant to be refined on real captures via the env knobs (no redeploy needed).
  • Won't fix ASR garbling from room-capture audio quality — that's an input-audio limit, separate from diarization.

🤖 Generated with Claude Code

…tion)

The meeting bridge built its Speechmatics session from a bare AmbientConfig,
inheriting the ambient bridge's near-field anti-over-split diarization posture
(prefer_current_speaker=True, speaker_sensitivity=None). Real multi-speaker
meetings under-segmented into merged mega-turns as a result.

Give the meeting bridge its own diarization knobs with meeting-appropriate
defaults that segment more, env-tunable per room:
- MEETING_PREFER_CURRENT_SPEAKER (default false) — allow re-attributing to a
  different speaker at a boundary instead of sticking with the current one.
- MEETING_SPEAKER_SENSITIVITY (default 0.6) — lean toward splitting a new
  speaker (Speechmatics range 0-1, default 0.5). Blank/none defers to the SDK.

Mapped through session.py into the existing active_prefer_current_speaker /
active_speaker_sensitivity fields that _diar_kwargs already consumes. Adds
_env_bool / _env_float_or_none helpers mirroring ambient_bridge/config.py.
Tests cover the config defaults/overrides/sentinels and prove the values reach
the built session (factory wiring, ActiveSession stubbed). Docs updated
(README, meeting.env.example, CONTRACTS 1c).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@WingedGuardian
WingedGuardian merged commit 5356a3d into main Jul 14, 2026
4 checks passed
@WingedGuardian
WingedGuardian deleted the feat/meeting-diarization-tuning branch July 14, 2026 02:42
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