Skip to main content

CIPyPI - Version

Senko

閃光 (senkō) - a flash of light

A very fast and accurate speaker diarization pipeline.

1 hour of audio processed in 5 seconds (RTX 4090 + Ryzen 9 7950X).

On Apple M3, 1 hour in 7.7 seconds.

The pipeline achieves a best score of 13.5% DER on VoxConverse, 13.3% on AISHELL-4, and 26.5% on AMI-IHM. See the evaluation directory for more benchmarks and comparison with other diarization systems.

Senko powers the Zanshin media player.

Usage

import senko

diarizer = senko.Diarizer(device='auto', warmup=True, quiet=False, model_dir=None)

wav_path = 'audio.wav' # 16kHz mono 16-bit wav
result = diarizer.diarize(wav_path, generate_colors=False)

senko.save_json(result["merged_segments"], 'audio_diarized.json')
senko.save_rttm(result["merged_segments"], wav_path, 'audio_diarized.rttm')

See examples/diarize.py for an interactive script, and also read DOCS.md

For growing recordings, see streaming diarization.

Senko can also be used in a notebook, like Google Colab and Modal Notebooks.

Model Directory

Senko resolves each required source model with the following precedence:

  • Explicit model_dir= argument or script --model-dir flag
  • SENKO_MODEL_DIR
  • Bundled default model directory

If a model is missing from the configured model directory, Senko falls back to the bundled copy for that specific asset.

On macOS, Senko also stores reusable compiled CAM++ CoreML artifacts under <model_dir>/cached. That cache directory is disposable and can be deleted safely if it becomes stale or you want to reclaim disk space.

export SENKO_MODEL_DIR=/path/to/models
python examples/diarize.py --model-dir /path/to/override

Installation

The following instructions are for Linux, macOS, and WSL. For Windows, see WINDOWS.md.

Prerequisites:

  • gcc/clang - on Linux/WSL, a separate install; on macOS, have the Xcode Command Line Tools installed
  • uv

Create a Python virtual environment and activate it

uv venv --python 3.13 .venv
source .venv/bin/activate

Then install Senko

# For NVIDIA GPUs with CUDA compute capability >= 7.5 (~GTX 16 series and newer)
uv pip install "senko[nvidia]"

# For NVIDIA GPUs with CUDA compute capability < 7.5 (~GTX 10 series and older)
uv pip install "senko[nvidia-old]"

# For NVIDIA GPUs on native Windows with CUDA compute capability >= 7.5
uv pip install "senko[nvidia-windows]"

# For NVIDIA GPUs on native Windows with CUDA compute capability < 7.5
uv pip install "senko[nvidia-old-windows]"

# For Mac (macOS 14+) and CPU execution on all other platforms
uv pip install senko

For NVIDIA, make sure the installed driver is CUDA 12 capable (should see CUDA Version: 12+ in nvidia-smi). On Linux/WSL, a matching Kaldifeat CUDA wheel optionally enables GPU Fbank extraction.

PyPI alpha wheels are smoke-tested on GitHub-hosted runners, which cover packaging and CPU/default initialization but not GPU end-to-end execution.

For setting up Senko for development, see DEV_SETUP.md.

Accuracy

See the evaluation directory.

Technical Details

Senko is a heavily optimized and slightly modified version of the speaker diarization pipeline found in the excellent 3D-Speaker project. It consists of four stages: VAD (voice activity detection), Fbank feature extraction, speaker embeddings generation, and clustering (spectral or UMAP+HDBSCAN).

The following modifications have been made:

  • VAD model has been swapped from FSMN-VAD to either Senko's local pyannote backend (powered by the bundled segmentation-3.0 assets) or Silero VAD
  • Fbank feature extraction is done fully upfront with the bundled C++ extractor, or with Kaldifeat on GPU when installed.
  • Batched inference of the CAM++ embedding model
  • Clustering when on NVIDIA (with a GPU of CUDA compute capability 7.0+) can be done on the GPU through RAPIDS

On Linux/WSL, Senko's local segmentation-3.0 backend and CAM++ run using PyTorch, but on Mac, both models run through CoreML. The CAM++ CoreML conversion was done from scratch in this project (see tracing/coreml), but the segmentation-3.0 converted model and interfacing code is taken from the excellent FluidAudio project by Fluid Inference. No pyannote.audio package install is required at runtime.

Showcase

