Voice Activity Detection
NeMo
Safetensors
GGUF
Transformers
nemotron3_diarization
audio-frame-classification
speaker-diarization
streaming-sortformer
speaker-tagging
Instructions to use ldov/Nemotron-3-Diarization with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NeMo
How to use ldov/Nemotron-3-Diarization with NeMo:
# tag did not correspond to a valid NeMo domain.
- Transformers
How to use ldov/Nemotron-3-Diarization with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForAudioFrameClassification processor = AutoProcessor.from_pretrained("ldov/Nemotron-3-Diarization") model = AutoModelForAudioFrameClassification.from_pretrained("ldov/Nemotron-3-Diarization", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
aaba974
0
Parent(s):
Duplicate from nvidia/Nemotron-3-Diarization
Browse filesCo-authored-by: Ivan Medennikov <imedennikov@users.noreply.huggingface.co>
- .gitattributes +41 -0
- ASR_INTEGRATION_GUIDE.md +388 -0
- Nemotron-3-Diarization.nemo +3 -0
- Nemotron-3-Diarization.q8_0.gguf +3 -0
- README.md +691 -0
- bias.md +5 -0
- config.json +54 -0
- diarization_evaluation.md +196 -0
- explainability.md +13 -0
- model.safetensors +3 -0
- nemotron3_tts_8_open_voices.mp4 +3 -0
- privacy.md +16 -0
- processor_config.json +31 -0
- safety.md +6 -0
- streaming_diarization_demo.gif +3 -0
- streaming_diarization_demo.png +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
Nemotron-3-Diarization.nemo filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
Nemotron-3-Diarization.nemo.bak filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
nemotron3_tts_8_open_voices.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
streaming_diarization_demo.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
streaming_diarization_demo.gif filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
*.gguf filter=lfs diff=lfs merge=lfs -text
|
ASR_INTEGRATION_GUIDE.md
ADDED
|
@@ -0,0 +1,388 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Nemotron-3-Diarization with Streaming ASR
|
| 2 |
+
|
| 3 |
+
`nvidia/Nemotron-3-Diarization` answers **who spoke when**. To produce a
|
| 4 |
+
speaker-attributed transcript—**who said what**—pair it with a compatible ASR
|
| 5 |
+
model.
|
| 6 |
+
|
| 7 |
+
This guide shows two supported streaming ASR pairings:
|
| 8 |
+
|
| 9 |
+
- Diarization: [`nvidia/Nemotron-3-Diarization`](https://huggingface.co/nvidia/Nemotron-3-Diarization)
|
| 10 |
+
- ASR option 1: [`nvidia/multitalker-parakeet-streaming-0.6b-v1`](https://huggingface.co/nvidia/multitalker-parakeet-streaming-0.6b-v1)
|
| 11 |
+
- ASR option 2: [`nvidia/nemotron-3.5-asr-streaming-0.6b`](https://huggingface.co/nvidia/nemotron-3.5-asr-streaming-0.6b)
|
| 12 |
+
- Integration: NeMo Speech's [`speech_to_text_multitalker_streaming_infer.py`](https://github.com/NVIDIA-NeMo/Speech/blob/main/examples/asr/asr_cache_aware_streaming/speech_to_text_multitalker_streaming_infer.py)
|
| 13 |
+
|
| 14 |
+
This is a coupled streaming pipeline. Nemotron-3-Diarization produces
|
| 15 |
+
frame-level speaker activity, while the ASR stage maintains a separate
|
| 16 |
+
transcription stream for each detected speaker.
|
| 17 |
+
|
| 18 |
+
## 1. Install NeMo Speech
|
| 19 |
+
|
| 20 |
+
Use a recent checkout of NeMo Speech because the multi-talker streaming helper
|
| 21 |
+
is developed alongside the models.
|
| 22 |
+
|
| 23 |
+
```bash
|
| 24 |
+
apt-get update && apt-get install -y libsndfile1 ffmpeg git
|
| 25 |
+
|
| 26 |
+
git clone --branch main --single-branch https://github.com/NVIDIA-NeMo/Speech.git
|
| 27 |
+
cd Speech
|
| 28 |
+
|
| 29 |
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 30 |
+
uv sync --python 3.13 --extra asr --extra cu13 --no-dev
|
| 31 |
+
source .venv/bin/activate
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
Use `--extra cu12` instead of `--extra cu13` when your installed NVIDIA driver
|
| 35 |
+
and CUDA environment require CUDA 12.
|
| 36 |
+
|
| 37 |
+
If the Hugging Face repositories require authentication, provide a token that
|
| 38 |
+
has access to both models:
|
| 39 |
+
|
| 40 |
+
```bash
|
| 41 |
+
export HF_TOKEN="your-hugging-face-token"
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
Do not put the token in source code or commit it to a repository.
|
| 45 |
+
|
| 46 |
+
The NeMo example script accepts the Hugging Face repository ID directly:
|
| 47 |
+
|
| 48 |
+
```bash
|
| 49 |
+
diar_model=nvidia/Nemotron-3-Diarization
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
To keep a local copy of the checkpoint instead, download it with:
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
hf download nvidia/Nemotron-3-Diarization \
|
| 56 |
+
--local-dir /path/to/Nemotron-3-Diarization
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
Then replace the repository ID in the commands below with
|
| 60 |
+
`/path/to/Nemotron-3-Diarization/Nemotron-3-Diarization.nemo`.
|
| 61 |
+
|
| 62 |
+
## 2. Prepare the audio
|
| 63 |
+
|
| 64 |
+
The paired models expect single-channel, 16 kHz audio. Convert other inputs
|
| 65 |
+
before inference:
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
ffmpeg -i input.mp3 -ac 1 -ar 16000 -c:a pcm_s16le conversation.wav
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## 3. Choose the ASR model
|
| 72 |
+
|
| 73 |
+
Use one of the following ASR configurations with Nemotron-3-Diarization.
|
| 74 |
+
|
| 75 |
+
### Option 1: Multitalker Parakeet
|
| 76 |
+
|
| 77 |
+
[`nvidia/multitalker-parakeet-streaming-0.6b-v1`](https://huggingface.co/nvidia/multitalker-parakeet-streaming-0.6b-v1)
|
| 78 |
+
is a streaming ASR model fine-tuned for overlapping speech. It supports English
|
| 79 |
+
only and should be used with `masked_asr=false`.
|
| 80 |
+
|
| 81 |
+
From the NeMo Speech repository root, run:
|
| 82 |
+
|
| 83 |
+
```bash
|
| 84 |
+
python examples/asr/asr_cache_aware_streaming/speech_to_text_multitalker_streaming_infer.py \
|
| 85 |
+
asr_model=nvidia/multitalker-parakeet-streaming-0.6b-v1 \
|
| 86 |
+
diar_model=nvidia/Nemotron-3-Diarization \
|
| 87 |
+
audio_file=/absolute/path/to/conversation.wav \
|
| 88 |
+
max_num_of_spks=8 \
|
| 89 |
+
single_speaker_mode=false \
|
| 90 |
+
masked_asr=false \
|
| 91 |
+
parallel_speaker_strategy=true \
|
| 92 |
+
cache_gating=true \
|
| 93 |
+
binary_diar_preds=true \
|
| 94 |
+
att_context_size='[70,13]' \
|
| 95 |
+
fifo_len=264 \
|
| 96 |
+
spkcache_update_period=222 \
|
| 97 |
+
generate_realtime_scripts=false \
|
| 98 |
+
output_path=./speaker_attributed_output.json
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
### Option 2: Nemotron 3.5 ASR
|
| 102 |
+
|
| 103 |
+
[`nvidia/nemotron-3.5-asr-streaming-0.6b`](https://huggingface.co/nvidia/nemotron-3.5-asr-streaming-0.6b)
|
| 104 |
+
is a regular single-speaker streaming ASR model. In this speaker-attributed
|
| 105 |
+
pipeline, it can use masked speaker activity to recognize overlapped speech to a
|
| 106 |
+
certain degree. It supports 32 language-locales out of the box; its tokenizer
|
| 107 |
+
supports eight additional adaptation-ready locales that require fine-tuning.
|
| 108 |
+
Use it with `masked_asr=true`.
|
| 109 |
+
|
| 110 |
+
Set `target_lang` to the input language-locale, or use `target_lang=auto` when
|
| 111 |
+
the model should infer the language prompt automatically.
|
| 112 |
+
|
| 113 |
+
```bash
|
| 114 |
+
python examples/asr/asr_cache_aware_streaming/speech_to_text_multitalker_streaming_infer.py \
|
| 115 |
+
asr_model=nvidia/nemotron-3.5-asr-streaming-0.6b \
|
| 116 |
+
diar_model=nvidia/Nemotron-3-Diarization \
|
| 117 |
+
audio_file=/absolute/path/to/conversation.wav \
|
| 118 |
+
max_num_of_spks=8 \
|
| 119 |
+
single_speaker_mode=false \
|
| 120 |
+
masked_asr=true \
|
| 121 |
+
parallel_speaker_strategy=true \
|
| 122 |
+
cache_gating=true \
|
| 123 |
+
binary_diar_preds=true \
|
| 124 |
+
att_context_size='[56,13]' \
|
| 125 |
+
fifo_len=264 \
|
| 126 |
+
spkcache_update_period=222 \
|
| 127 |
+
target_lang=auto \
|
| 128 |
+
generate_realtime_scripts=false \
|
| 129 |
+
output_path=./speaker_attributed_output.json
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
The script writes the final result to `speaker_attributed_output.json` in
|
| 133 |
+
NeMo's SegLST format. Each finalized item contains its text, time range, and
|
| 134 |
+
anonymous speaker label. Set `generate_realtime_scripts=true` to also print
|
| 135 |
+
streaming hypotheses.
|
| 136 |
+
|
| 137 |
+
The important settings are:
|
| 138 |
+
|
| 139 |
+
| Setting | Meaning |
|
| 140 |
+
|---|---|
|
| 141 |
+
| `max_num_of_spks=8` | Maximum number of speaker streams maintained for the session. Lower this when the use case has fewer speakers to reduce compute. |
|
| 142 |
+
| `parallel_speaker_strategy=true` | Processes the speaker-specific ASR streams in parallel. |
|
| 143 |
+
| `masked_asr=false` | Use this with Multitalker Parakeet, which consumes speaker activity as conditioning. |
|
| 144 |
+
| `masked_asr=true` | Use this with Nemotron 3.5 ASR, which uses diarization activity to mask each speaker stream. |
|
| 145 |
+
| `att_context_size='[70,13]'` | Recommended context for Multitalker Parakeet. |
|
| 146 |
+
| `att_context_size='[56,13]'` | Recommended context for Nemotron 3.5 ASR. |
|
| 147 |
+
| `cache_gating=true` | Runs speaker-specific ASR only for speakers detected as active in the recent diarization window, reducing unnecessary ASR computation. |
|
| 148 |
+
| `fifo_len=264` | Maximum number of recent 80 ms diarization encoder frames retained in the FIFO queue. |
|
| 149 |
+
| `spkcache_update_period=222` | Number of the FIFO queue's oldest 80 ms frames transferred during each speaker-cache update; the effective value is constrained by the chunk and FIFO geometry. |
|
| 150 |
+
|
| 151 |
+
`max_num_of_spks` is an upper bound, not a promise that every configured speaker
|
| 152 |
+
will appear. The diarization model discovers active speaker identities from the
|
| 153 |
+
audio.
|
| 154 |
+
|
| 155 |
+
A typical rendered result looks like:
|
| 156 |
+
|
| 157 |
+
```text
|
| 158 |
+
Speaker 0: Welcome, everyone. Let us begin.
|
| 159 |
+
Speaker 1: I have the latest numbers.
|
| 160 |
+
Speaker 2: I agree, but there is one remaining issue.
|
| 161 |
+
```
|
| 162 |
+
|
| 163 |
+
Speaker numbers represent identities discovered during that stream. They do not
|
| 164 |
+
identify real-world names. If an application displays names, it must associate
|
| 165 |
+
those names separately—for example through an enrollment or application-level
|
| 166 |
+
mapping step.
|
| 167 |
+
|
| 168 |
+
## Real-time microphone or service integration
|
| 169 |
+
|
| 170 |
+
The `speech_to_text_multitalker_streaming_infer.py` example is best understood
|
| 171 |
+
as an offline streaming replay and evaluation driver. It exercises the streaming
|
| 172 |
+
model path chunk by chunk, but it reads from files or manifests that are already
|
| 173 |
+
available. A production web, microphone, or websocket service needs a persistent
|
| 174 |
+
session per client and must feed newly arriving PCM chunks into that session.
|
| 175 |
+
|
| 176 |
+
A live interface sends audio chunks to the server, which buffers them into the
|
| 177 |
+
model's required hop/cache geometry and passes each completed frame to NeMo
|
| 178 |
+
Speech's `SpeakerTaggedASR`. Gradio is one of many possible interface options;
|
| 179 |
+
alternatives include a custom web UI, a desktop or mobile application, an HTTP
|
| 180 |
+
API, or a raw websocket client.
|
| 181 |
+
|
| 182 |
+
The service structure is:
|
| 183 |
+
|
| 184 |
+
1. Load the ASR and diarization checkpoints once per worker process.
|
| 185 |
+
2. Create a new streaming session for each live client connection.
|
| 186 |
+
3. For each incoming mono PCM chunk, resample to 16 kHz if needed, append it to
|
| 187 |
+
that client's pending audio buffer, and process every complete streaming
|
| 188 |
+
frame.
|
| 189 |
+
4. Return the latest speaker-attributed transcript and, if desired, the latest
|
| 190 |
+
diarization activity state to the client.
|
| 191 |
+
5. Reset the client's session when the recording stops or the websocket closes.
|
| 192 |
+
|
| 193 |
+
The illustrative streaming loop below is configured specifically for Option 1,
|
| 194 |
+
Multitalker Parakeet. Option 2 requires its corresponding model-specific
|
| 195 |
+
settings.
|
| 196 |
+
|
| 197 |
+
```python
|
| 198 |
+
import os
|
| 199 |
+
|
| 200 |
+
import numpy as np
|
| 201 |
+
import torch
|
| 202 |
+
from omegaconf import OmegaConf
|
| 203 |
+
|
| 204 |
+
import nemo.collections.asr as nemo_asr
|
| 205 |
+
from nemo.collections.asr.models.sortformer_diar_models import SortformerEncLabelModel
|
| 206 |
+
from nemo.collections.asr.parts.utils.multispk_transcribe_utils import (
|
| 207 |
+
SpeakerTaggedASR,
|
| 208 |
+
configure_diar_streaming,
|
| 209 |
+
validate_feature_frame_strides,
|
| 210 |
+
)
|
| 211 |
+
from nemo.collections.asr.parts.utils.streaming_utils import CacheAwareStreamingAudioBuffer
|
| 212 |
+
|
| 213 |
+
|
| 214 |
+
def load_models(asr_model_path, diar_model_path, device="cuda"):
|
| 215 |
+
if os.path.isfile(asr_model_path):
|
| 216 |
+
asr_model = nemo_asr.models.ASRModel.restore_from(restore_path=asr_model_path)
|
| 217 |
+
else:
|
| 218 |
+
asr_model = nemo_asr.models.ASRModel.from_pretrained(asr_model_path)
|
| 219 |
+
|
| 220 |
+
if os.path.isfile(diar_model_path):
|
| 221 |
+
diar_model = SortformerEncLabelModel.restore_from(restore_path=diar_model_path, map_location=device)
|
| 222 |
+
else:
|
| 223 |
+
diar_model = SortformerEncLabelModel.from_pretrained(diar_model_path)
|
| 224 |
+
|
| 225 |
+
asr_model.eval().to(device)
|
| 226 |
+
diar_model.eval().to(device)
|
| 227 |
+
asr_model.encoder.set_default_att_context_size([70, 13])
|
| 228 |
+
|
| 229 |
+
validate_feature_frame_strides(asr_model=asr_model, diar_model=diar_model)
|
| 230 |
+
return asr_model, diar_model
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
class LiveMultitalkerSession:
|
| 234 |
+
def __init__(self, asr_model, diar_model, sample_rate=16000):
|
| 235 |
+
self.cfg = OmegaConf.create(
|
| 236 |
+
{
|
| 237 |
+
"device": str(asr_model.device),
|
| 238 |
+
"sample_rate": sample_rate,
|
| 239 |
+
"deploy_mode": True,
|
| 240 |
+
"streaming_mode": True,
|
| 241 |
+
"max_num_of_spks": 8,
|
| 242 |
+
"batch_size": 32,
|
| 243 |
+
"parallel_speaker_strategy": True,
|
| 244 |
+
"masked_asr": False,
|
| 245 |
+
"mask_preencode": False,
|
| 246 |
+
"single_speaker_mode": False,
|
| 247 |
+
"cache_gating": True,
|
| 248 |
+
"cache_gating_buffer_size": 2,
|
| 249 |
+
"binary_diar_preds": True,
|
| 250 |
+
"spkcache_len": None,
|
| 251 |
+
"spkcache_update_period": 222,
|
| 252 |
+
"fifo_len": 264,
|
| 253 |
+
"diar_right_context": 0,
|
| 254 |
+
"att_context_size": [70, 13],
|
| 255 |
+
"use_amp": True,
|
| 256 |
+
"precision": "bf16",
|
| 257 |
+
"online_normalization": False,
|
| 258 |
+
"pad_and_drop_preencoded": False,
|
| 259 |
+
"feat_len_sec": 0.01,
|
| 260 |
+
"discarded_frames": 8,
|
| 261 |
+
"word_window": 50,
|
| 262 |
+
"sent_break_sec": 1.0,
|
| 263 |
+
"fix_prev_words_count": 5,
|
| 264 |
+
"update_prev_words_sentence": 5,
|
| 265 |
+
"left_frame_shift": -1,
|
| 266 |
+
"right_frame_shift": 0,
|
| 267 |
+
"min_sigmoid_val": 1e-2,
|
| 268 |
+
"ignored_initial_frame_steps": 5,
|
| 269 |
+
"generate_realtime_scripts": True,
|
| 270 |
+
"print_sample_indices": [0],
|
| 271 |
+
"colored_text": True,
|
| 272 |
+
"verbose": False,
|
| 273 |
+
"print_time": False,
|
| 274 |
+
"log": False,
|
| 275 |
+
}
|
| 276 |
+
)
|
| 277 |
+
self.asr_model = asr_model
|
| 278 |
+
self.diar_model = diar_model
|
| 279 |
+
|
| 280 |
+
streaming_cfg = asr_model.encoder.streaming_cfg
|
| 281 |
+
diar_chunk_len = streaming_cfg.valid_out_len + streaming_cfg.cache_drop_size
|
| 282 |
+
configure_diar_streaming(
|
| 283 |
+
diar_model=diar_model,
|
| 284 |
+
cfg=self.cfg,
|
| 285 |
+
output_subsampling_factor=asr_model.encoder.subsampling_factor,
|
| 286 |
+
diar_chunk_len=diar_chunk_len,
|
| 287 |
+
)
|
| 288 |
+
self.cfg.spkcache_len = int(diar_model.sortformer_modules.spkcache_len)
|
| 289 |
+
|
| 290 |
+
self.streamer = SpeakerTaggedASR(self.cfg, asr_model, diar_model)
|
| 291 |
+
self.audio_buffer = CacheAwareStreamingAudioBuffer(
|
| 292 |
+
model=asr_model,
|
| 293 |
+
online_normalization=self.cfg.online_normalization,
|
| 294 |
+
)
|
| 295 |
+
|
| 296 |
+
feature_stride = float(asr_model.cfg.preprocessor.window_stride)
|
| 297 |
+
hop_feature_frames = streaming_cfg.valid_out_len * asr_model.encoder.subsampling_factor
|
| 298 |
+
self.hop_samples = round(hop_feature_frames * feature_stride * sample_rate)
|
| 299 |
+
|
| 300 |
+
cache_frames = streaming_cfg.pre_encode_cache_size
|
| 301 |
+
if isinstance(cache_frames, (list, tuple)):
|
| 302 |
+
cache_frames = cache_frames[-1]
|
| 303 |
+
cache_samples = round(cache_frames * feature_stride * sample_rate)
|
| 304 |
+
self.frame_samples = self.hop_samples + cache_samples
|
| 305 |
+
self.pending_audio = np.zeros(cache_samples, dtype=np.float32)
|
| 306 |
+
self.step_num = 0
|
| 307 |
+
|
| 308 |
+
@torch.inference_mode()
|
| 309 |
+
def accept_audio(self, pcm_chunk, sample_rate):
|
| 310 |
+
"""Accept one live mono PCM chunk and return the latest transcript text."""
|
| 311 |
+
if pcm_chunk.dtype == np.int16:
|
| 312 |
+
pcm_chunk = pcm_chunk.astype(np.float32) / 32768.0
|
| 313 |
+
elif pcm_chunk.dtype == np.int32:
|
| 314 |
+
pcm_chunk = pcm_chunk.astype(np.float32) / 2147483648.0
|
| 315 |
+
else:
|
| 316 |
+
pcm_chunk = pcm_chunk.astype(np.float32)
|
| 317 |
+
|
| 318 |
+
# Resample here when sample_rate != self.cfg.sample_rate.
|
| 319 |
+
self.pending_audio = np.concatenate([self.pending_audio, pcm_chunk])
|
| 320 |
+
|
| 321 |
+
latest = None
|
| 322 |
+
while len(self.pending_audio) >= self.frame_samples:
|
| 323 |
+
frame = self.pending_audio[: self.frame_samples]
|
| 324 |
+
self.pending_audio = self.pending_audio[self.hop_samples :]
|
| 325 |
+
|
| 326 |
+
chunk_audio, chunk_lengths = self.audio_buffer.preprocess_audio(frame)
|
| 327 |
+
chunk_audio = chunk_audio[:, :, : chunk_lengths[0]]
|
| 328 |
+
drop_extra_pre_encoded = (
|
| 329 |
+
0
|
| 330 |
+
if self.step_num == 0
|
| 331 |
+
else self.asr_model.encoder.streaming_cfg.drop_extra_pre_encoded
|
| 332 |
+
)
|
| 333 |
+
latest = self.streamer.perform_parallel_streaming_stt_spk(
|
| 334 |
+
step_num=self.step_num,
|
| 335 |
+
chunk_audio=chunk_audio,
|
| 336 |
+
chunk_lengths=chunk_lengths,
|
| 337 |
+
is_buffer_empty=False,
|
| 338 |
+
drop_extra_pre_encoded=drop_extra_pre_encoded,
|
| 339 |
+
)
|
| 340 |
+
self.step_num += 1
|
| 341 |
+
|
| 342 |
+
return "" if latest is None else latest[0]
|
| 343 |
+
```
|
| 344 |
+
|
| 345 |
+
Connect `accept_audio()` to the interface or transport used by your application.
|
| 346 |
+
For a network service, create the session when the client connects, call
|
| 347 |
+
`accept_audio()` for each decoded PCM message, and delete the session when the
|
| 348 |
+
client disconnects. Protect each session with a small lock if your server can
|
| 349 |
+
deliver overlapping callbacks for the same client.
|
| 350 |
+
|
| 351 |
+
Do not share the session object between clients: the speaker cache, ASR decoder
|
| 352 |
+
state, timestamps, pending audio buffer, and transcript history are all
|
| 353 |
+
session-specific.
|
| 354 |
+
|
| 355 |
+
Model weights may be shared across connections to save GPU memory, provided
|
| 356 |
+
each connection receives independent `SpeakerTaggedASR`, streaming-buffer, and
|
| 357 |
+
speaker-cache state.
|
| 358 |
+
|
| 359 |
+
## Choosing another ASR model
|
| 360 |
+
|
| 361 |
+
A conventional single-speaker ASR can be applied after diarization by cutting
|
| 362 |
+
the audio at each speaker segment and transcribing the cuts. That approach is
|
| 363 |
+
reasonable when speakers rarely overlap. It is not an equivalent replacement
|
| 364 |
+
for Multitalker Parakeet: an extracted time range still contains every voice
|
| 365 |
+
that overlaps it, so a conventional ASR may merge or select the wrong speaker's
|
| 366 |
+
words.
|
| 367 |
+
|
| 368 |
+
For overlap-aware speaker-attributed transcription, use an ASR model designed
|
| 369 |
+
to consume speaker activity and verify that its encoder frame geometry is
|
| 370 |
+
compatible with the diarization model.
|
| 371 |
+
|
| 372 |
+
## Troubleshooting
|
| 373 |
+
|
| 374 |
+
- **Only plain text appears:** Ensure you launched the multi-talker inference
|
| 375 |
+
script with both `asr_model` and `diar_model`, rather than calling
|
| 376 |
+
`asr_model.transcribe()` by itself.
|
| 377 |
+
- **A model cannot be downloaded:** Accept any required model terms and verify
|
| 378 |
+
that `HF_TOKEN` can read both repositories.
|
| 379 |
+
- **Audio is rejected or results are poor:** Convert it to mono, 16-bit PCM at
|
| 380 |
+
16 kHz.
|
| 381 |
+
- **CUDA out of memory:** Reduce `max_num_of_spks`. The multi-talker architecture
|
| 382 |
+
maintains speaker-specific ASR state, so memory and compute grow with the
|
| 383 |
+
number of simultaneous speaker streams.
|
| 384 |
+
- **Speaker labels change after reconnecting:** Labels are session-local and are
|
| 385 |
+
not biometric identities.
|
| 386 |
+
- **Streaming parameters fail validation:** Start with the configuration above.
|
| 387 |
+
The ASR and diarization chunk geometry must remain aligned; do not tune each
|
| 388 |
+
model independently.
|
Nemotron-3-Diarization.nemo
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:867c53f552998f772e5b5e5c082962ae85ee7ca5669c2bc17d7f615133d4e96d
|
| 3 |
+
size 198676480
|
Nemotron-3-Diarization.q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:08456d9e22cd9a323c0364d98375f3746d6e68507ebb705cd46438c534c7a3a1
|
| 3 |
+
size 107012128
|
README.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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: openmdw-1.1
|
| 3 |
+
pipeline_tag: voice-activity-detection
|
| 4 |
+
library_name: nemo
|
| 5 |
+
tags:
|
| 6 |
+
- speaker-diarization
|
| 7 |
+
- streaming-sortformer
|
| 8 |
+
- speaker-tagging
|
| 9 |
+
- transformers
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Nemotron 3 Diarization
|
| 13 |
+
|
| 14 |
+
## Description
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
**[Nemotron 3 Diarization](https://huggingface.co/blog/nvidia/nemotron-diarization)** is an open-weight speaker diarization model designed to determine "who spoke when" in real-world audio. It supports both streaming and offline inference and handles up to eight speakers. Following Sortformer [\[1\]](#ref-1), the model resolves speaker permutation by ordering its output channels according to each speaker's first arrival in the input audio.
|
| 19 |
+
|
| 20 |
+
For streaming inference, the model adopts the Arrival-Order Speaker Cache (AOSC) and FIFO queue introduced in **Streaming Sortformer** [\[2\]](#ref-2). The AOSC retains speaker information from earlier chunks to preserve speaker identities over time, while the FIFO queue provides recent frame context for each processing step.
|
| 21 |
+
|
| 22 |
+
A single checkpoint supports input buffer latency as low as 80 ms for latency-critical applications, although the lowest recommended configuration is 0.32 s; the offline-style configuration uses a 30.4 s input buffer. The output frame resolution is configurable in multiples of 10 ms. With chunked inference, the maximum audio duration is not limited.
|
| 23 |
+
|
| 24 |
+
**This model is ready for commercial or non-commercial use.**
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
**[Nemotron 3 Diarization HuggingFace Blog](https://huggingface.co/blog/nvidia/nemotron-diarization)**
|
| 28 |
+
|
| 29 |
+
## Release Date
|
| 30 |
+
|
| 31 |
+
September 23, 2026
|
| 32 |
+
|
| 33 |
+
## Live Action Demo Page
|
| 34 |
+
|
| 35 |
+
[**Hugging Face Spaces Demo: Nemotron-Diarization with Streaming ASR**](https://huggingface.co/spaces/nvidia/nemotron-diarization)
|
| 36 |
+
[](https://huggingface.co/spaces/nvidia/nemotron-diarization)
|
| 37 |
+
|
| 38 |
+
## What does max 8-speaker diarization mean ?
|
| 39 |
+
|
| 40 |
+
<video controls src="https://huggingface.co/nvidia/Nemotron-3-Diarization/resolve/main/nemotron3_tts_8_open_voices.mp4" width="100%"></video>
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
## How to use this model
|
| 44 |
+
|
| 45 |
+
### Run locally with NeMo-Speech.cpp
|
| 46 |
+
|
| 47 |
+
[NeMo-Speech.cpp](https://github.com/NVIDIA/NeMo-Speech.cpp) provides a
|
| 48 |
+
lightweight native C++ runtime for local speaker diarization. After
|
| 49 |
+
[installing the runtime](https://github.com/NVIDIA/NeMo-Speech.cpp#installation):
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
nemo-speech diarize meeting.wav
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
The same model can add word-level speaker tags to a transcription:
|
| 56 |
+
|
| 57 |
+
```bash
|
| 58 |
+
nemo-speech transcribe meeting.wav --diarize --json
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
See the [NeMo-Speech.cpp diarization guide](https://github.com/NVIDIA/NeMo-Speech.cpp/blob/main/docs/cli.md#diarize-audio)
|
| 62 |
+
for more usage examples.
|
| 63 |
+
|
| 64 |
+
### NVIDIA NeMo Speech
|
| 65 |
+
|
| 66 |
+
To train, fine-tune or perform inference with this model, install [NVIDIA NeMo Speech](https://github.com/NVIDIA-NeMo/Speech) after installing Python 3.12 or later, Cython, and a recent PyTorch version.
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
apt-get update && apt-get install -y libsndfile1 ffmpeg
|
| 70 |
+
uv pip install Cython packaging
|
| 71 |
+
uv pip install 'nemo-toolkit[asr]'
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
#### 🚀 Quick Start: Run Diarization Now
|
| 75 |
+
|
| 76 |
+
Here is a short example script that loads the model, runs diarization on a WAV file, and prints the results:
|
| 77 |
+
|
| 78 |
+
```python
|
| 79 |
+
from nemo.collections.asr.models import SortformerEncLabelModel
|
| 80 |
+
diar_model = SortformerEncLabelModel.from_pretrained("nvidia/Nemotron-3-Diarization")
|
| 81 |
+
diar_model.eval()
|
| 82 |
+
|
| 83 |
+
diar_model.sortformer_modules.chunk_len = 340
|
| 84 |
+
diar_model.sortformer_modules.chunk_right_context = 40
|
| 85 |
+
diar_model.sortformer_modules.fifo_len = 40
|
| 86 |
+
diar_model.sortformer_modules.spkcache_update_period = 300
|
| 87 |
+
diar_model._check_streaming_parameters()
|
| 88 |
+
|
| 89 |
+
predicted_segments = diar_model.diarize(audio=["/path/to/your/audio.wav"], batch_size=1)
|
| 90 |
+
|
| 91 |
+
for segment in predicted_segments[0]:
|
| 92 |
+
print(segment)
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
#### Loading the Model
|
| 96 |
+
|
| 97 |
+
```python
|
| 98 |
+
from nemo.collections.asr.models import SortformerEncLabelModel
|
| 99 |
+
|
| 100 |
+
# load model from Hugging Face model card directly (You need a Hugging Face token)
|
| 101 |
+
diar_model = SortformerEncLabelModel.from_pretrained("nvidia/Nemotron-3-Diarization")
|
| 102 |
+
|
| 103 |
+
# If you have a downloaded model in "/path/to/Nemotron-3-Diarization.nemo", load model from a downloaded file
|
| 104 |
+
diar_model = SortformerEncLabelModel.restore_from(restore_path="/path/to/Nemotron-3-Diarization.nemo", map_location='cuda', strict=False)
|
| 105 |
+
|
| 106 |
+
# switch to inference mode
|
| 107 |
+
diar_model.eval()
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
#### Input Format
|
| 111 |
+
Input can be an individual audio file:
|
| 112 |
+
```python
|
| 113 |
+
audio_input="/path/to/multispeaker_audio1.wav"
|
| 114 |
+
```
|
| 115 |
+
or a list of paths to audio files:
|
| 116 |
+
```python
|
| 117 |
+
audio_input=["/path/to/multispeaker_audio1.wav", "/path/to/multispeaker_audio2.wav"]
|
| 118 |
+
```
|
| 119 |
+
or a numpy array (single or list):
|
| 120 |
+
```python
|
| 121 |
+
import numpy as np
|
| 122 |
+
audio_input = np.random.randn(16000 * 10).astype(np.float32) # 10 sec at 16kHz
|
| 123 |
+
# or a list of arrays
|
| 124 |
+
audio_input = [audio_array1, audio_array2]
|
| 125 |
+
diar_model.diarize(audio=audio_input, batch_size=2, sample_rate=16000)
|
| 126 |
+
```
|
| 127 |
+
Note: When using numpy arrays, you **MUST** specify a correct `sample_rate` in `diar_model.diarize()` function.
|
| 128 |
+
Default `sample_rate` is `16000`.
|
| 129 |
+
|
| 130 |
+
or a line-delimited JSON manifest file:
|
| 131 |
+
```python
|
| 132 |
+
audio_input="/path/to/multispeaker_manifest.json"
|
| 133 |
+
```
|
| 134 |
+
where each line is a JSON object containing the following fields:
|
| 135 |
+
```jsonl
|
| 136 |
+
{"audio_filepath": "/path/to/multispeaker_audio1.wav", "offset": 0, "duration": 600}
|
| 137 |
+
{"audio_filepath": "/path/to/multispeaker_audio2.wav", "offset": 900, "duration": 580}
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
+
#### Setting up Streaming Configuration
|
| 141 |
+
|
| 142 |
+
Streaming configuration is defined by the following parameters, all measured in **80 ms frames**:
|
| 143 |
+
* `SPKCACHE_LEN`: Total number of frames in the speaker cache.
|
| 144 |
+
* `FIFO_LEN`: Number of previous frames attached before the current chunk from the FIFO queue.
|
| 145 |
+
* `CHUNK_LEN`: Number of frames in a processing chunk.
|
| 146 |
+
* `RIGHT_CONTEXT`: Number of future frames attached after the chunk.
|
| 147 |
+
* `UPDATE_PERIOD`: Number of frames extracted from the FIFO queue to update the speaker cache.
|
| 148 |
+
|
| 149 |
+
Here are recommended configurations for different scenarios:
|
| 150 |
+
| **Configuration** | **Latency** | `SPKCACHE_LEN` | `FIFO_LEN` | `CHUNK_LEN` | `RIGHT_CONTEXT` | `UPDATE_PERIOD` |
|
| 151 |
+
| --------------------------- | ------------------------ | --------------- | ----------- | ------------ | --------------- | --------------- |
|
| 152 |
+
| Very high latency (offline) | 30.4 s | 264 | 40 | 340 | 40 | 300 |
|
| 153 |
+
| Low latency | 1.04 s | 264 | 264 | 9 | 4 | 222 |
|
| 154 |
+
| Very low latency | 0.64 s | 264 | 264 | 6 | 2 | 222 |
|
| 155 |
+
| Ultra-low latency | 0.32 s | 264 | 264 | 3 | 1 | 222 |
|
| 156 |
+
|
| 157 |
+
> [!Note]
|
| 158 |
+
> **Latency** refers to **Input Buffer Latency**, calculated as (**CHUNK_LEN** + **RIGHT_CONTEXT**) × 80 ms. This value does not include computational processing time.
|
| 159 |
+
|
| 160 |
+
To set streaming configuration, use:
|
| 161 |
+
```python
|
| 162 |
+
diar_model.sortformer_modules.spkcache_len = SPKCACHE_LEN
|
| 163 |
+
diar_model.sortformer_modules.fifo_len = FIFO_LEN
|
| 164 |
+
diar_model.sortformer_modules.chunk_len = CHUNK_LEN
|
| 165 |
+
diar_model.sortformer_modules.chunk_right_context = RIGHT_CONTEXT
|
| 166 |
+
diar_model.sortformer_modules.spkcache_update_period = UPDATE_PERIOD
|
| 167 |
+
diar_model._check_streaming_parameters()
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
#### Getting Diarization Results
|
| 171 |
+
|
| 172 |
+
To perform speaker diarization and get a list of speaker-marked speech segments in the format 'begin_seconds, end_seconds, speaker_index', simply use:
|
| 173 |
+
```python
|
| 174 |
+
predicted_segments = diar_model.diarize(audio=audio_input, batch_size=1)
|
| 175 |
+
```
|
| 176 |
+
|
| 177 |
+
To obtain tensors of speaker activity probabilities, use:
|
| 178 |
+
```python
|
| 179 |
+
predicted_segments, predicted_probs = diar_model.diarize(audio=audio_input, batch_size=1, include_tensor_outputs=True)
|
| 180 |
+
```
|
| 181 |
+
Note that if you are feeding a list of numpy arrays, you **MUST** provide the `sample_rate` in integer format.
|
| 182 |
+
|
| 183 |
+
```python
|
| 184 |
+
predicted_segments, predicted_probs = diar_model.diarize(audio=[np_array1, np_array2], batch_size=2, sample_rate=16000)
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
#### 🔬 For more detailed evaluations (DER)
|
| 188 |
+
|
| 189 |
+
If you need to perform a comprehensive evaluation and calculate the accuracy and speed metrics across different parameter settings, use the NeMo example script [e2e_diarize_speech.py](https://github.com/NVIDIA-NeMo/Speech/blob/main/examples/speaker_tasks/diarization/neural_diarizer/e2e_diarize_speech.py).
|
| 190 |
+
This script allows you to test the streaming behavior of the model by adjusting key parameters like `chunk_len`, `fifo_len`, `chunk_right_context` and `spkcache_update_period`.
|
| 191 |
+
```bash
|
| 192 |
+
python ${NEMO_ROOT}/examples/speaker_tasks/diarization/neural_diarizer/e2e_diarize_speech.py \
|
| 193 |
+
pretrained_name="nvidia/Nemotron-3-Diarization" \
|
| 194 |
+
dataset_manifest="/path/to/diarization_manifest.json" \
|
| 195 |
+
batch_size=32 \
|
| 196 |
+
collar=0 \
|
| 197 |
+
precision=bf16 \
|
| 198 |
+
compile_encoder=false \
|
| 199 |
+
spkcache_len=264 \
|
| 200 |
+
spkcache_update_period=300 \
|
| 201 |
+
fifo_len=40 \
|
| 202 |
+
chunk_len=340 \
|
| 203 |
+
chunk_right_context=40
|
| 204 |
+
```
|
| 205 |
+
|
| 206 |
+
More details on the evaluation can be found in the [Diarization Evaluation](diarization_evaluation.md) subcard.
|
| 207 |
+
|
| 208 |
+
### 🤗 Transformers usage
|
| 209 |
+
|
| 210 |
+
This model is supported natively in [🤗 Transformers](https://github.com/huggingface/transformers)!
|
| 211 |
+
Install from source:
|
| 212 |
+
|
| 213 |
+
```bash
|
| 214 |
+
pip install git+https://github.com/huggingface/transformers
|
| 215 |
+
```
|
| 216 |
+
|
| 217 |
+
For more details about usage, please refer to the [Transformers documentation](https://huggingface.co/docs/transformers/en/model_doc/nemotron3_diarization).
|
| 218 |
+
|
| 219 |
+
<details>
|
| 220 |
+
<summary>➡️ Offline diarization</summary>
|
| 221 |
+
|
| 222 |
+
```python
|
| 223 |
+
import torch
|
| 224 |
+
from transformers import AutoModelForAudioFrameClassification, AutoProcessor
|
| 225 |
+
from transformers.audio_utils import load_audio
|
| 226 |
+
|
| 227 |
+
model_id = "nvidia/Nemotron-3-Diarization"
|
| 228 |
+
processor = AutoProcessor.from_pretrained(model_id)
|
| 229 |
+
model = AutoModelForAudioFrameClassification.from_pretrained(model_id, device_map="auto")
|
| 230 |
+
|
| 231 |
+
sampling_rate = processor.feature_extractor.sampling_rate
|
| 232 |
+
audio = load_audio(
|
| 233 |
+
"https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/diarization_example.mp3",
|
| 234 |
+
sampling_rate=sampling_rate,
|
| 235 |
+
)
|
| 236 |
+
inputs = processor(audio, sampling_rate=sampling_rate).to(model.device, dtype=model.dtype)
|
| 237 |
+
|
| 238 |
+
with torch.inference_mode():
|
| 239 |
+
logits = model(**inputs).logits # (1, num_frames, 8), one frame every 10 ms
|
| 240 |
+
|
| 241 |
+
segments = processor.extract_speaker_dict(logits, inputs.attention_mask)[0]
|
| 242 |
+
for segment in segments:
|
| 243 |
+
print(f"speaker_{segment['Speaker']}: {segment['Start']:.2f}s - {segment['End']:.2f}s")
|
| 244 |
+
```
|
| 245 |
+
</details>
|
| 246 |
+
|
| 247 |
+
<details>
|
| 248 |
+
<summary>➡️ Streaming diarization</summary>
|
| 249 |
+
|
| 250 |
+
Audio arrives chunk by chunk, and each forward takes one chunk: the processor cuts it for its `streaming_mode` and
|
| 251 |
+
adds `num_lookahead_frames`, the number of trailing look-ahead frames the model attends to but does not score, since
|
| 252 |
+
they open the next chunk. The forward returns the `speaker_cache` to pass to the next call. The last chunk of a
|
| 253 |
+
session is extracted with `is_last_audio_chunk=True`: it has no look-ahead, so every remaining frame is scored.
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
| `streaming_mode` | Latency¹ |
|
| 257 |
+
| ------------------------- | -------- |
|
| 258 |
+
| `"low_latency"` (default) | 1.04 s |
|
| 259 |
+
| `"very_low_latency"` | 0.64 s |
|
| 260 |
+
| `"ultra_low_latency"` | 0.32 s |
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
¹ Audio to wait for before the model runs on a chunk: the chunk plus its look-ahead, excluding compute time.
|
| 264 |
+
|
| 265 |
+
```python
|
| 266 |
+
import torch
|
| 267 |
+
from transformers import AutoModelForAudioFrameClassification, AutoProcessor
|
| 268 |
+
from transformers.audio_utils import load_audio
|
| 269 |
+
|
| 270 |
+
model_id = "nvidia/Nemotron-3-Diarization"
|
| 271 |
+
processor = AutoProcessor.from_pretrained(model_id)
|
| 272 |
+
model = AutoModelForAudioFrameClassification.from_pretrained(model_id, device_map="auto")
|
| 273 |
+
processor.set_streaming_mode("low_latency") # the default, can also be "very_low_latency" and "ultra_low_latency"
|
| 274 |
+
print(f"Streaming latency: {processor.streaming_latency_ms} ms")
|
| 275 |
+
|
| 276 |
+
sampling_rate = processor.feature_extractor.sampling_rate
|
| 277 |
+
audio = load_audio(
|
| 278 |
+
"https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/diarization_example.mp3",
|
| 279 |
+
sampling_rate=sampling_rate,
|
| 280 |
+
)
|
| 281 |
+
|
| 282 |
+
|
| 283 |
+
def inputs_generator():
|
| 284 |
+
"""Yields the processor outputs of each chunk."""
|
| 285 |
+
yield processor(
|
| 286 |
+
audio[: processor.num_samples_first_audio_chunk],
|
| 287 |
+
sampling_rate=sampling_rate,
|
| 288 |
+
is_streaming=True,
|
| 289 |
+
is_first_audio_chunk=True,
|
| 290 |
+
)
|
| 291 |
+
|
| 292 |
+
mel_frame_idx = processor.num_mel_frames_per_step
|
| 293 |
+
start_idx = processor.audio_chunk_start(mel_frame_idx)
|
| 294 |
+
while (end_idx := start_idx + processor.num_samples_per_audio_chunk) <= audio.shape[0]:
|
| 295 |
+
yield processor(
|
| 296 |
+
audio[start_idx:end_idx],
|
| 297 |
+
sampling_rate=sampling_rate,
|
| 298 |
+
is_streaming=True,
|
| 299 |
+
is_first_audio_chunk=False,
|
| 300 |
+
)
|
| 301 |
+
mel_frame_idx += processor.num_mel_frames_per_step
|
| 302 |
+
start_idx = processor.audio_chunk_start(mel_frame_idx)
|
| 303 |
+
|
| 304 |
+
# the audio ended: the frames left in the buffer are the last ones of the session
|
| 305 |
+
yield processor(
|
| 306 |
+
audio[start_idx:],
|
| 307 |
+
sampling_rate=sampling_rate,
|
| 308 |
+
is_streaming=True,
|
| 309 |
+
is_first_audio_chunk=False,
|
| 310 |
+
is_last_audio_chunk=True,
|
| 311 |
+
)
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
speaker_cache, logits = None, []
|
| 315 |
+
with torch.inference_mode():
|
| 316 |
+
for inputs in inputs_generator():
|
| 317 |
+
inputs = inputs.to(model.device, dtype=model.dtype)
|
| 318 |
+
# `inputs` carries `num_lookahead_frames` for every chunk but the last, `speaker_cache` links the chunks
|
| 319 |
+
outputs = model(**inputs, speaker_cache=speaker_cache)
|
| 320 |
+
logits.append(outputs.logits) # the chunk's frames, without its look-ahead
|
| 321 |
+
speaker_cache = outputs.speaker_cache
|
| 322 |
+
|
| 323 |
+
logits = torch.cat(logits, dim=1) # (1, num_frames, 8), one frame every 10 ms
|
| 324 |
+
segments = processor.extract_speaker_dict(logits)[0] # [{"Start": 0.0, "End": 15.43, "Speaker": 0}, ...]
|
| 325 |
+
```
|
| 326 |
+
</details>
|
| 327 |
+
|
| 328 |
+
### Integration with Streaming ASR
|
| 329 |
+
|
| 330 |
+
Please refer to the [ASR Integration Guide](ASR_INTEGRATION_GUIDE.md) for the detailed instructions on integration of Nemotron Diarization with Streaming ASR.
|
| 331 |
+
|
| 332 |
+
---
|
| 333 |
+
|
| 334 |
+
## Model Architecture
|
| 335 |
+
|
| 336 |
+
**Architecture Type:** Transformer.
|
| 337 |
+
|
| 338 |
+
**Network Architecture:**
|
| 339 |
+
|
| 340 |
+
- A 31-layer Transformer encoder with Rotary Positional Embeddings (RoPE).
|
| 341 |
+
- 10 ms Mel-spectrogram input features downsampled by a factor of eight through feature stacking, producing an 80 ms encoder frame rate.
|
| 342 |
+
- A Conv1D layer above the encoder that upsamples predictions to the 10 ms input-feature resolution.
|
| 343 |
+
- AOSC and a FIFO queue for streaming inference.
|
| 344 |
+
|
| 345 |
+
**Number of model parameters:** 100M (1.0 × 10⁸).
|
| 346 |
+
|
| 347 |
+
## Input
|
| 348 |
+
|
| 349 |
+
**Input Type:** Audio.
|
| 350 |
+
|
| 351 |
+
**Input Format:** 16 kHz, single-channel audio in `.wav`, `.flac`, `.opus`, or `.mp3` format.
|
| 352 |
+
|
| 353 |
+
**Input Parameters:** One-dimensional, 16 kHz, single-channel audio waveform.
|
| 354 |
+
|
| 355 |
+
**Maximum Duration:** Not limited when chunked inference is used.
|
| 356 |
+
|
| 357 |
+
**Other Properties Related to Input:** Input audio must be sampled at 16 kHz and is converted into 10 ms Mel-spectrogram features. Chunked inference supports recordings without a fixed maximum duration.
|
| 358 |
+
|
| 359 |
+
## Output
|
| 360 |
+
|
| 361 |
+
**Output Type:** Other: Numerical tensor.
|
| 362 |
+
|
| 363 |
+
**Output Format:** Float Tensor.
|
| 364 |
+
|
| 365 |
+
**Output Parameters:** A two-dimensional tensor with shape `[T, 8]`, where `T` is the number of output frames and each value is a per-speaker activity probability in the range `[0, 1]`.
|
| 366 |
+
|
| 367 |
+
**Output Frame Resolution:** The default frame stride is 10 ms and can be configured to any multiple of 10 ms, such as 30 ms, 80 ms, or 240 ms.
|
| 368 |
+
|
| 369 |
+
**Speaker Ordering:** The eight speaker channels are ordered by the speakers' arrival time in the input audio.
|
| 370 |
+
|
| 371 |
+
**Derived Output:** Speaker activity probabilities can be converted into start time, end time, and a generic speaker label, for example `["speaker1", 0.51, 12.62]`.
|
| 372 |
+
|
| 373 |
+
**Other Properties Related to Output:** The output frame resolution is configurable in multiples of 10 ms. Speaker channels are ordered by first arrival, and probabilities can be postprocessed into generic speaker labels with start and end timestamps.
|
| 374 |
+
|
| 375 |
+
---
|
| 376 |
+
|
| 377 |
+
## Software Integration
|
| 378 |
+
|
| 379 |
+
**Runtime Engine(s):** NeMo Framework v3.0.
|
| 380 |
+
|
| 381 |
+
### Supported Hardware Microarchitecture Compatibility
|
| 382 |
+
|
| 383 |
+
Our AI models are designed and/or optimized to run on NVIDIA GPU-accelerated systems.
|
| 384 |
+
|
| 385 |
+
**Ampere NVIDIA GPUs:**
|
| 386 |
+
|
| 387 |
+
- GeForce RTX 3090 Ti, RTX 3090, RTX 3080 Ti, RTX 3080, RTX 3070 Ti, RTX 3070, RTX 3060 Ti, RTX 3060, and RTX 3050.
|
| 388 |
+
- NVIDIA RTX A6000, RTX A5500, RTX A5000, RTX A4500, RTX A4000, RTX A2000, RTX A1000, and RTX A400.
|
| 389 |
+
- NVIDIA A100 PCIe, A100 SXM, A30, A40, A16, A10, and A2.
|
| 390 |
+
|
| 391 |
+
**Ampere NVIDIA Workstations:** NVIDIA DGX Station A100.
|
| 392 |
+
|
| 393 |
+
**Ada Lovelace NVIDIA GPUs:**
|
| 394 |
+
|
| 395 |
+
- GeForce RTX 4090, RTX 4080, RTX 4070 Ti, RTX 4070, RTX 4060 Ti, RTX 4060, and RTX 4050.
|
| 396 |
+
- NVIDIA RTX 6000 Ada, RTX 5000 Ada, RTX 4500 Ada, RTX 4000 Ada, RTX 4000 SFF Ada, and RTX 2000 Ada.
|
| 397 |
+
- NVIDIA L4, L40, and L40S.
|
| 398 |
+
|
| 399 |
+
**Blackwell NVIDIA GPUs:**
|
| 400 |
+
|
| 401 |
+
- GeForce RTX 5090, RTX 5080, RTX 5070 Ti, RTX 5070, RTX 5060 Ti, RTX 5060, and RTX 5050.
|
| 402 |
+
- RTX PRO 6000 Blackwell Workstation Edition, RTX PRO 6000 Blackwell Max-Q Workstation Edition, RTX PRO 5000 Blackwell, RTX PRO 4500 Blackwell Workstation Edition, RTX PRO 4000 Blackwell, RTX PRO 4000 Blackwell SFF Edition, and RTX PRO 2000 Blackwell.
|
| 403 |
+
- RTX PRO 6000 Blackwell Server Edition and RTX PRO 4500 Blackwell Server Edition.
|
| 404 |
+
- NVIDIA B200, B300, GB200, and GB300.
|
| 405 |
+
|
| 406 |
+
**Blackwell NVIDIA Workstations:** NVIDIA DGX Spark and NVIDIA DGX Station.
|
| 407 |
+
|
| 408 |
+
**Hopper NVIDIA GPUs:** NVIDIA H100 PCIe, H100 SXM, H100 NVL, H200 SXM, H200 NVL, and GH200.
|
| 409 |
+
|
| 410 |
+
**Preferred/Supported Operating System(s):**
|
| 411 |
+
* Linux
|
| 412 |
+
|
| 413 |
+
The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment.
|
| 414 |
+
|
| 415 |
+
---
|
| 416 |
+
|
| 417 |
+
## Model Version
|
| 418 |
+
|
| 419 |
+
Nemotron 3 Diarization (General Access).
|
| 420 |
+
|
| 421 |
+
The model can be integrated into conversational AI systems through NeMo Framework inference pipelines to produce per-speaker activity probabilities or postprocessed generic speaker labels and timestamps.
|
| 422 |
+
|
| 423 |
+
## Training and Evaluation Datasets
|
| 424 |
+
|
| 425 |
+
### Training Datasets
|
| 426 |
+
|
| 427 |
+
The model was trained on a combination of real conversations and multi-talker audio mixtures with 1-8 speakers simulated using the [FastMSS](https://github.com/popcornell/FastMSS) toolkit [\[3\]](#ref-3).
|
| 428 |
+
|
| 429 |
+
**Real conversations:** Total duration is around 10,000 hours.
|
| 430 |
+
|
| 431 |
+
| Dataset | Language | Split or description |
|
| 432 |
+
| ------------------------------------------------- | ---------------------------------------- | ---------------------------------------------------- |
|
| 433 |
+
| Fisher English | English | Training Part 1 and Part 2 |
|
| 434 |
+
| AMI Meeting Corpus | English | Train and development; force-aligned [\[4\]](#ref-4) |
|
| 435 |
+
| ICSI | English | Full |
|
| 436 |
+
| VoxConverse v0.3 | Multilingual | Development and test |
|
| 437 |
+
| AISHELL-4 | Mandarin | Train |
|
| 438 |
+
| Third DIHARD Challenge | Multilingual | Development |
|
| 439 |
+
| 2000 NIST Speaker Recognition Evaluation | Multilingual | CALLHOME Part 1 |
|
| 440 |
+
| AliMeeting Mandarin Corpus | Mandarin | Train; force-aligned [\[4\]](#ref-4) |
|
| 441 |
+
| DiPCo — Dinner Party Corpus | English | Development |
|
| 442 |
+
| NOTSOFAR1 | English | Train and development; force-aligned [\[3\]](#ref-3) |
|
| 443 |
+
| DISPLACE 2024 | English, Hindi, Kannada, Telugu, Bengali | Development and evaluation |
|
| 444 |
+
| DISPLACE-M 2026 | Hindi, Kannada | Development 1, 2, and 3 |
|
| 445 |
+
| David AI — [D2] Multispeaker | English | Licensed under agreement; 3-4 speakers 1,000 hours |
|
| 446 |
+
| YODAS-v2 | Multilingual | Pseudo-labeled 5,000-hour subset |
|
| 447 |
+
|
| 448 |
+
**Data used to simulate multi-talker audio mixtures:** Total duration of single-speaker audio recordings is around 28,000 hours.
|
| 449 |
+
|
| 450 |
+
| Dataset | Language | Split or description |
|
| 451 |
+
| ------------------------------------------------- | ---------------------------------------- | --------------------------- |
|
| 452 |
+
| LibriSpeech | English | Train-960h |
|
| 453 |
+
| AMI Meeting Corpus (individual headsets) | English | Train and development |
|
| 454 |
+
| AliMeeting Mandarin Corpus (individual headsets) | Mandarin | Train |
|
| 455 |
+
| Fisher English | English | Training Part 1 and Part 2 |
|
| 456 |
+
| David AI — [D1] Chit Chat | English | Licensed under agreement |
|
| 457 |
+
| David AI — [D2] Multispeaker | English | Licensed under agreement |
|
| 458 |
+
| David AI — [D6a] Podcast | English | Licensed under agreement |
|
| 459 |
+
| David AI — [D6b] Advice | English | Licensed under agreement |
|
| 460 |
+
| David AI — [D7] Expert Assistant | English | Licensed under agreement |
|
| 461 |
+
| David AI — [D12] Human Transcripts | 21 languages | Licensed under agreement |
|
| 462 |
+
| MUSAN noises | Not applicable | Noises for augmentation |
|
| 463 |
+
|
| 464 |
+
**Multi-talker audio mixtures used in training:**
|
| 465 |
+
* Librispeech: 6,694 hours
|
| 466 |
+
* AMI: 6,743 hours
|
| 467 |
+
* AliMeeting: 6,745 hours
|
| 468 |
+
* Fisher English: 6,755 hours
|
| 469 |
+
* David AI English: 36,458 hours
|
| 470 |
+
* David AI Multilingual: 19,216 hours
|
| 471 |
+
|
| 472 |
+
**Properties:** Approximately 10,000 hours of real conversations plus 82,611 hours of simulated multi-talker audio mixtures. The data modality is audio and includes conversational speech, telephone calls, meetings, podcasts, noise augmentation, and synthetic mixtures. Languages include English, Mandarin, Hindi, Kannada, Telugu, Bengali, and other languages represented in the multilingual sources. Voice recordings may constitute personal data.
|
| 473 |
+
|
| 474 |
+
### Evaluation Dataset
|
| 475 |
+
|
| 476 |
+
| Dataset | Language | Speakers | Recordings | Description | Labels |
|
| 477 |
+
| -------------------- | ------------ | -------- | ----------------------------------------------------------- | --------------------------------------------- | -------------------------------- |
|
| 478 |
+
| DIHARD III Eval | Multilingual | 1–9 | 1–4 speakers: 219<br>5–9 speakers: 40<br>**Total: 259** | 11-domain benchmark | Original |
|
| 479 |
+
| CALLHOME-Part2 | Multilingual | 2–6 | 2: 148<br>3: 74<br>4: 20<br>5: 5<br>6: 3<br>**Total: 250** | Telephonic speech | Original |
|
| 480 |
+
| AliMeeting Test Near | Mandarin | 2–4 | 20 | Meetings, mix of headset microphones | [Forced alignment](https://github.com/nttcslab-sp/diar-forced-alignment) [\[4\]](#ref-4) |
|
| 481 |
+
| AliMeeting Test Far | Mandarin | 2–4 | 20 | Meetings, far-field conditions | [Forced alignment](https://github.com/nttcslab-sp/diar-forced-alignment) [\[4\]](#ref-4) |
|
| 482 |
+
| AMI Test MHM | English | 3–4 | 16 | Meetings, mix of headset microphones | [Forced alignment](https://github.com/nttcslab-sp/diar-forced-alignment) [\[4\]](#ref-4) |
|
| 483 |
+
| AMI Test SDM | English | 3–4 | 16 | Meetings, far-field single-channel conditions | [Forced alignment](https://github.com/nttcslab-sp/diar-forced-alignment) [\[4\]](#ref-4) |
|
| 484 |
+
| NOTSOFAR1 Eval MHM | English | 3–7 | 3–4 speakers: 70<br>5–7 speakers: 90<br>**Total: 160** | Meetings, mix of headset microphones | [Forced alignment](https://github.com/popcornell/FastMSS/blob/master/resources/notsofar1-channels_mfa_rttms.tar.gz) [\[3\]](#ref-3) |
|
| 485 |
+
| NOTSOFAR1 Eval SC | English | 3–7 | 3–4 speakers: 70<br>5–7 speakers: 90<br>**Total: 160** | Meetings, far-field single-channel conditions | [Forced alignment](https://github.com/popcornell/FastMSS/blob/master/resources/notsofar1-channels_mfa_rttms.tar.gz) [\[3\]](#ref-3) |
|
| 486 |
+
|
| 487 |
+
**Properties:** 901 condition-specific audio recordings comprising real-world multilingual conversational speech captured under telephone, meeting, near-field, far-field, and multi-microphone conditions. The data may contain personal data in the form of voice recordings. Languages include English, Mandarin, and other languages represented in the multilingual benchmarks.
|
| 488 |
+
|
| 489 |
+
---
|
| 490 |
+
|
| 491 |
+
## Training
|
| 492 |
+
|
| 493 |
+
The model training was initialized with a Transformer-based NEST [\[5\]](#ref-5) SSL checkpoint.
|
| 494 |
+
Training was performed on 8 nodes of 8×NVIDIA A100-SXM4-80GB GPUs in two stages.
|
| 495 |
+
|
| 496 |
+
1. Offline training on simulated data only using the [example script](https://github.com/NVIDIA-NeMo/Speech/blob/main/examples/speaker_tasks/diarization/neural_diarizer/sortformer_diar_train.py) and [base config](https://github.com/NVIDIA-NeMo/Speech/blob/main/examples/speaker_tasks/diarization/conf/neural_diarizer/sortformer_offline_8spk.yaml).
|
| 497 |
+
2. Streaming fine-tuning on a combination of real conversations and simulated mixtures using the [example script](https://github.com/NVIDIA-NeMo/Speech/blob/main/examples/speaker_tasks/diarization/neural_diarizer/streaming_sortformer_diar_train.py) and [base config](https://github.com/NVIDIA-NeMo/Speech/blob/main/examples/speaker_tasks/diarization/conf/neural_diarizer/sortformer_streaming_8spk.yaml).
|
| 498 |
+
|
| 499 |
+
## Performance Evaluation
|
| 500 |
+
|
| 501 |
+
> [!IMPORTANT]
|
| 502 |
+
>
|
| 503 |
+
> ### Use the published reference labels to reproduce these results!
|
| 504 |
+
>
|
| 505 |
+
> The DER scores reported in this model card were computed using the **exact reference annotations identified in the `Labels` column above**. Reference RTTMs are part of the evaluation protocol: changing the reference labels changes the measured result.
|
| 506 |
+
>
|
| 507 |
+
> We use forced-alignment based reference labels for **AMI**, **AliMeeting** and **NOTSOFAR1** because the original segment-level annotations were created primarily for transcription rather than frame-accurate diarization evaluation. These annotations may label substantial within-segment silence as speech, thereby overestimating reference speaker activity. When used for DER scoring, they can inflate missed-speech error by penalizing a diarization system for correctly predicting non-speech during those intervals. Forced alignment provides more precise speech boundaries and therefore a more appropriate and interpretable reference for frame-level diarization evaluation. Please refer to [\[4\]](#ref-4) for a detailed discussion of this annotation issue and the forced-alignment methodology.
|
| 508 |
+
>
|
| 509 |
+
> The `Forced alignment` links above point to the public repositories containing the reference RTTM files used for evaluation.
|
| 510 |
+
>
|
| 511 |
+
> Results obtained using different reference labels constitute a different evaluation protocol and are **not directly comparable** with the numbers reported here. Before reporting a reproduction discrepancy, score the same model outputs using the linked reference RTTMs, the listed dataset split, and the collar and overlap settings specified in the [Metrics](#metrics) section.
|
| 512 |
+
|
| 513 |
+
|
| 514 |
+
### Baseline
|
| 515 |
+
|
| 516 |
+
[nvidia/diar_streaming_sortformer_4spk-v2.1](https://huggingface.co/nvidia/diar_streaming_sortformer_4spk-v2.1)
|
| 517 |
+
|
| 518 |
+
**Baseline model's latency configurations:**
|
| 519 |
+
|
| 520 |
+
| **Configuration** | **Latency** | `SPKCACHE_LEN` | `FIFO_LEN` | `CHUNK_LEN` | `RIGHT_CONTEXT` | `UPDATE_PERIOD` |
|
| 521 |
+
| --------------------------- | ----------- | -------------- | ---------- | ----------- | --------------- | --------------- |
|
| 522 |
+
| Very high latency (offline) | 30.4 s | 188 | 40 | 340 | 40 | 300 |
|
| 523 |
+
| Low latency | 1.04 s | 188 | 188 | 6 | 7 | 144 |
|
| 524 |
+
| Ultra-low latency | 0.32 s | 188 | 188 | 3 | 1 | 144 |
|
| 525 |
+
|
| 526 |
+
### Metrics
|
| 527 |
+
|
| 528 |
+
**Diarization Error Rate (DER):** The primary metric for diarization performance, consisting of false alarm (FA), missed speech (Miss), and speaker confusion (Conf).
|
| 529 |
+
* All evaluations include overlapping speech.
|
| 530 |
+
* Collar tolerance is 0 s for DIHARD III Eval, AliMeeting Test, AMI Test and NOTSOFAR1 Eval.
|
| 531 |
+
* Collar tolerance is 0.25 s for CALLHOME-part2.
|
| 532 |
+
|
| 533 |
+
**Speaker Counting Accuracy (SCA):** `1` when the predicted and ground-truth speaker counts are equal; otherwise `0`. This metric does not capture the magnitude of a counting error.
|
| 534 |
+
|
| 535 |
+
**Speaker Counting Mean Absolute Error (MAE):** `|predicted speaker count - ground-truth speaker count|`. This metric is more informative than SCA because it reflects magnitude of speaker counting error.
|
| 536 |
+
|
| 537 |
+
**Real-Time Factor Speedup (RTFx):** `total audio duration / total processing time`.
|
| 538 |
+
|
| 539 |
+
### Performance Evaluation Results
|
| 540 |
+
|
| 541 |
+
Results reported below were obtained using the NeMo example script [e2e_diarize_speech.py](https://github.com/NVIDIA-NeMo/Speech/blob/main/examples/speaker_tasks/diarization/neural_diarizer/e2e_diarize_speech.py).
|
| 542 |
+
|
| 543 |
+
#### DIHARD III
|
| 544 |
+
|
| 545 |
+
| Model | Latency | DER ↓<br>(1–4 spk) | DER ↓<br>(5–9 spk) | DER ↓<br>(full) | SCA ↑<br>(full) | MAE ↓<br>(full) |
|
| 546 |
+
| ------------------------------------- | ------- | ------------------ | ------------------ | --------------- | --------------- | --------------- |
|
| 547 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 30.4 s | 13.98 | 40.21 | 19.09 | 75.29 | 0.5135 |
|
| 548 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 1.04 s | 14.33 | 41.39 | 19.60 | 69.50 | 0.5483 |
|
| 549 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 0.32 s | 14.37 | 42.71 | 19.85 | 66.80 | 0.5869 |
|
| 550 |
+
| `Nemotron-3-Diarization` | 30.4 s | **9.13** | **27.58** | **12.73** | **81.47** | **0.2664** |
|
| 551 |
+
| `Nemotron-3-Diarization` | 1.04 s | **9.47** | **28.65** | **13.18** | **76.83** | **0.3243** |
|
| 552 |
+
| `Nemotron-3-Diarization` | 0.64 s | **9.44** | **29.16** | **13.28** | **77.22** | **0.3205** |
|
| 553 |
+
| `Nemotron-3-Diarization` | 0.32 s | **9.69** | **29.49** | **13.55** | **76.45** | **0.3282** |
|
| 554 |
+
|
| 555 |
+
#### CALLHOME-Part2
|
| 556 |
+
|
| 557 |
+
| Model | Latency | DER ↓<br>(2 spk) | DER ↓<br>(3 spk) | DER ↓<br>(4 spk) | DER ↓<br>(5 spk) | DER ↓<br>(6 spk) | DER ↓<br>(full) | SCA ↑<br>(full) | MAE ↓<br>(full) |
|
| 558 |
+
| ------------------------------------- | ------- | ---------------- | ---------------- | ---------------- | ---------------- | ---------------- | --------------- | --------------- | --------------- |
|
| 559 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 30.4 s | 5.68 | 10.41 | 12.36 | 21.00 | 21.15 | 10.32 | 84.40 | 0.1720 |
|
| 560 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 1.04 s | 6.83 | 11.26 | 13.49 | 21.67 | 23.82 | 11.31 | 82.40 | 0.1880 |
|
| 561 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 0.32 s | 7.92 | 12.54 | 15.32 | 24.01 | 27.70 | 12.67 | 72.40 | 0.2920 |
|
| 562 |
+
| `Nemotron-3-Diarization` | 30.4 s | **5.98** | **9.26** | **11.03** | **15.82** | **15.80** | **9.10** | **91.60** | **0.0840** |
|
| 563 |
+
| `Nemotron-3-Diarization` | 1.04 s | **6.98** | **10.90** | **11.84** | **18.47** | **16.01** | **10.29** | **89.20** | **0.1080** |
|
| 564 |
+
| `Nemotron-3-Diarization` | 0.64 s | **7.21** | **11.17** | **12.10** | **19.31** | **16.70** | **10.66** | **88.40** | **0.1160** |
|
| 565 |
+
| `Nemotron-3-Diarization` | 0.32 s | **7.75** | **11.84** | **13.02** | **20.65** | **17.30** | **11.32** | **88.40** | **0.1160** |
|
| 566 |
+
|
| 567 |
+
#### AliMeeting Test Near
|
| 568 |
+
|
| 569 |
+
| Model | Latency | DER ↓ | SCA ↑ | MAE ↓ |
|
| 570 |
+
| ------------------------------------- | ------- | ----- | ----- | ----- |
|
| 571 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 30.4 s | 11.57 | 80.00 | 0.20 |
|
| 572 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 1.04 s | 12.47 | 70.00 | 0.30 |
|
| 573 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 0.32 s | 13.68 | 70.00 | 0.30 |
|
| 574 |
+
| `Nemotron-3-Diarization` | 30.4 s | **6.40** | **90.00** | **0.10** |
|
| 575 |
+
| `Nemotron-3-Diarization` | 1.04 s | **6.59** | **85.00** | **0.15** |
|
| 576 |
+
| `Nemotron-3-Diarization` | 0.64 s | **6.74** | **85.00** | **0.15** |
|
| 577 |
+
| `Nemotron-3-Diarization` | 0.32 s | **7.19** | **80.00** | **0.20** |
|
| 578 |
+
|
| 579 |
+
#### AliMeeting Test Far
|
| 580 |
+
|
| 581 |
+
| Model | Latency | DER ↓ | SCA ↑ | MAE ↓ |
|
| 582 |
+
| ------------------------------------- | ------- | ----- | ----- | ----- |
|
| 583 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 30.4 s | 13.69 | 95.00 | 0.05 |
|
| 584 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 1.04 s | 15.58 | 75.00 | 0.25 |
|
| 585 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 0.32 s | 16.85 | 65.00 | 0.35 |
|
| 586 |
+
| `Nemotron-3-Diarization` | 30.4 s | **10.47** | **100** | **0** |
|
| 587 |
+
| `Nemotron-3-Diarization` | 1.04 s | **10.80** | **95.00** | **0.05** |
|
| 588 |
+
| `Nemotron-3-Diarization` | 0.64 s | **11.03** | **85.00** | **0.15** |
|
| 589 |
+
| `Nemotron-3-Diarization` | 0.32 s | **11.60** | **85.00** | **0.15** |
|
| 590 |
+
|
| 591 |
+
#### AMI Test MHM
|
| 592 |
+
|
| 593 |
+
| Model | Latency | DER ↓ | SCA ↑ | MAE ↓ |
|
| 594 |
+
| ------------------------------------- | ------- | ----- | ----- | ------ |
|
| 595 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 30.4 s | 15.81 | 93.75 | 0.0625 |
|
| 596 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 1.04 s | 16.36 | 93.75 | 0.0625 |
|
| 597 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 0.32 s | 17.77 | 93.75 | 0.0625 |
|
| 598 |
+
| `Nemotron-3-Diarization` | 30.4 s | **9.25** | **87.50** | **0.1250** |
|
| 599 |
+
| `Nemotron-3-Diarization` | 1.04 s | **9.48** | **81.25** | **0.1875** |
|
| 600 |
+
| `Nemotron-3-Diarization` | 0.64 s | **9.62** | **81.25** | **0.1875** |
|
| 601 |
+
| `Nemotron-3-Diarization` | 0.32 s | **10.05** | **81.25** | **0.1875** |
|
| 602 |
+
|
| 603 |
+
#### AMI Test SDM
|
| 604 |
+
|
| 605 |
+
| Model | Latency | DER ↓ | SCA ↑ | MAE ↓ |
|
| 606 |
+
| ------------------------------------- | ------- | ----- | ----- | ------ |
|
| 607 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 30.4 s | 21.42 | 93.75 | 0.0625 |
|
| 608 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 1.04 s | 21.73 | 93.75 | 0.0625 |
|
| 609 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 0.32 s | 23.89 | 93.75 | 0.0625 |
|
| 610 |
+
| `Nemotron-3-Diarization` | 30.4 s | **11.14** | **87.50** | **0.1250** |
|
| 611 |
+
| `Nemotron-3-Diarization` | 1.04 s | **12.80** | **87.50** | **0.1250** |
|
| 612 |
+
| `Nemotron-3-Diarization` | 0.64 s | **13.06** | **87.50** | **0.1250** |
|
| 613 |
+
| `Nemotron-3-Diarization` | 0.32 s | **12.95** | **87.50** | **0.1250** |
|
| 614 |
+
|
| 615 |
+
#### NOTSOFAR1 MHM
|
| 616 |
+
|
| 617 |
+
| Model | Latency | DER ↓<br>(3–4 spk) | DER ↓<br>(5–7 spk) | DER ↓<br>(full) | SCA ↑<br>(full) | MAE ↓<br>(full) |
|
| 618 |
+
| ------------------------------------- | ------- | ------------------ | ------------------ | --------------- | --------------- | --------------- |
|
| 619 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 30.4 s | 11.14 | 29.38 | 21.77 | 35.00 | 0.9375 |
|
| 620 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 1.04 s | 12.03 | 29.49 | 22.12 | 34.38 | 0.9437 |
|
| 621 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 0.32 s | 12.94 | 30.75 | 23.37 | 32.50 | 0.9625 |
|
| 622 |
+
| `Nemotron-3-Diarization` | 30.4 s | **5.25** | **7.86** | **6.77** | **93.75** | **0.0625** |
|
| 623 |
+
| `Nemotron-3-Diarization` | 1.04 s | **5.85** | **9.02** | **7.70** | **79.37** | **0.2062** |
|
| 624 |
+
| `Nemotron-3-Diarization` | 0.64 s | **6.07** | **9.39** | **7.99** | **79.37** | **0.2062** |
|
| 625 |
+
| `Nemotron-3-Diarization` | 0.32 s | **6.57** | **10.16** | **8.65** | **74.38** | **0.2687** |
|
| 626 |
+
|
| 627 |
+
#### NOTSOFAR1 SC
|
| 628 |
+
|
| 629 |
+
| Model | Latency | DER ↓<br>(3–4 spk) | DER ↓<br>(5–7 spk) | DER ↓<br>(full) | SCA ↑<br>(full) | MAE ↓<br>(full) |
|
| 630 |
+
| ------------------------------------- | ------- | ------------------ | ------------------ | --------------- | --------------- | --------------- |
|
| 631 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 30.4 s | 19.67 | 38.42 | 30.49 | 33.12 | 0.9563 |
|
| 632 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 1.04 s | 20.58 | 39.84 | 31.81 | 33.12 | 0.9563 |
|
| 633 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 0.32 s | 22.14 | 40.80 | 32.95 | 31.87 | 0.9688 |
|
| 634 |
+
| `Nemotron-3-Diarization` | 30.4 s | **7.94** | **13.21** | **11.00** | **78.12** | **0.2188** |
|
| 635 |
+
| `Nemotron-3-Diarization` | 1.04 s | **8.96** | **15.44** | **12.77** | **60.62** | **0.4062** |
|
| 636 |
+
| `Nemotron-3-Diarization` | 0.64 s | **9.47** | **16.16** | **13.35** | **55.00** | **0.4625** |
|
| 637 |
+
| `Nemotron-3-Diarization` | 0.32 s | **10.28** | **17.61** | **14.53** | **55.00** | **0.4625** |
|
| 638 |
+
|
| 639 |
+
### Inference Speed Evaluation
|
| 640 |
+
|
| 641 |
+
| Model | Latency | RTFx ↑ (`batch_size=1`) eager / compiled | RTFx ↑ (`batch_size=32`) eager / compiled |
|
| 642 |
+
| ------------------------------------- | ------- | ---------------------------------------- | ----------------------------------------- |
|
| 643 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 30.4 s | 874 / 1468 | 3204 / 2619 |
|
| 644 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 1.04 s | 16 / 42 | 193 / 136 |
|
| 645 |
+
| `diar_streaming_sortformer_4spk-v2.1` | 0.32 s | 8 / 21 | 101 / 76 |
|
| 646 |
+
| `Nemotron-3-Diarization` | 30.4 s | **1340 / 4385** | **12196 / 15113** |
|
| 647 |
+
| `Nemotron-3-Diarization` | 1.04 s | **38 / 164** | **581 / 865** |
|
| 648 |
+
| `Nemotron-3-Diarization` | 0.64 s | **25 / 113** | **391 / 579** |
|
| 649 |
+
| `Nemotron-3-Diarization` | 0.32 s | **12.5 / 54** | **199 / 292** |
|
| 650 |
+
|
| 651 |
+
**Acceleration Engine:** PyTorch backend through the NeMo Framework, with and without `torch.compile()`.
|
| 652 |
+
|
| 653 |
+
**Test Hardware:** NVIDIA Blackwell RTX PRO 5000.
|
| 654 |
+
|
| 655 |
+
**Precision:** BF16.
|
| 656 |
+
|
| 657 |
+
---
|
| 658 |
+
|
| 659 |
+
## License/Terms of Use
|
| 660 |
+
|
| 661 |
+
Use of this model is governed by the [OpenMDW License Agreement, version 1.1](https://openmdw.ai/license/1-1/).
|
| 662 |
+
|
| 663 |
+
## Deployment Geography
|
| 664 |
+
|
| 665 |
+
Global
|
| 666 |
+
|
| 667 |
+
## Use Case
|
| 668 |
+
|
| 669 |
+
Nemotron 3 Diarization is intended for speaker diarization in live or recorded conversational audio, including meetings, calls, podcasts, and speech-recognition pipelines that need generic speaker labels and speaker timestamps.
|
| 670 |
+
|
| 671 |
+
## References
|
| 672 |
+
|
| 673 |
+
<a id="ref-1"></a>[1] [Sortformer: A Novel Approach for Permutation-Resolved Speaker Supervision in Speech-to-Text Systems](https://arxiv.org/abs/2409.06656)
|
| 674 |
+
|
| 675 |
+
<a id="ref-2"></a>[2] [Streaming Sortformer: Speaker Cache-Based Online Speaker Diarization with Arrival-Time Ordering](https://arxiv.org/abs/2507.18446)
|
| 676 |
+
|
| 677 |
+
<a id="ref-3"></a>[3] [Mind the Gap: Impact of Synthetic Conversational Data on Multi-Talker ASR and Speaker Diarization](https://arxiv.org/abs/2605.15442)
|
| 678 |
+
|
| 679 |
+
<a id="ref-4"></a>[4] [Can We Really Repurpose Multi-Speaker ASR Corpus for Speaker Diarization?](https://arxiv.org/abs/2507.09226)
|
| 680 |
+
|
| 681 |
+
<a id="ref-5"></a>[5] [NEST: Self-supervised Fast Conformer as All-purpose Seasoning to Speech Processing Tasks](https://arxiv.org/abs/2408.13106)
|
| 682 |
+
|
| 683 |
+
---
|
| 684 |
+
|
| 685 |
+
## Ethical Considerations
|
| 686 |
+
|
| 687 |
+
NVIDIA believes Trustworthy AI is a shared responsibility and has established policies and practices to enable development for a wide array of AI applications. Developers should evaluate the model with use-case-specific data and ensure that the complete system meets the requirements of the relevant industry and deployment context.
|
| 688 |
+
|
| 689 |
+
For more detailed information, see the [Bias](bias.md), [Explainability](explainability.md), [Safety & Security](safety.md), and [Privacy](privacy.md) subcards.
|
| 690 |
+
|
| 691 |
+
Please report model quality, risk, security vulnerabilities, or NVIDIA AI concerns through the [NVIDIA security reporting portal](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
|
bias.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Field | Response
|
| 2 |
+
:---|:---
|
| 3 |
+
Participation considerations from adversely impacted groups [protected classes](https://www.senate.ca.gov/content/protected-classes) in model design and testing: | None
|
| 4 |
+
Measures taken to mitigate against unwanted bias: | None
|
| 5 |
+
Bias Metric (If Measured): | Not Applicable
|
config.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Nemotron3DiarizationForAudioFrameClassification"
|
| 4 |
+
],
|
| 5 |
+
"audio_config": {
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"hidden_act": "gelu",
|
| 8 |
+
"hidden_size": 512,
|
| 9 |
+
"initializer_range": 0.02,
|
| 10 |
+
"intermediate_size": 2048,
|
| 11 |
+
"max_position_embeddings": 5000,
|
| 12 |
+
"model_type": "nemotron3_diarization_audio",
|
| 13 |
+
"num_attention_heads": 8,
|
| 14 |
+
"num_hidden_layers": 31,
|
| 15 |
+
"num_key_value_heads": 8,
|
| 16 |
+
"num_mel_bins": 128,
|
| 17 |
+
"partial_rotary_factor": 1.0,
|
| 18 |
+
"rope_parameters": {
|
| 19 |
+
"partial_rotary_factor": 1.0,
|
| 20 |
+
"rope_theta": 10000.0,
|
| 21 |
+
"rope_type": "default"
|
| 22 |
+
},
|
| 23 |
+
"subsampling_factor": 8
|
| 24 |
+
},
|
| 25 |
+
"chunk_length": 340,
|
| 26 |
+
"chunk_right_context": 40,
|
| 27 |
+
"dtype": "float32",
|
| 28 |
+
"fifo_length": 40,
|
| 29 |
+
"head_config": {
|
| 30 |
+
"audio_hidden_size": 512,
|
| 31 |
+
"hidden_size": 192,
|
| 32 |
+
"model_type": "",
|
| 33 |
+
"num_speakers": 8,
|
| 34 |
+
"subsampling_factor": 8
|
| 35 |
+
},
|
| 36 |
+
"initializer_range": 0.02,
|
| 37 |
+
"model_type": "nemotron3_diarization",
|
| 38 |
+
"speaker_cache_update_period": 300,
|
| 39 |
+
"streaming_config": {
|
| 40 |
+
"fifo_length": 264,
|
| 41 |
+
"latest_frames_score_boost": 0.05,
|
| 42 |
+
"min_positive_scores_rate": 0.5,
|
| 43 |
+
"model_type": "",
|
| 44 |
+
"num_speakers": 8,
|
| 45 |
+
"prediction_score_threshold": 0.25,
|
| 46 |
+
"speaker_cache_length": 264,
|
| 47 |
+
"speaker_cache_silence_frames_per_speaker": 1,
|
| 48 |
+
"speaker_cache_update_period": 222,
|
| 49 |
+
"strong_boost_rate": 0.75,
|
| 50 |
+
"subsampling_factor": 8,
|
| 51 |
+
"weak_boost_rate": 1.5
|
| 52 |
+
},
|
| 53 |
+
"transformers_version": "5.18.0.dev0"
|
| 54 |
+
}
|
diarization_evaluation.md
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Diarization Evaluation
|
| 2 |
+
|
| 3 |
+
This document describes the recommended way for partners and users to evaluate
|
| 4 |
+
Sortformer and Nemotron diarization models using NVIDIA NeMo Speech.
|
| 5 |
+
|
| 6 |
+
Use the NeMo Speech evaluation script as the source of truth:
|
| 7 |
+
|
| 8 |
+
https://github.com/NVIDIA-NeMo/Speech/blob/main/examples/speaker_tasks/diarization/neural_diarizer/e2e_diarize_speech.py
|
| 9 |
+
|
| 10 |
+
The script runs model inference, converts frame-level speaker activity
|
| 11 |
+
predictions into diarization segments, and reports diarization error rate (DER)
|
| 12 |
+
using NeMo Speech's diarization scoring utilities.
|
| 13 |
+
|
| 14 |
+
## Recommended Evaluation Command
|
| 15 |
+
|
| 16 |
+
Install and run from a checkout of NeMo Speech:
|
| 17 |
+
|
| 18 |
+
```bash
|
| 19 |
+
git clone https://github.com/NVIDIA-NeMo/Speech.git
|
| 20 |
+
cd Speech
|
| 21 |
+
export NEMO_ROOT="$PWD"
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
Evaluate a downloaded `.nemo` checkpoint:
|
| 25 |
+
|
| 26 |
+
```bash
|
| 27 |
+
python ${NEMO_ROOT}/examples/speaker_tasks/diarization/neural_diarizer/e2e_diarize_speech.py \
|
| 28 |
+
model_path="/path/to/Nemotron-3-Diarization-preview.nemo" \
|
| 29 |
+
dataset_manifest="/path/to/diarization_manifest.json" \
|
| 30 |
+
batch_size=32 \
|
| 31 |
+
collar=0 \
|
| 32 |
+
ignore_overlap=false \
|
| 33 |
+
precision=bf16 \
|
| 34 |
+
compile_encoder=false \
|
| 35 |
+
spkcache_len=264 \
|
| 36 |
+
chunk_len=340 \
|
| 37 |
+
chunk_right_context=40 \
|
| 38 |
+
fifo_len=40 \
|
| 39 |
+
spkcache_update_period=300
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
For a Hugging Face model repository, first download the `.nemo` checkpoint and
|
| 43 |
+
then pass its local path to `model_path`.
|
| 44 |
+
|
| 45 |
+
The input manifest must contain one JSON object per line. For DER evaluation,
|
| 46 |
+
each record must include an RTTM reference:
|
| 47 |
+
|
| 48 |
+
```json
|
| 49 |
+
{"audio_filepath": "/path/to/audio_001.wav", "offset": 0, "duration": 600, "rttm_filepath": "/path/to/audio_001.rttm"}
|
| 50 |
+
{"audio_filepath": "/path/to/audio_002.wav", "offset": 0, "duration": 580, "rttm_filepath": "/path/to/audio_002.rttm"}
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
If a UEM file is required by the benchmark protocol, include `uem_filepath` in
|
| 54 |
+
the manifest record. Otherwise, NeMo derives the evaluated region from the
|
| 55 |
+
reference and hypothesis extents and clamps it to the manifest `offset` and
|
| 56 |
+
`duration` when those fields are present.
|
| 57 |
+
|
| 58 |
+
## Metrics
|
| 59 |
+
|
| 60 |
+
### Diarization Error Rate
|
| 61 |
+
|
| 62 |
+
Diarization Error Rate (DER) is the primary diarization metric. It is the sum of
|
| 63 |
+
three error components, normalized by the scored reference speaker time:
|
| 64 |
+
|
| 65 |
+
```text
|
| 66 |
+
DER = false alarm + missed speech + speaker confusion
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
The NeMo Speech script reports:
|
| 70 |
+
|
| 71 |
+
```text
|
| 72 |
+
FA, MISS, CER, DER
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
In the script output, `CER` means speaker confusion error rate, not character
|
| 76 |
+
error rate.
|
| 77 |
+
|
| 78 |
+
### Speaker Counting Accuracy
|
| 79 |
+
|
| 80 |
+
Speaker Counting Accuracy (SCA) measures whether the predicted number of
|
| 81 |
+
speakers exactly matches the reference number of speakers for each recording:
|
| 82 |
+
|
| 83 |
+
```text
|
| 84 |
+
SCA = number_of_recordings_with_correct_speaker_count / number_of_recordings
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
Report SCA as a simple percentage:
|
| 88 |
+
|
| 89 |
+
```text
|
| 90 |
+
SCA (%) = 100 * SCA
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
NeMo Speech logs this value as `Spk. Count Acc.`.
|
| 94 |
+
|
| 95 |
+
### Speaker Counting Mean Absolute Error
|
| 96 |
+
|
| 97 |
+
NeMo Speech currently reports Speaker Counting Mean Absolute Error (MAE):
|
| 98 |
+
|
| 99 |
+
```text
|
| 100 |
+
MAE = mean(abs(predicted_speaker_count - reference_speaker_count))
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
The NeMo Speech scorer logs this value as `Spk. Count MAE`.
|
| 104 |
+
|
| 105 |
+
## Required Reporting Convention
|
| 106 |
+
|
| 107 |
+
When reporting DER for Sortformer or Nemotron diarization models, include the
|
| 108 |
+
evaluation protocol details with the number. DER is not fully interpretable
|
| 109 |
+
without these settings.
|
| 110 |
+
|
| 111 |
+
Report at least:
|
| 112 |
+
|
| 113 |
+
| Field | What to report |
|
| 114 |
+
| --- | --- |
|
| 115 |
+
| Model | Model name and checkpoint path or revision |
|
| 116 |
+
| Evaluation code | NeMo Speech repository URL and commit hash |
|
| 117 |
+
| Dataset | Dataset name, split, and manifest path or release identifier |
|
| 118 |
+
| Reference annotation | RTTM source and citation, such as paper, dataset URL, or forced-alignment reference |
|
| 119 |
+
| UEM | Whether UEM regions were used, and the UEM source if applicable |
|
| 120 |
+
| Overlap | Whether overlapping speech was included in scoring (`ignore_overlap=false`) or excluded (`ignore_overlap=true`) |
|
| 121 |
+
| Collar | Collar half-width in seconds, for example `0.0` or `0.25` |
|
| 122 |
+
| Post-processing | Whether post-processing was bypassed or which post-processing YAML was used |
|
| 123 |
+
| Output resolution | Native or overridden output subsampling factor |
|
| 124 |
+
| Streaming settings | `spkcache_len`, `chunk_len`, `chunk_left_context`, `chunk_right_context`, `fifo_len`, and `spkcache_update_period` |
|
| 125 |
+
| Precision | For example `bf16`, `bf16-mixed`, or `32` |
|
| 126 |
+
| Hardware | GPU model and batch size |
|
| 127 |
+
|
| 128 |
+
Convert NeMo's `DER`, `FA`, `MISS`, `CER`, and `Spk. Count Acc.` rates to
|
| 129 |
+
percentages by multiplying them by 100; report `Spk. Count MAE` unchanged.
|
| 130 |
+
|
| 131 |
+
Recommended metric table columns:
|
| 132 |
+
|
| 133 |
+
| Dataset | DER (%) | FA (%) | Miss (%) | Confusion (%) | SCA (%) | Speaker Count MAE |
|
| 134 |
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 135 |
+
| Example split | 0.00 | 0.00 | 0.00 | 0.00 | 100.00 | 0.0000 |
|
| 136 |
+
|
| 137 |
+
## Notes on Collar and Overlap
|
| 138 |
+
|
| 139 |
+
The NeMo Speech DER scorer follows NIST `md-eval-22.pl` collar semantics:
|
| 140 |
+
`collar` is the no-score half-width around each reference boundary. For example,
|
| 141 |
+
`collar=0.25` excludes 0.25 seconds to the left and 0.25 seconds to the right of
|
| 142 |
+
each reference boundary.
|
| 143 |
+
|
| 144 |
+
The `ignore_overlap` flag controls whether overlapped speech contributes to DER:
|
| 145 |
+
|
| 146 |
+
```text
|
| 147 |
+
ignore_overlap=false # include overlap in DER
|
| 148 |
+
ignore_overlap=true # exclude overlap from DER
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
For model-card style reporting, prefer the benchmark's official protocol. If
|
| 152 |
+
the benchmark does not specify a protocol, report DER with overlap included and
|
| 153 |
+
state the collar value explicitly.
|
| 154 |
+
|
| 155 |
+
## Where the Metrics Come From in NeMo Speech
|
| 156 |
+
|
| 157 |
+
[e2e_diarize_speech.py](https://github.com/NVIDIA-NeMo/Speech/blob/main/examples/speaker_tasks/diarization/neural_diarizer/e2e_diarize_speech.py) restores the diarization model, sets the test manifest,
|
| 158 |
+
applies the requested streaming parameters, runs inference, converts predictions
|
| 159 |
+
to timestamped speaker segments, and calls:
|
| 160 |
+
|
| 161 |
+
```python
|
| 162 |
+
score_labels(
|
| 163 |
+
AUDIO_RTTM_MAP=infer_audio_rttm_dict,
|
| 164 |
+
all_reference=all_refs,
|
| 165 |
+
all_hypothesis=all_hyps,
|
| 166 |
+
all_uem=all_uems,
|
| 167 |
+
collar=cfg.collar,
|
| 168 |
+
ignore_overlap=cfg.ignore_overlap,
|
| 169 |
+
)
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
The NeMo Speech scoring utility computes cumulative `FA`, `MISS`, speaker
|
| 173 |
+
confusion (`CER`), and `DER`. It also computes speaker-count accuracy and
|
| 174 |
+
speaker-count MAE by comparing the number of unique speakers in the reference
|
| 175 |
+
and hypothesis for each manifest region.
|
| 176 |
+
|
| 177 |
+
## Stand-alone scoring script
|
| 178 |
+
|
| 179 |
+
[score_diarization.py](https://github.com/NVIDIA-NeMo/Speech/blob/main/scripts/speaker_tasks/score_diarization.py) is a simple user-facing script for diarization scoring.
|
| 180 |
+
|
| 181 |
+
```bash
|
| 182 |
+
python ${NEMO_ROOT}/scripts/speaker_tasks/score_diarization.py \
|
| 183 |
+
-r $REFERENCE \
|
| 184 |
+
-h $HYPOTHESIS \
|
| 185 |
+
-c $COLLAR
|
| 186 |
+
```
|
| 187 |
+
|
| 188 |
+
The reference and hypothesis may each be:
|
| 189 |
+
|
| 190 |
+
- A compound RTTM file
|
| 191 |
+
- A directory containing per-recording RTTM files
|
| 192 |
+
- A JSON/JSONL diarization manifest
|
| 193 |
+
|
| 194 |
+
When both inputs are directories, RTTM filenames must match exactly.
|
| 195 |
+
|
| 196 |
+
The scorer includes overlapping speech regions (`ignore_overlap=False`).
|
explainability.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Field | Response
|
| 2 |
+
:---|:---
|
| 3 |
+
Intended Task/Domain | Speaker Diarization (determining who spoke when in conversational audio), Speaker Tagging in Speech Recognition Systems
|
| 4 |
+
Model Type | Transformer encoder
|
| 5 |
+
Intended Users | Developers, researchers and agents working on conversational AI systems that require generic speaker labels and timestamps.
|
| 6 |
+
Output | A `[T, 8]` floating-point tensor of per-speaker activity probabilities. The eight channels are ordered by speaker arrival time. The default output stride is 10 ms and can be configured to a multiple of 10 ms.
|
| 7 |
+
Describe how the model works | The model stacks 10 ms Mel-spectrogram features by a factor of eight, processes the resulting 80 ms frames with a Transformer encoder, and upsamples predictions back to 10 ms resolution with a Conv1D layer. During streaming inference, the Arrival-Order Speaker Cache and FIFO queue preserve useful speaker context across chunks. Speaker activity probabilities can be postprocessed into generic speaker labels with start and end timestamps.
|
| 8 |
+
Name the adversely impacted groups this has been tested to deliver comparable outcomes regardless of | Not Applicable
|
| 9 |
+
Technical Limitations & Mitigation | This model supports up to eight speakers; if the audio contains more than eight speakers, some will inevitably be missed or misattributed. Performance may degrade on very long recordings and in challenging acoustic conditions, such as high background noise or severe reverberation. Latency profile should be chosen carefully for a downstream application, as lowering latency generally decreases both accuracy and speed of the model.
|
| 10 |
+
Verified to have met prescribed NVIDIA quality standards | Yes
|
| 11 |
+
Performance Metrics | Diarization Error Rate (DER), Speaker Counting Accuracy (SCA), Speaker Counting Mean Absolute Error (MAE), and Real-Time Factor speedup (RTFx).
|
| 12 |
+
Potential Known Risks | Diarization errors can assign speech to the wrong generic speaker channel, miss speech, introduce false alarms, or place boundaries incorrectly, particularly under overlap, noise, far-field conditions, domain shift, or unsupported speaker counts. Downstream systems should retain uncertainty and be tested for the intended use case.
|
| 13 |
+
Licensing | Use of this model is governed by the [OpenMDW License Agreement, version 1.1](https://openmdw.ai/license/1-1/).
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c074d86335b3b794f8fa5edc25594558f128bdb3914d27806a3a5a2e44963cb6
|
| 3 |
+
size 396954592
|
nemotron3_tts_8_open_voices.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:292668a8679eb27f039f7afb0ed938165b399762d2cd3ecef017b600e82457e7
|
| 3 |
+
size 2453587
|
privacy.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Field | Response
|
| 2 |
+
:---|:---
|
| 3 |
+
Generatable or reverse-engineerable personal data? | No
|
| 4 |
+
Personal data used to create this model? | Yes
|
| 5 |
+
Personal data categories present | Voice recordings
|
| 6 |
+
Was consent obtained for any personal data used? | Yes
|
| 7 |
+
How often is the dataset reviewed? | Before Release
|
| 8 |
+
Is a mechanism in place to honor data subject right of access or deletion of personal data? | Yes
|
| 9 |
+
If personal data was collected for the development of the model, was it collected directly by NVIDIA? | No
|
| 10 |
+
If personal data was collected for the development of the model by NVIDIA, do you maintain or have access to disclosures made to data subjects? | Not Applicable
|
| 11 |
+
If personal data was collected for the development of this AI model, was it minimized to only what was required? | Yes
|
| 12 |
+
Was data from user interactions with the AI model (e.g. user input and prompts) used to train the model? | No
|
| 13 |
+
Is there provenance for all datasets used in training? | Yes
|
| 14 |
+
Does data labeling (annotation, metadata) comply with privacy laws? | Yes
|
| 15 |
+
Is data compliant with data subject requests for data correction or removal, if such a request was made? | No, not possible with externally-sourced data
|
| 16 |
+
Applicable Privacy Policy | [NVIDIA Privacy Policy](https://www.nvidia.com/en-us/about-nvidia/privacy-policy/)
|
processor_config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"feature_extractor": {
|
| 3 |
+
"feature_extractor_type": "NemotronAsrStreamingFeatureExtractor",
|
| 4 |
+
"feature_size": 128,
|
| 5 |
+
"hop_length": 160,
|
| 6 |
+
"n_fft": 512,
|
| 7 |
+
"padding_side": "right",
|
| 8 |
+
"padding_value": 0.0,
|
| 9 |
+
"preemphasis": 0.97,
|
| 10 |
+
"return_attention_mask": true,
|
| 11 |
+
"sampling_rate": 16000,
|
| 12 |
+
"win_length": 400
|
| 13 |
+
},
|
| 14 |
+
"processor_class": "Nemotron3DiarizationProcessor",
|
| 15 |
+
"streaming_mode": "low_latency",
|
| 16 |
+
"streaming_modes": {
|
| 17 |
+
"low_latency": [
|
| 18 |
+
9,
|
| 19 |
+
4
|
| 20 |
+
],
|
| 21 |
+
"ultra_low_latency": [
|
| 22 |
+
3,
|
| 23 |
+
1
|
| 24 |
+
],
|
| 25 |
+
"very_low_latency": [
|
| 26 |
+
6,
|
| 27 |
+
2
|
| 28 |
+
]
|
| 29 |
+
},
|
| 30 |
+
"subsampling_factor": 8
|
| 31 |
+
}
|
safety.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Field | Response
|
| 2 |
+
:---|:---
|
| 3 |
+
Model Application Field(s) | Customer Service
|
| 4 |
+
Describe the life-critical impact (if present) | Not Applicable
|
| 5 |
+
Use Case Restrictions | Abide by [OpenMDW License Agreement, version 1.1](https://openmdw.ai/license/1-1/)
|
| 6 |
+
Model and Dataset Restrictions | The Principle of least privilege (PoLP) is applied limiting access for dataset generation and model development. Restrictions enforce dataset access during training, and dataset license constraints adhered to.
|
streaming_diarization_demo.gif
ADDED
|
Git LFS Details
|
streaming_diarization_demo.png
ADDED
|
Git LFS Details
|