PyAnnote<T>

Models & Types · AiDotNet.Audio.Speaker

pyannote 3.x end-to-end speaker diarization model.

Inheritance: NeuralNetworkBase<T> → AudioNeuralNetworkBase<T> → SpeakerRecognitionBase<T> → PyAnnote<T>

Implements: ISpeakerDiarizer<T>

For Beginners

pyannote figures out “who spoke when” in a recording with multiple speakers. It’s like automatically labeling a meeting transcript with “Speaker A: 0:00-0:15, Speaker B: 0:15-0:45…” It can even detect when two people talk at the same time (overlapping speech).

Usage:

How It Works

pyannote.audio 3.x (Plaquet & Bredin, ASRU 2023) is a state-of-the-art speaker diarization pipeline using end-to-end neural segmentation with PyanNet architecture. It segments audio into speaker turns, supports overlapping speech detection, and achieves 11.2% DER on AMI Mix-Headset benchmark.

Constructors

Constructor Summary
PyAnnote(NeuralNetworkArchitecture<T> architecture, PyAnnoteOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) Creates a pyannote diarization model in native training mode.
PyAnnote(NeuralNetworkArchitecture<T> architecture, string modelPath, PyAnnoteOptions options) Creates a pyannote diarization model in native training mode.

Properties

Property Summary
bool IsOnnxMode { get; }
bool SupportsOverlapDetection { get; }
double MinSegmentDuration { get; }
int SampleRate { get; }

Methods

Method Summary
DiarizationResult<T> Diarize(Tensor<T> audio, int? numSpeakers, int minSpeakers, int maxSpeakers)
DiarizationResult<T> DiarizeWithKnownSpeakers(Tensor<T> audio, IReadOnlyList<SpeakerProfile<T>> knownSpeakers, bool allowUnknownSpeakers)
DiarizationResult<T> RefineDiarization(Tensor<T> audio, DiarizationResult<T> previousResult, T mergeThreshold)
IReadOnlyDictionary<string, Tensor<T>> ExtractSpeakerEmbeddings(Tensor<T> audio, DiarizationResult<T> diarizationResult)
ModelMetadata<T> GetModelMetadata()
Task<DiarizationResult<T>> DiarizeAsync(Tensor<T> audio, int? numSpeakers, int minSpeakers, int maxSpeakers, CancellationToken cancellationToken)