Repository navigation
fix(diarization): honor configurable speaker caps for long recordings - #3794
Open
phoenixray2000 wants to merge 2 commits into
Open
phoenixray2000 wants to merge 2 commits into
phoenixray2000 wants to merge 2 commits into
Conversation
This branch has not been deployed
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.
Automatic speaker counting switches from spectral clustering to UMAP/HDBSCAN at 2048 speaker embeddings. The density-based branch ignores the spectral speaker limit, so a configured maximum of 5 can still produce 8 speaker groups.
Expose a construction-time top-level
AutoModel(..., max_num_spks=5)argument, defaulting to 15. Forward that value explicitly toClusterBackendso both automatic clustering paths obey the same cap.max_num_spksinsidespk_kwargsorspk_kwargs["cb_kwargs"]raisesTypeError, including when a top-level value is also supplied. This leaves one AutoModel configuration entry point without alias or precedence rules. Other backend options, such asmerge_thr, continue to use the existing component configuration.Excess UMAP/HDBSCAN clusters are greedily merged by centroid cosine similarity. Noise labels are preserved and excluded from the count; pair selection excludes the diagonal and handles nonpositive similarities and zero centroids. An explicit
preset_spk_num/oracle_numtakes precedence on the known-count spectral and KMeans paths.The default limit of 15 now also applies to automatic UMAP/HDBSCAN results. Callers can increase it for larger meetings. This is an upper bound, not an exact count: setting it below the actual number of speakers can merge different people. The English and Chinese SDK guides document the top-level construction argument, defaults, validation and examples.
Validation:
NamedTemporaryFileon Windows; it remains selected in Linux CI.git diff --checkpass.tests/test_cluster_backend.pyis included in the path filters and test selection of the NumPy 1.26.4 / 2.4.0 CI matrix.The existing product-site browser environment has a separate incompatibility: its
ubuntu-latestrunner uses Ubuntu 26.04 with Playwright 1.55.0. The previous browser run fails at Install Chromium, before browser tests run, withError: ERROR: Playwright does not support chromium on ubuntu26.04-x64.Latest head
7bec62b9763bee22c513a156ddfcc35c55d91774: NumPy 1.26.4, NumPy 2.4.0, KWS output, model contracts, and legacy document links pass (NumPy, KWS, model contracts). The current product-site build/validation is still in progress; its browser stage is pending.