Model reference · open weights
diar_streaming_sortformer_4spk is an open-weight audio or speech model from NVIDIA.
Summary of the nvidia/diar_streaming_sortformer_4spk-v2.1 model card, 2026-10-01
What it is
| Released by | NVIDIA |
|---|---|
| Released | 2025-10-22 |
From the model card
img { display: inline; }
This model is a streaming version of Sortformer diarizer. Sortformer[1] is a novel end-to-end neural model for speaker diarization, trained with unconventional objectives compared to existing end-to-end diarization models.
Streaming Sortformer[2] employs an Arrival-Order Speaker Cache (AOSC) to store frame-level acoustic embeddings of previously observed speakers.
Sortformer resolves permutation problem in diarization following the arrival-time order of the speech segments from each speaker.
This speaker diarization model can be used to enable the NeMo Voice Agent to recognize speakers in conversations. See the NeMo Voice Agent and the YAML configuration for more details.
For documentation, deployment guides, enterprise-ready APIs, and the latest open models—including Nemotron and other cutting-edge speech, translation, and generative AI—visit the NVIDIA Developer Portal at developer.nvidia.com. Join the community to access tools, support, and resources to accelerate your development with NVIDIA’s NeMo, Riva, NIM, and foundation models.
What is Nemotron? NVIDIA Developer Nemotron NVIDIA Riva Speech NeMo Documentation
Streaming sortformer employs pre-encode layer in the Fast-Conformer to generate speaker-cache. At each step, speaker cache is filtered to only retain the high-quality speaker cache vectors.
Aside from speaker-cache management part, streaming Sortformer follows the architecture of the offline version of Sortformer. Sortformer consists of an L-size (17 layers) NeMo Encoder for Speech Tasks (NEST)[3] which is based on Fast-Conformer[4] encoder. Following that, an 18-layer Transformer[5] encoder with hidden size of 192, and two feedforward layers with 4 sigmoid outputs for each frame input at the top layer. More information can be found in the Streaming Sortformer paper[2].
To train, fine-tune or perform diarization with Sortformer, you will need to install NVIDIA NeMo[6]. We recommend you install it after you've installed Cython and latest PyTorch version.
apt-get update && apt-get install -y libsndfile1 ffmpeg
pip install Cython packaging
pip install git+https://github.com/NVIDIA/NeMo.git@main#egg=nemo_toolkit[asr]
Here is a short example script that loads the model, runs diarization on a WAV file, and prints the results:
from nemo.collections.asr.models import SortformerEncLabelModel
diar_model = SortformerEncLabelModel.from_pretrained("nvidia/diar_streaming_sortformer_4spk-v2.1")
diar_model.eval()
diar_model.sortformer_modules.chunk_len = 340
diar_model.sortformer_modules.chunk_right_context = 40
diar_model.sortformer_modules.fifo_len = 40
diar_model.sortformer_modules.spkcache_update_period = 300
predicted_segments = diar_model.diarize(audio=["/path/to/your/audio.wav"], batch_size=1)
for segment in predicted_segments[0]:
print(segment)
The model is available for use in the NeMo Framework[6], and can be used as a pre-trained checkpoint for inference or for fine-tuning on another dataset.
from nemo.collections.asr.models import SortformerEncLabelModel
# load model from Hugging Face model card directly (You need a Hugging Face token)
diar_model = SortformerEncLabelModel.from_pretrained("nvidia/diar_streaming_sortformer_4spk-v2")
# If you have a downloaded model in "/path/to/diar_streaming_sortformer_4spk-v2.nemo", load model from a downloaded file
diar_model = SortformerEncLabelModel.restore_from(restore_path="/path/to/diar_streaming_sortformer_4spk-v2.nemo", map_location='cuda', strict=False)
# switch to inference mode
diar_model.eval()
Input to Sortformer can be an individual audio file:
audio_input="/path/to/multispeaker_audio1.wav"
or a list of paths to audio files:
audio_input=["/path/to/multispeaker_audio1.wav", "/path/to/multispeaker_audio2.wav"]
or a numpy array (single or list):
import numpy as np
audio_input = np.random.randn(16000 * 10).astype(np.float32) # 10 sec at 16kHz
# or a list of arrays
audio_input = [audio_array1, audio_array2]
diar_model.diarize(audio=audio_input, batch_size=2, sample_rate=16000)
Note: When using numpy arrays, you MUST specify a correct sample_rate in diar_model.diarize() function.
Default sample_rate is 16000.
or a jsonl manifest file:
audio_input="/path/to/multispeaker_manifest.json"
where each line is a dictionary containing the following fields:
# Example of a line in `multispeaker_manifest.json`
{
"audio_filepath": "/path/to/multispeaker_audio1.wav", # path to the input audio file
"offset": 0, # offset (start) time of the input audio
"duration": 600, # duration of the audio, can be set to `null` if using NeMo main branch
}
{
"audio_filepath": "/path/to/multispeaker_audio2.wav",
"offset": 900,
"duration": 580,
}
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
How it works
Benchmarks
As published on the model card: the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Speaker Diarization | DIHARD III Eval (1-4 spk) | Test DER | 15.090 |
| Speaker Diarization | DIHARD III Eval (5-9 spk) | Test DER | 41.420 |
| Speaker Diarization | DIHARD III Eval (full) | Test DER | 20.210 |
| Speaker Diarization | CALLHOME (NIST-SRE-2000 Disc8) part2 (2 spk) | Test DER | 6.650 |
| Speaker Diarization | CALLHOME (NIST-SRE-2000 Disc8) part2 (3 spk) | Test DER | 11.250 |
| Speaker Diarization | CALLHOME (NIST-SRE-2000 Disc8) part2 (4 spk) | Test DER | 13.350 |
| Speaker Diarization | CALLHOME (NIST-SRE-2000 Disc8) part2 (5 spk) | Test DER | 22.120 |
| Speaker Diarization | CALLHOME (NIST-SRE-2000 Disc8) part2 (6 spk) | Test DER | 24.510 |
| Speaker Diarization | CALLHOME (NIST-SRE-2000 Disc8) part2 (full) | Test DER | 11.190 |
| Speaker Diarization | call_home_american_english_speech | Test DER | 5.090 |
| Speaker Diarization | AliMeeting Test near | Test DER | 12.600 |
| Speaker Diarization | AliMeeting Test far | Test DER | 15.600 |
| Speaker Diarization | AMI Test IHM | Test DER | 16.670 |
| Speaker Diarization | AMI Test SDM | Test DER | 20.570 |
| Speaker Diarization | NOTSOFAR1 Eval SC (<=4 spk) | Test DER | 17.260 |
| Speaker Diarization | NOTSOFAR1 Eval SC (>=5 spk) | Test DER | 36.760 |
| Speaker Diarization | NOTSOFAR1 Eval SC (full) | Test DER | 28.750 |