Repository navigation
feat(pipeline_v2): optional dense embedding (sub-window per segment) - #25
Merged
Merged
Conversation
Add PipelineConfig.embed_window_secs: Option<f32>. When Some(w), each primary segment is split into overlapping w-second sub-windows (hop w/2) before embedding, so a speaker run yields several embeddings (like the legacy pipeline's dense windows) instead of one — more robust centroids, lower confusion. Pure compute, no extra model weights. Measured on v2+AHC (collar 0.25 macro): VoxConverse-30 16.4% → 14.7% (confusion 12.1 → 9.7), and it beats legacy on overlap-heavy AMI. w=1.5 is the sweet spot (1.0 over-fragments → worse). It does not overtake legacy on clean VoxConverse (13.5%) and slightly hurts VBx on AMI, so it is opt-in (None default = unchanged, one embedding per segment). Wired through the v2 builder, `polyvoice diarize --v2 --embed-window <secs>`, and `polyvoice-bench --embed-window`. Breaking: PipelineConfig gained a field (add embed_window_secs: None or use ..default()). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Merged
ekhodzitsky
added a commit
that referenced
this pull request
Jul 31, 2026
…25) Add PipelineConfig.embed_window_secs: Option<f32>. When Some(w), each primary segment is split into overlapping w-second sub-windows (hop w/2) before embedding, so a speaker run yields several embeddings (like the legacy pipeline's dense windows) instead of one — more robust centroids, lower confusion. Pure compute, no extra model weights. Measured on v2+AHC (collar 0.25 macro): VoxConverse-30 16.4% → 14.7% (confusion 12.1 → 9.7), and it beats legacy on overlap-heavy AMI. w=1.5 is the sweet spot (1.0 over-fragments → worse). It does not overtake legacy on clean VoxConverse (13.5%) and slightly hurts VBx on AMI, so it is opt-in (None default = unchanged, one embedding per segment). Wired through the v2 builder, `polyvoice diarize --v2 --embed-window <secs>`, and `polyvoice-bench --embed-window`. Breaking: PipelineConfig gained a field (add embed_window_secs: None or use ..default()). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ekhodzitsky
added a commit
that referenced
this pull request
Jul 31, 2026
…25) Add PipelineConfig.embed_window_secs: Option<f32>. When Some(w), each primary segment is split into overlapping w-second sub-windows (hop w/2) before embedding, so a speaker run yields several embeddings (like the legacy pipeline's dense windows) instead of one — more robust centroids, lower confusion. Pure compute, no extra model weights. Measured on v2+AHC (collar 0.25 macro): VoxConverse-30 16.4% → 14.7% (confusion 12.1 → 9.7), and it beats legacy on overlap-heavy AMI. w=1.5 is the sweet spot (1.0 over-fragments → worse). It does not overtake legacy on clean VoxConverse (13.5%) and slightly hurts VBx on AMI, so it is opt-in (None default = unchanged, one embedding per segment). Wired through the v2 builder, `polyvoice diarize --v2 --embed-window <secs>`, and `polyvoice-bench --embed-window`. Breaking: PipelineConfig gained a field (add embed_window_secs: None or use ..default()).
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.
What
Adds opt-in dense embedding for pipeline v2:
PipelineConfig.embed_window_secs: Option<f32>(CLI--v2 --embed-window <secs>, bench--embed-window).Some(w)slides aw-second window (hopw/2) inside each primary segment so a speaker run produces several embeddings — like the legacy pipeline's dense windows — instead of one. More embeddings per speaker → more robust centroids → lower confusion. Pure compute, no extra model weights.Why — measured (collar 0.25, macro DER)
The triangle (legacy / v2+AHC / v2+VBx) showed legacy wins clean VoxConverse largely because of its dense sliding-window embeddings (confusion 5.9 vs v2's 12.1). This closes that gap for v2.
w = 1.5is the sweet spot —1.0over-fragments (18.7%, worse than sparse).Honest scope
Nonedefault = current behavior, one embedding per segment). It's a v2/AHC booster, not a default change.Tests
expand_embed_unitsunit tests (splits long segments, keeps short,None= identity, sub-windows inherit the local speaker index and end at the segment boundary).--helpsnapshot updated.--embed-window 1.5).--all-targetsclean · 310 lib tests green.Breaking (v2 API)
PipelineConfiggainedembed_window_secs— struct-literal constructors addembed_window_secs: None(or use..default()). Covered by the 0.9.0 minor bump.🤖 Generated with Claude Code