Model reference · open weights
speaker-diarization-3.1 is an open-weight audio or speech model from fatymatariq. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | fatymatariq |
|---|---|
| Type | Audio & music |
| Task | Speech→text |
| Runs with | pyannote-audio |
| Released | 2024-11-21 |
| Popularity | 3k downloads / month |
| Licence | Open weights |
About
Using this open-source model in production? Consider switching to pyannoteAI for better and faster options.
This pipeline is the same as pyannote/speaker-diarization-3.0 except it removes the problematic use of onnxruntime.
Both speaker segmentation and embedding now run in pure PyTorch. This should ease deployment and possibly speed up inference.
It requires pyannote.audio version 3.1 or higher.
It ingests mono audio sampled at 16kHz and outputs speaker diarization as an Annotation instance:
pyannote.audio 3.1 with pip install pyannote.audiopyannote/segmentation-3.0 user conditionspyannote/speaker-diarization-3.1 user conditionshf.co/settings/tokens.# instantiate the pipeline
from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained(
"pyannote/speaker-diarization-3.1",
use_auth_token="HUGGINGFACE_ACCESS_TOKEN_GOES_HERE")
# run the pipeline on an audio file
diarization = pipeline("audio.wav")
# dump the diarization output to disk using RTTM format
with open("audio.rttm", "w") as rttm:
diarization.write_rttm(rttm)
pyannote.audio pipelines run on CPU by default.
You can send them to GPU with the following lines:
import torch
pipeline.to(torch.device("cuda"))
Pre-loading audio files in memory may result in faster processing:
waveform, sample_rate = torchaudio.load("audio.wav")
diarization = pipeline({"waveform": waveform, "sample_rate": sample_rate})
Hooks are available to monitor the progress of the pipeline:
from pyannote.audio.pipelines.utils.hook import ProgressHook
with ProgressHook() as hook:
diarization = pipeline("audio.wav", hook=hook)
In case the number of speakers is known in advance, one can use the num_speakers option:
diarization = pipeline("audio.wav", num_speakers=2)
One can also provide lower and/or upper bounds on the number of speakers using min_speakers and max_speakers options:
diarization = pipeline("audio.wav", min_speakers=2, max_speakers=5)
This pipeline has been benchmarked on a large collection of datasets.
Processing is fully automatic:
... with the least forgiving diarization error rate (DER) setup (named "Full" in this paper):
| Benchmark | DER% | FA% | Miss% | Conf% | Expected output | File-level evaluation |
|---|---|---|---|---|---|---|
| AISHELL-4 | 12.2 | 3.8 | 4.4 | 4.0 | RTTM | eval |
| AliMeeting (channel 1) | 24.4 | 4.4 | 10.0 | 10.0 | RTTM | eval |
| AMI (headset mix, only_words) | 18.8 | 3.6 | 9.5 |
From the published model card. Full card on the HuggingFace links in the sidebar.
How it works
Using it via the API
Once AxForge deploys fatymatariq-speaker-diarization-3-1 for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (fatymatariq-speaker-diarization-3-1 below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $AXFORGE_API_KEY" \ -F model="fatymatariq-speaker-diarization-3-1" -F file=@audio.mp3
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.