1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! # Sortformer
//!
//! NVIDIA's Sortformer speaker diarizers: audio to per-frame, per-speaker
//! activity, speakers numbered in the order the model first hears them.
//! `Nemotron-3-Diarization` (8 speakers, 10 ms output) is the reference
//! checkpoint; the streaming Sortformer v2 and v2.1 (4 speakers, 80 ms
//! output) are built by the same model.
//!
//! - [`blocks`]: the model, [`Sortformer`], built from a
//! [`SortformerStructureConfig`] or a policy that lowers to it
//! ([`NemotronDiarizationConfig`], [`SortformerV2Config`]); its encoder
//! splits as `NeMo` streams it, into [`pre_encode`](Sortformer::pre_encode)
//! and [`forward_pre_encoded`](Sortformer::forward_pre_encoded).
//! - [`SortformerStreamingConfig`]: the chunks, the look-ahead, and the
//! Arrival-Order Speaker Cache's geometry and scoring.
//! - [`SpeakerCache`]: one stream's cache and FIFO between steps, its silence
//! slots filled by a [`SilenceFill`]: the model's learned embedding, or a
//! running mean of the silent frames.
//! - [`SortformerMelStream`]: the model streamed over mel frames;
//! [`SortformerStream`]: over samples, through `NeMo`'s mel front end, as a
//! [`SpeakerActivityStream`](crate::kits::speech::diarization::SpeakerActivityStream).
//! - [`SortformerConstruct`]: a loaded model with its front end, and the
//! [`SortformerPolicy`] its presets resolved to;
//! [`diarizer`](SortformerConstruct::diarizer) makes it a
//! [`SpeakerActivityModel`](crate::kits::speech::diarization::SpeakerActivityModel)
//! under a streaming config, [`diarize`](SortformerConstruct::diarize) runs a
//! whole recording to speaker turns.
//! - [`pretrained`] (features `store` and `cache`): the index of named
//! checkpoints, `nvidia/nemotron-3-diarization` the default, `hf:` repos, and
//! the factory that loads one into a construct.
//! - [`weights`] (feature `store`): loading tensors named as `transformers`'
//! `Nemotron3DiarizationForAudioFrameClassification` state dict, or as a
//! Sortformer v2 `.nemo`'s.
//! - `NemoSortformerConfig` (feature `store`): a Sortformer `.nemo`'s config,
//! which gives the model's [`SortformerStructureConfig`] and its front end's
//! config.
//!
//! Its front end is `NeMo`'s mel front end:
//! [`NemoMelFrontEndConfig::nemotron_diarization`](crate::kits::speech::nemo::NemoMelFrontEndConfig::nemotron_diarization)
//! for Nemotron, a `.nemo`'s `preprocessor` section for v2.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use ;