feat(meeting): meeting-tuned diarization defaults (fix under-segmentation) - #37
Merged
Merged
Conversation
…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>
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.
Why
The
meeting_bridgebuilt its Speechmatics session from a bareAmbientConfig(), 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:
MEETING_PREFER_CURRENT_SPEAKERfalsetrueif a room over-splits.MEETING_SPEAKER_SENSITIVITY0.6none⇒ defer to the SDK.config.py: two fields +_env_bool/_env_float_or_nonehelpers mirroringambient_bridge/config.py.session.py: mapped into the existingactive_prefer_current_speaker/active_speaker_sensitivityfields thatambient_bridge/active_session.py:_diar_kwargsalready consumes (it omitsNone, soFalsepasses through explicitly andNonesensitivity is dropped).ActiveSessionstubbed; built against the realAmbientConfig, so a wrong field name wouldTypeError).deploy/meeting.env.example,CONTRACTS.md§1c.Meeting-bridge only — does not touch the ambient bridge.
Verification
--no-cache) clean,compileallclean.speaker_sensitivity=0.6confirmed valid against Speechmatics docs (0–1, and 0.6 is their own docs example).Notes
🤖 Generated with Claude Code