diart.blocks.segmentation#

Module Contents#

Classes#

class diart.blocks.segmentation.SpeakerSegmentation(model, device=None)#
Parameters:
static from_pretrained(model, use_hf_token=True, device=None)#
Parameters:
  • use_hf_token (Union[Text, bool, None]) –

  • device (Optional[torch.device]) –

Return type:

SpeakerSegmentation

__call__(waveform)#

Calculate the speaker segmentation of input audio.

Parameters:

waveform (TemporalFeatures, shape (samples, channels) or (batch, samples, channels)) –

Returns:

speaker_segmentation – The batch dimension is omitted if waveform is a SlidingWindowFeature.

Return type:

TemporalFeatures, shape (batch, frames, speakers)