Application Description
reaper_speech_diarizer Split a downmixed voice recording into separate tracks for each speaker in REAPER DAW
scribe Produce speaker-attributed transcripts using parakeet-mlx and Senko
verbatim High quality multilingual speech to text with diarization

Create a PR or message on Discord if you'd like your application that uses Senko added here too.

FAQ

Is there any way to visualize the output diarization data?
Absolutely. The Zanshin media player is entirely made for this purpose. Zanshin is powered by Senko, so the easiest way to visualize the diarization data is by simply using it. It's currently available for Mac (Apple Silicon) with packaging. It also works on Windows and Linux, but without packaging (coming soon); you'll need to clone the repo and launch it through the terminal. See here for instructions.

You can also load in the diarization data that Senko generates manually into Zanshin if you want. First, turn off diarization in Zanshin by going into Settings and turning off Identify Speakers. Then, after you add a media item, click on it and on the player page press the H key. In the textbox that appears, paste the contents of the output JSON file that examples/diarize.py generates.
What languages does Senko support?
Generally, the pipeline should work for any language, as it relies on acoustic patterns as opposed to words or speech patterns. That being said, the embeddings model used in this pipeline was trained on a mix of English and Mandarin Chinese. So the pipeline will likely work best on English and Mandarin Chinese.
Are overlapping speaker segments detected correctly?
The current output will not have any overlapping speaker segments; i.e. only one speaker max is reported to be speaking at any given time. However, despite this, the current pipeline still performs great in determining who the dominant speaker is at any given time in chaotic audio with speakers talking over each other (example: casual podcasts). That said, detecting overlapping speaker segments is a planned feature thanks to the bundled segmentation-3.0 model (which we currently only use for VAD) supporting it.
How fast is the pipeline on CPU (cpu)?
On a Ryzen 9 9950X, it takes 42 seconds to process 1 hour of audio.
Does the entire pipeline run fully on the GPU, if available?
On Linux/WSL with device=cuda, all parts of the pipeline run on the GPU, so long as the NVIDIA card has CUDA compute capability ≥ 7.0 (~GTX 16 series and newer); otherwise clustering falls back to the CPU.

On native Windows with device=cuda, everything except fbank extraction and clustering run on the GPU.

On Mac, VAD and embeddings run on the ANE and CPU through CoreML, and fbank extraction and clustering run on the CPU.
Known limitations?
- The pipeline works best when the audio recording quality is good. Ideal setting: professional podcast studio. Heavy background noise, background music, or a generally low fidelity recording will degrade the diarization performance significantly. Note that it's also possible to have generally good recording quality but still low fidelity recorded voice quality; an example is this.

- It is rare but possible that voices that sound very similar get clustered as one voice. This can happen if the voices are genuinely extremely similar, or, more commonly, if the audio recording fidelity is low.

- The same voice recorded with >1 microphones or in >1 recording settings within the same audio file will often get detected as >1 speakers.

- If a single person makes >1 voices in the same recording (as in change the auditory texture/tone of their voice; like if they do an impression of someone else, for example), their speech will almost certainly get detected as >1 speakers.

Troubleshooting

If you run into Numba related errors after upgrading/downgrading the numba package or other packages that use it (umap-learn, pynndescent, etc.), they might be caused by failed Numba cache invalidation. In such a case, clear the cache manually like so:

rm -rf ~/.cache/senko

Such errors may also appear if you have Zanshin installed, with different package versions installed in its Python environment compared to the development venv that you're using for Senko.

If you are using a custom model directory and want to clear reusable CoreML artifacts, delete the <model_dir>/cached directory. Senko will recreate it automatically on the next run if needed.

Community & Support

Join the Discord server to ask questions, suggest features, talk about Senko and Zanshin development etc.

Future Improvements & Directions

  • Overlapping speaker segments support
  • Improve speaker colors generation algorithm
  • Support for Intel and AMD GPUs
  • Experiment with torch.compile()
  • Experiment with Modular MAX engine (faster CPU inference speed?)
  • Background noise removal (DeepFilterNet), speech enhancement
  • Live progress reporting
  • VBx-based clustering (DiariZen)

Metadata

Release files for senko 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for senko 0.2.2
File Size Uploaded Provenance
senko-0.2.2.tar.gz 81.0 MB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for senko 0.2.2
File
senko-0.2.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
senko-0.2.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
senko-0.2.2-cp313-cp313-macosx_14_0_arm64.whl CPython 3.13 CPython 3.13 macOS 14.0+ ARM64 Details
senko-0.2.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
senko-0.2.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
senko-0.2.2-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details
senko-0.2.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
senko-0.2.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
senko-0.2.2-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details

