pyannote / pyannote-audio

Neural building blocks for speaker diarization: speech activity detection, speaker change detection, overlapped speech detection, speaker embedding
http://pyannote.github.io
MIT License
6.28k stars 776 forks source link

Determine exact the numbers of speakers in diarization pipeline #1781

Open shron1010 opened 2 days ago

shron1010 commented 2 days ago

If we know exact speakers in wav file (i.e. 2), is it some way to provide it to diarization pipeline? Because library often determine an additional speakers - speaker02, speaker03 and so on. Something like max_num_speakers.

FrenchKrab commented 2 days ago

Check out the pipeline.apply method https://github.com/pyannote/pyannote-audio/blob/3f4a22f773209410fcd3f5c8bb13e78f49a1aedf/pyannote/audio/pipelines/speaker_diarization.py#L430-L438 The docstring explains how to use num_speakers and max_speakers.