in src/diarizers/data/synthetic_pipeline.py [0:0]
def sample_next_speaker(self):
"""Next speaker sampling.
Returns:
self.current_speaker (str): current speaker.
"""
other_speakers = self.sampled_speakers.copy()
if self.current_speaker in other_speakers:
other_speakers.remove(self.current_speaker)
self.current_speaker = random.choice(other_speakers)
return self.current_speaker