Sslsv
Toolkit for training and evaluating Self-Supervised Learning (SSL) frameworks for Speaker Verification (SV).
Install / Use
/learn @theolepage/SslsvREADME
sslsv
sslsv is a PyTorch-based deep learning toolkit consisting of a collection of Self-Supervised Learning (SSL) frameworks for learning speaker representations, applicable to various speaker-related downstream tasks, notably Speaker Verification (SV).
Its main objectives are to: (1) provide implementations of state-of-the-art SSL frameworks by adapting algorithms from the computer vision domain; and (2) evaluate them within a consistent and comparable environment.
An overview of the general training and evaluation framework is provided in the figure below.
<p align="center"> <img src="framework.svg" width=900 /> </p>News
- June 2025 – :clap: Release of results and checkpoints (v2.0).
- June 2025 – :bookmark: Support for Python 3.13 and PyTorch 2.7.
- December 2024 – :test_tube: Implementation of SimCLR MultiViews and MoCo Margins.
- November 2024 – :bulb: Implementation of Self-Supervised Positive Sampling (SSPS).
- July 2024 – :seedling: Implementation of more losses for SimCLR Margins (SphereFace, CurricularFace, MagFace, AdaFace).
- May 2024 – :books: Documentation of the complete codebase.
- April 2024 – :hammer_and_wrench: Complete refactoring, including typing, tests, and coding style (v2.0).
- January 2024 – :rocket: Implementation of the W-MSE framework.
- July 2023 – :zap: Support for PyTorch Distributed Data Parallel (DDP).
- June 2023 – :brain: Evaluation on language, emotion, age, and gender recognition tasks.
- April 2023 – :bar_chart: Additional benchmarks (SITW, VOiCES) and metrics (CLLR, ActDCF, AvgRPrec).
- March 2023 – :straight_ruler: Support for cosine scoring normalizations and PLDA evaluations.
- January 2023 – :test_tube: Implementation of SimCLR Margins (CosFace and ArcFace).
- December 2022 – :rocket: Implementation of SSL frameworks: LIM, CPC, SimCLR, MoCo, Barlow Twins, VICReg, VIbCReg, DeepCluster, SwAV, SimSiam, BYOL, and DINO.
- June 2022 – :stars: First release of sslsv (v1.0).
Features
General
- Data:
- Supervised and Self-supervised datasets (siamese and DINO sampling)
- Audio augmentation (noise and reverberation)
- Training:
- CPU, GPU and multi-GPUs (DataParallel and DistributedDataParallel)
- Checkpointing, resuming, early stopping and logging
- Tensorboard and wandb
- Evaluation:
- Speaker verification
- Backend: Cosine scoring and PLDA
- Metrics: EER, MinDCF, ActDFC, CLLR, AvgRPrec
- Classification (emotion, language, ...)
- Speaker verification
- Notebooks: DET curve, scores distribution, t-SNE on embeddings, ...
- Misc: scalable config, typing, documentation and tests
-
TDNN (
sslsv.encoders.TDNN)
X-vectors: Robust dnn embeddings for speaker recognition [PDF]
David Snyder, Daniel Garcia-Romero, Gregory Sell, Daniel Povey, Sanjeev Khudanpur -
Simple Audio CNN (
sslsv.encoders.SimpleAudioCNN)
Representation Learning with Contrastive Predictive Coding [PDF]
Aaron van den Oord, Yazhe Li, Oriol Vinyals -
ResNet-34 (
sslsv.encoders.ResNet34)
VoxCeleb2: Deep Speaker Recognition [PDF]
Joon Son Chung, Arsha Nagrani, Andrew Zisserman -
ECAPA-TDNN (
sslsv.encoders.ECAPATDNN)
ECAPA-TDNN: Emphasized Channel Attention, Propagation and Aggregation in TDNN Based Speaker Verification [PDF]
Brecht Desplanques, Jenthe Thienpondt, Kris Demuynck -
S3PRL (
sslsv.encoders.S3PRL)
Pre-trained speech foundation models (e.g., WavLM, HuBERT, wav2vec 2.0) can be used as encoders using the s3prl toolkit
-
LIM (
sslsv.methods.LIM)
Learning Speaker Representations with Mutual Information [PDF]
Mirco Ravanelli, Yoshua Bengio -
CPC (
sslsv.methods.CPC)
Representation Learning with Contrastive Predictive Coding [PDF]
Aaron van den Oord, Yazhe Li, Oriol Vinyals -
SimCLR (
sslsv.methods.SimCLR)
A Simple Framework for Contrastive Learning of Visual Representations [PDF]
Ting Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey Hinton -
MoCo v2+ (
sslsv.methods.MoCo)
Improved Baselines with Momentum Contrastive Learning [PDF]
Xinlei Chen, Haoqi Fan, Ross Girshick, Kaiming He -
DeepCluster v2 (
sslsv.methods.DeepCluster)
Deep Clustering for Unsupervised Learning of Visual Features [PDF]
Mathilde Caron, Piotr Bojanowski, Armand Joulin, Matthijs Douze -
SwAV (
sslsv.methods.SwAV)
Unsupervised Learning of Visual Features by Contrasting Cluster Assignments [PDF]
Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, Armand Joulin -
W-MSE (
sslsv.methods.WMSE)
Whitening for Self-Supervised Representation Learning [PDF]
Aleksandr Ermolov, Aliaksandr Siarohin, Enver Sangineto, Nicu Sebe -
Barlow Twins (
sslsv.methods.BarlowTwins)
Barlow Twins: Self-Supervised Learning via Redundancy Reduction [PDF]
Jure Zbontar, Li Jing, Ishan Misra, Yann LeCun, Stéphane Deny -
VICReg (
sslsv.methods.VICReg)
VICReg: Variance-Invariance-Covariance Regularization for Self-Supervised Learning [PDF]
Adrien Bardes, Jean Ponce, Yann LeCun -
VIbCReg (
sslsv.methods.VIbCReg)
Computer Vision Self-supervised Learning Methods on Time Series [PDF]
Daesoo Lee, Erlend Aune -
BYOL (
sslsv.methods.BYOL)
Bootstrap Your Own Latent: A New Approach to Self-Supervised Learning [PDF]
Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H. Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, Bilal Piot, Koray Kavukcuoglu, Rémi Munos, Michal Valko -
SimSiam (
sslsv.methods.SimSiam)
Exploring Simple Siamese Representation Learning [PDF]
Xinlei Chen, Kaiming He -
DINO (
sslsv.methods.DINO)
Emerging Properties in Self-Supervised Vision Transformers [PDF]
Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, Armand Joulin
-
Combiner (
sslsv.methods.Combiner)
Label-Efficient Self-Supervised Speaker Verification With Information Maximization and Contrastive Learning [PDF] [Ref]
Theo Lepage, Reda Dehak -
Margins (
sslsv.methods.SimCLRMargins,sslsv.methods.MoCoMargins)
Additive Margin in Contrastive Self-Supervised Frameworks to Learn Discriminative Speaker Representations [PDF] [Ref]
Theo Lepage, Reda Dehak -
SSPS (
sslsv.methods._SSPS)
Self-Supervised Frameworks for Speaker Verification via Bootstrapped Positive Sampling [PDF] [Ref]
Theo Lepage, Reda Dehak
Requirements
sslsv runs on Python 3.13.3 with the following dependencies.
| Module | Versions | |-----------------------|:--------:| | torch | 2.7.1 | | torchaudio | 2.7.1 | | numpy | * | | pandas | * | | soundfile | * | | scikit-learn | * | | speechbrain | * | | tensorboard | * | | wandb | * | | ruamel.yaml | * | | dacite | * | | prettyprinter | * | | tqdm | * |
Note: developers will also need pytest, pre-commit and twine to work on this project.
Datasets
Speaker recognition:
Language recognition:
Emotion recognition:
Data-augmentation:
Data used for main experiments (conducted on VoxCeleb1 and VoxCeleb2 + data-augmentation) can be automatically downloaded, extracted and prepared using the following scripts.
python tools/prepare_data/prepare_voxceleb.py data/
python tools/prepare_data/prepare_augmentation.py data/
The resulting data folder shoud have the structure presented below.
data
├── musan_split/
├── simulated_rirs/
├── voxceleb1/
├── voxceleb2/
├── voxceleb1_test_O
├── voxceleb1_test_H
├── voxceleb1_test_E
├─
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
last30days-skill
16.5kAI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
sec-edgar-agentkit
10AI agent toolkit for accessing and analyzing SEC EDGAR filing data. Build intelligent agents with LangChain, MCP-use, Gradio, Dify, and smolagents to analyze financial statements, insider trading, and company filings.