Total release size: 810.7 MB

Release files / senko-0.2.2.tar.gz

Download URL senko-0.2.2.tar.gz
Size 81.0 MB
Tags Source
SHA-256 checksum
How to use checksums
ae7b8b2afcbd5a912102b38befdc6487a7ed93a14ebb6af1b3f78776f8ad13e0
BLAKE2b-256 checksum
How to use checksums
a4adba7d63d31e9dba57cf1b575ec3bc18eadedc104b55886e3023fe509a01bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / senko-0.2.2-cp313-cp313-win_amd64.whl

Download URL senko-0.2.2-cp313-cp313-win_amd64.whl
Size 81.2 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
697c7519a97facdb71beb6b2be083fe4c5352d2db1adc887a98508da55501a3e
BLAKE2b-256 checksum
How to use checksums
4764479ddfd6bc5d5a683a1515f3e432327e9714518fba68ffebab3e3c0dd854
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / senko-0.2.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL senko-0.2.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 81.0 MB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
526a0f9e5f9044e18387eda54aadf95eb23de89da1a3220d3656759ea2e6fac5
BLAKE2b-256 checksum
How to use checksums
7e3710aad1448a62513169402a20be6dd3d2d182713668a95247cd7fcac7157b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / senko-0.2.2-cp313-cp313-macosx_14_0_arm64.whl

Download URL senko-0.2.2-cp313-cp313-macosx_14_0_arm64.whl
Size 81.0 MB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
1226ff5d89bf140b1d2ff665b8789cdd2141514ca2de1167574d3ba605d23b66
BLAKE2b-256 checksum
How to use checksums
e7c07471b81d4808bb1d5b90751202b67e2cc0ab699da74a74ac7917b48cac0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / senko-0.2.2-cp312-cp312-win_amd64.whl

Download URL senko-0.2.2-cp312-cp312-win_amd64.whl
Size 81.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
61087283fb4d1af98f62cb7059a3a7c0541038899ab09f2bdbf27a9c9de476dc
BLAKE2b-256 checksum
How to use checksums
845a03c81c2a1b88bc6ce78a699d3e9c7fd4893c50fed46e3d53428bf79bc25a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / senko-0.2.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL senko-0.2.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 81.0 MB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3f89b68c9c7ed211e593b6e8fe1730c98c8ee0d0707b3c1c4581fd9d514ff6a1
BLAKE2b-256 checksum
How to use checksums
54e5efc96bdb4e0f3aeb183f368ba4ddf473702f74fea45e0b6599139453b113
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / senko-0.2.2-cp312-cp312-macosx_14_0_arm64.whl

Download URL senko-0.2.2-cp312-cp312-macosx_14_0_arm64.whl
Size 81.0 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
57c976e67defd9c62e348a84aa7fd7ee1d865e54d34df52594cea7403ac469af
BLAKE2b-256 checksum
How to use checksums
8a727192d8aa5be598aad3bdf2c15a98bf8f28988489b30dc64eb079d7c41091
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / senko-0.2.2-cp311-cp311-win_amd64.whl

Download URL senko-0.2.2-cp311-cp311-win_amd64.whl
Size 81.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
34f0a9903f35ae791cf5a75be23611ca37c6d68b1c04ae55182f8e65af94dc9f
BLAKE2b-256 checksum
How to use checksums
5335edbd9cd5ffff21ca8cae8b9c2c60444b6297b805aeca41a7efe6f59c2470
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / senko-0.2.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL senko-0.2.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 81.0 MB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f58f352b5996d600b68f89db1987e3060d380069753103996c43ab8a8f34d45c
BLAKE2b-256 checksum
How to use checksums
048e684a0eba337fc9bbb00c34a485257c4f9bff19d2b75a891b603f8a661cdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / senko-0.2.2-cp311-cp311-macosx_14_0_arm64.whl

Download URL senko-0.2.2-cp311-cp311-macosx_14_0_arm64.whl
Size 81.0 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
96bbb196f08cb5ead5a0a683453be408736e50d2a45c5974723357d753da8a69
BLAKE2b-256 checksum
How to use checksums
d71b07d16df6ccc7f18d588f5fc1fe948f758014700c9c5fe747aff6c2e74b9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for senko 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for senko-0.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page