fix(label): handle sensitive condenser mics in YOU detection#17
Merged
pretyflaco merged 1 commit intomainfrom May 5, 2026
Merged
fix(label): handle sensitive condenser mics in YOU detection#17pretyflaco merged 1 commit intomainfrom
pretyflaco merged 1 commit intomainfrom
Conversation
The dual-channel YOU/REMOTE labeling in _label_speakers_from_channels declares a speaker as YOU only if their mic-channel-energy ratio exceeds 0.5. Sensitive condenser mics (e.g. RODE NT-USB) pick up enough room audio that the local speaker's ratio sits below 0.5 even though they are clearly the most mic-dominant — so YOU never gets assigned and the local speaker becomes a REMOTE_X. Add a relative-margin check alongside the absolute one: if the top candidate's ratio is more than 0.1 above the average of all other speakers' ratios (and absolute ratio > 0.15 to avoid silent edge cases), assign YOU. Log the margin and average for debugging. Test: synthesize a 3-segment stereo WAV where the local speaker has ratio ~0.4 (below 0.5) but average of other speakers is ~0.05; assert YOU is assigned via the margin path. All 5 TestLabelSpeakersFromChannels tests pass.
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.
Summary
The dual-channel
YOU/REMOTElabeling in_label_speakers_from_channelsdeclares a speaker asYOUonly if their mic-channel-energy ratio exceeds 0.5. Sensitive condenser mics (e.g. RODE NT-USB) pick up enough room audio that the local speaker's ratio sits below 0.5 even though they are clearly the most mic-dominant — soYOUnever gets assigned and the local speaker becomes aREMOTE_X.Changes
YOU.Tests
test_sensitive_condenser_mic_assigns_you_via_margin: synthesizes a 3-segment stereo WAV where the local speaker has ratio ~0.4 (below 0.5) but the average of other speakers' ratios is ~0.05. AssertsYOUis assigned via the margin path.TestLabelSpeakersFromChannelstests still pass.