Zero-vote re-embed: prefer a non-incumbent speaker on weak margins - #948
Open
robertozoia wants to merge 1 commit into
Open
robertozoia wants to merge 1 commit into
robertozoia wants to merge 1 commit into
Conversation
A zero-vote run is, by construction, speech the segmentation model put in a different local slot from the neighbouring speech that did get votes in the same windows. Re-embedding a ~1 s span is often near-uninformative (cosines 0.07 vs -0.06), and closest-centroid then hands the run back to the surrounding speaker — e.g. a guest's "I'm thrilled to be here" between two host turns. Assignment now excludes the clusters active within 1.5 s on either side of the run unless one of them beats the best other cluster by a cosine margin of 0.25. Strong matches (e.g. 0.66 vs 0.12) are unaffected.
Member
|
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.
Problem
A zero-vote run (speech whose local slot got no embedding in any window) is re-embedded and assigned to the closest centroid "regardless of margin". For a ~1 s interjection the span embedding is often near-uninformative — e.g. cosines [0.066, −0.064] on a real two-person interview — so the run is handed back to the surrounding speaker, which is exactly the outcome the pass exists to avoid ("silently absorbing whole speaker turns into the surrounding speaker's segment").
Observation
By construction a zero-vote run is speech the segmentation model put in a different local slot from the neighbouring speech that did get votes in the same windows. So the clusters active just before/after the run are unlikely owners, and that structural evidence is stronger than a coin-flip cosine.
Change
ZeroVoteReembedder.incumbentClusters(around:perFrameClusters:frameDuration:lookaroundSeconds:)collects the clusters selected within 1.5 s on either side of the run;assignment(embedding:centroids:excluding:incumbentMargin:)only lets an incumbent win when its cosine beats the best non-incumbent by ≥ 0.25. With every cluster incumbent (run between two different speakers) or a strong match, behaviour is unchanged. The log line now includesincumbents [...].Evidence
Real audio, ~80 min (four host+guest interviews, one four-person panel):
Happy to add a unit test for
assignment(excluding:)if you'd like it in.