Skip to main content

Overview

SpeakerManager maintains an in-memory database of speakers, tracks their voice embeddings, and assigns consistent IDs across audio chunks.
SpeakerManager is compatible with DiarizerManager (streaming pipeline) only. OfflineDiarizerManager uses VBx clustering.

Configuration

Speaker Assignment

Behavior:
  1. Finds closest speaker using cosine distance
  2. If distance < speakerThreshold: assigns to existing speaker
  3. If no match and duration >= minSpeechDuration: creates new speaker
  4. Returns nil if speech too short

Known Speakers

Initialization Modes

Speaker Management

Speaker Lookup

Cosine Distance Guide

Speaker Data Model

Thread Safety

SpeakerManager uses internal DispatchQueue with concurrent reads and barrier writes. All public methods are thread-safe.