Skip to content

NEW Feature: Add per-recording speaker count constraints for diarization #128

Description

@albertsole33

Is your feature request related to a problem? Please describe.

Pyannote sometimes overestimates the number of speakers in a recording. For example, a meeting with two confirmed participants was diarized as four different speakers.

This fragments one person across multiple speaker labels and significantly reduces the usefulness of the transcript. The current phantom-speaker filter does not solve the problem when the incorrect speaker clusters contain substantial amounts of speech.

Describe the solution you'd like

Add an optional speaker-count setting before starting, importing, or processing a recording.

Ideally, users could select:

  • Auto-detect
  • Exact number of speakers
  • Minimum and maximum number of speakers

These values should be passed to the diarization pipeline using Pyannote's num_speakers, min_speakers, or max_speakers parameters.

The constraint should be stored per recording rather than being only a global setting. It would also be useful to change the constraint and rerun diarization without rerunning transcription.

Describe alternatives you've considered

I considered manually merging speakers after processing, but this requires reviewing the entire meeting and does not correct the underlying diarization.

A global fixed speaker count was also considered, but it would not work because different meetings have different numbers of participants.

Adjusting the phantom-speaker filter is unlikely to solve the general problem because the extra clusters are not always short or insignificant.

Additional context

In a controlled test, the same approximately 96-minute meeting was processed with both Canary and Faster Whisper Turbo.

Teams confirmed that the recording contained two real speakers, but Pyannote returned four speakers in both NoJoin runs.

The requested constraint should remain optional, with Auto-detect as the default, so the existing behavior is preserved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions