Views
No views yet
dia Rust cratedia Rust crate needs to run
end-to-end speaker diarization with pyannote-community-1 parity:pyannote/speaker-diarization-community-1
pipeline, in both .npz (build-time) and raw little-endian f64
.bin (runtime) form.dia already embeds the segmentation model and the PLDA weights into
the compiled binary via include_bytes!; the WeSpeaker ONNX is
the only artifact callers must download separately. This repo lets
callers grab any individual model — or the whole bundle — without
spelunking through the upstream pyannote / WeSpeaker repos.Attribution: this is a redistribution, not new model training. All weights come from upstream pyannote / WeSpeaker / BUT Speech@FIT. The licenses below MUST be preserved by anyone redistributing.
| File | Size | Format | License |
|---|---|---|---|
segmentation-3.0.onnx | 5.99 MiB | ONNX (single file) | MIT |
wespeaker_resnet34_lm.onnx | 256 KiB | ONNX header (external data) | Apache-2.0 |
wespeaker_resnet34_lm.onnx.data | 25.3 MiB | external-data weights | Apache-2.0 |
wespeaker_resnet34_lm_packed.onnx | 25.5 MiB | ONNX (single file, repacked) | Apache-2.0 |
wespeaker_resnet34_lm.pt | 25.6 MiB | TorchScript | Apache-2.0 |
plda/eigenvectors_desc.bin | 128 KiB | f64 (128×128 row-major) | CC-BY-4.0 |
plda/lda.bin | 256 KiB | f64 (256×128 row-major) | CC-BY-4.0 |
plda/mean1.bin | 2 KiB | f64 (256,) | CC-BY-4.0 |
plda/mean2.bin | 1 KiB | f64 (128,) | CC-BY-4.0 |
plda/mu.bin | 1 KiB | f64 (128,) | CC-BY-4.0 |
plda/phi_desc.bin | 1 KiB | f64 (128,) | CC-BY-4.0 |
plda/psi.bin | 1 KiB | f64 (128,) | CC-BY-4.0 |
plda/tr.bin | 128 KiB | f64 (128×128 row-major) | CC-BY-4.0 |
plda/plda.npz | 131 KiB | numpy (mu, tr, psi) | CC-BY-4.0 |
plda/xvec_transform.npz | 131 KiB | numpy (mean1, mean2, lda) | CC-BY-4.0 |
segmentation-3.0.onnx. It feeds dia::segment::SegmentModel
(or any pyannote-segmentation-compatible runtime). Single file, no
external data, works on every ORT execution provider.wespeaker_resnet34_lm.onnx + wespeaker_resnet34_lm.onnx.data
— the default ONNX layout. Loads on CPU / TensorRT / CUDA / OpenVINO
/ DirectML. The .onnx and .onnx.data files MUST sit next to
each other on disk; ORT resolves the external pointer by relative
path.wespeaker_resnet34_lm_packed.onnx — same model with all
weights inlined into one file. Use this if you want a single-file
artifact, or if the runtime is CoreML (Apple Silicon — Apple's
graph optimizer chokes on external initializers and reports
model_path must not be empty; the packed form sidesteps it).
Otherwise functionally identical.wespeaker_resnet34_lm.pt — TorchScript export for the
tch backend. Bit-exact to upstream PyTorch on hard cases (heavy-
overlap fixtures where the ONNX→ORT path can drift by O(1) per
element). Pulls in libtorch (~600 MB shared library)..bin files are the runtime data — raw little-endian f64
blobs that dia::plda embeds via include_bytes!. The two .npz
files are the build-time sources (xvec_transform.npz exposes
mean1 / mean2 / lda; plda.npz exposes mu / tr /
psi); they are mirrored from the upstream pyannote-community-1
snapshot for traceability and so the .bin extraction can be
re-run via scripts/extract-plda-blobs.sh in the dia repo.eigenvectors_desc.bin and phi_desc.bin are scipy-derived
eigenvectors of the PLDA generalized eigenproblem (B, W) — pinned
to avoid LAPACK eigenvector-sign indeterminism (which produced a
38% DER divergence on three-speaker fixtures when nalgebra and
scipy disagreed on 67 of 128 column signs). See
models/plda/SOURCE.md
in the dia repo for the regeneration procedure.pyannote/segmentation-3.0pytorch_model.onnx in the upstream HF repo.057ee564753071c0b09b5b611648b50ac188d50846bff5f01e9f7bbf1591ea25onnx-community/wespeaker_resnet34_lm
for the ONNX export._packed.onnx derivative: produced by loading
wespeaker_resnet34_lm.onnx + .onnx.data via the onnx Python
library (onnx.load(path, load_external_data=True)) and re-saving
with save_as_external_data=False. Same weights, no external file.pyannote/speaker-diarization-community-13533c8cf8e369892e6b79ff1bf80f7b0286a54eeplda/xvec_transform.npz and plda/plda.npz.plda/README.md):
PLDA model trained by BUT Speech@FIT;
integration of VBx in pyannote.audio by Jiangyu Han and Petr Pálka.dia (Rust)1use diarization::{
2 embed::EmbedModel,
3 plda::PldaTransform,
4 segment::SegmentModel,
5};
6// Segmentation + PLDA are bundled by default — no download needed.
7let mut seg = SegmentModel::bundled()?;
8let plda = PldaTransform::new()?;
9// WeSpeaker is BYO; download from this repo.
10let mut emb = EmbedModel::from_file("wespeaker_resnet34_lm.onnx")?;
11# Ok::<(), Box<dyn std::error::Error>>(())1# whole bundle
2hf download FinDIT-Studio/dia-models --local-dir ./dia-models
3
4# just the embedding model (default ONNX form)
5hf download FinDIT-Studio/dia-models \
6 wespeaker_resnet34_lm.onnx wespeaker_resnet34_lm.onnx.data \
7 --local-dir ./models
8
9# CoreML-friendly single-file form
10hf download FinDIT-Studio/dia-models \
11 wespeaker_resnet34_lm_packed.onnx --local-dir ./modelssegmentation-3.0.onnx (Copyright © 2023 CNRS, Hervé Bredin).
See LICENSE.MIT.LICENSE.APACHE-2.0.plda/. See LICENSE.CC-BY-4.0.
Required attribution: PLDA model trained by BUT Speech@FIT;
integration of VBx in pyannote.audio by Jiangyu Han and Petr Pálka.dia Rust crate that consumes these models is itself dual-licensed
MIT OR Apache-2.0; that licensing applies to the source code, not to the
model weights bundled here.