Skip to content

Allow setting the known speaker count - #1586

Merged
raivisdejus merged 7 commits into
chidiwilliams:mainfrom
ciklois-neo:feature/known-speaker-count
Aug 22, 2026
Merged

raivisdejus merged 7 commits into
chidiwilliams:mainfrom
ciklois-neo:feature/known-speaker-count

Conversation

@ciklois-neo

Copy link
Copy Markdown
Contributor

Summary

  • add an Auto / 2–8 speaker-count selector for the MSDD diarizer
  • pass a selected exact count through the worker to the vendored diarization layer
  • reset and disable the selector for Sortformer, whose API does not support a forced count
  • document the accuracy trade-off and add focused cross-platform tests

Motivation

Buzz can currently merge similar or quieter participants when automatically estimating the speaker count. This implements the known-speaker-count part proposed in discussion #1043 while keeping Auto as the backward-compatible default.

Dependency

This updates the whisper_diarization submodule to the implementation proposed in MahmoudAshraf97/whisper-diarization#379.

Testing

  • uv run --no-sync pytest -q tests/widgets/speaker_count_test.py: 8 passed
  • lint and syntax checks passed
  • a Windows PyInstaller build completed and passed a startup smoke test
  • user validation on a 30-minute Hungarian room recording with three participants: setting the count to 3 found all three speakers and separated the transcript correctly

@raivisdejus

Copy link
Copy Markdown
Collaborator

Excellent feature, I see it to be very valuable.

Ideally we would sort out your PR to the whisper_diarization, so we can depend on some upstream version of it with this feature. But if that hits some road blocks we can also look for alternative way to get this fix into the Buzz.

Great work!

@ciklois-neo

Copy link
Copy Markdown
Contributor Author

Thanks! I agree that depending on an upstream whisper_diarization release would be the cleanest route.

My plan is to keep the exact speaker-count option available for the current MSDD path for as long as Buzz still ships that backend. It is opt-in (Auto remains the default), and it has been useful in real recordings where automatic clustering merged a quieter or more distant participant. In parallel, I will explore the Sortformer path and the future model mentioned upstream that is expected to support up to eight speakers. Once MSDD is actually retired, the MSDD-specific option can be retired with it.

I have also separated the backend-independent part of the work into PR #1587: structured speaker metadata, an editable Speaker column with multi-row assignment, a colored and filterable Speakers view, and a colored DOCX export with optional timestamps. That workflow does not depend on MSDD; Sortformer or any future diarizer can populate the same speaker field and reuse the editor, view, and exports.

@raivisdejus

Copy link
Copy Markdown
Collaborator

Moved your change for speaker count to a patch file in Buzz repo, it will be easier to manage. If at some point upstream whisper_diarezation repo will merge it, we can drop our patch.

Thanks again for the contribution!

@raivisdejus
raivisdejus enabled auto-merge (squash) August 22, 2026 09:10
@codecov

codecov Bot commented Aug 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.44%. Comparing base (b99752c) to head (26a7952).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1586      +/-   ##
==========================================
- Coverage   83.49%   83.44%   -0.06%     
==========================================
  Files         108      108              
  Lines       12096    12112      +16     
==========================================
+ Hits        10100    10107       +7     
- Misses       1996     2005       +9     
Flag Coverage Δ
Linux 82.62% <100.00%> (+0.18%) ⬆️
macOS 82.95% <100.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@raivisdejus
raivisdejus disabled auto-merge August 22, 2026 09:44
@raivisdejus
raivisdejus merged commit 749001c into chidiwilliams:main Aug 22, 2026
15 of 19 checks passed
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.

2 participants