Views
No views yet
diarization-js JavaScript
library — a port of pyannote/speaker-diarization-community-1 that runs
fully in the browser (WebGPU / WASM) or in Node, no Python required.⚠️ This repository hosts artifacts only (model files). The pipeline code lives in the npm packagediarization-js.
| File | Size | Purpose | Origin | License |
|---|---|---|---|---|
segmentation-3.0.onnx | ~6 MB | Powerset multi-label segmentation backbone | pyannote/segmentation-3.0 | MIT |
embedding-resnet34.onnx | ~26 MB | ResNet34 speaker embedding extractor | pyannote/wespeaker-voxceleb-resnet34-LM | CC-BY-4.0 |
plda-params-vbx.json | ~1 MB | PLDA parameters for VBx clustering | pyannote/pyannote-audio | MIT |
pyannote/speaker-diarization-community-1 pipeline at the time of export.
Validated end-to-end against the Python reference (DER = 1.73% on
VoxConverse v0.3 dev).1npm install diarization-js onnxruntime-web # browser
2npm install diarization-js onnxruntime-node # Node1import * as ort from "onnxruntime-web/webgpu";
2import { DiarizationPipeline, ensureArtifacts } from "diarization-js";
3
4const artifacts = await ensureArtifacts(); // fetches this repo, caches
5const pipeline = await DiarizationPipeline.load({
6 ort,
7 ...artifacts,
8});
9
10const result = await pipeline.run(float32Audio16k);
11console.log(result.segments);~/.cache/diarization-js/.
In the browser the HTTP cache (max-age headers from huggingface.co) handles
deduplication — first load fetches ~33 MB, subsequent loads are local.ensureArtifacts({ source: "..." }),
or load the bytes yourself and pass them directly to
DiarizationPipeline.load.1@inproceedings{Bredin2023,
2 title={pyannote.audio 2.1 speaker diarization pipeline},
3 author={Bredin, Hervé},
4 booktitle={Interspeech},
5 year={2023}
6}