diart.blocks.segmentation#
Module Contents#
Classes#
- class diart.blocks.segmentation.SpeakerSegmentation(model, device=None)#
- Parameters:
model (diart.models.SegmentationModel) –
device (Optional[torch.device]) –
- static from_pretrained(model, use_hf_token=True, device=None)#
- Parameters:
use_hf_token (Union[Text, bool, None]) –
device (Optional[torch.device]) –
- Return type:
- __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)