Research and Production Oriented Speaker Verification, Recognition and Diarization Toolkit
1,404
stars
335
commits
Python
primary language
Jul 8, 2026
updated
Roadmap | Docs | Paper | Runtime | Pretrained Models | Huggingface Demo | Modelscope Demo
WeSpeaker mainly focuses on speaker embedding learning, with application to the speaker verification task. We support online feature extraction or loading pre-extracted features in kaldi-format.
pip install git+https://github.com/wenet-e2e/wespeaker.git
Command-line usage (use -h for parameters):
$ wespeaker --task embedding --audio_file audio.wav --output_file embedding.txt
$ wespeaker --task embedding_kaldi --wav_scp wav.scp --output_file /path/to/embedding
$ wespeaker --task similarity --audio_file audio.wav --audio_file2 audio2.wav
$ wespeaker --task diarization --audio_file audio.wav
Python programming usage:
import wespeaker
model = wespeaker.load_model('chinese')
embedding = model.extract_embedding('audio.wav')
utt_names, embeddings = model.extract_embedding_list('wav.scp')
similarity = model.compute_similarity('audio1.wav', 'audio2.wav')
diar_result = model.diarize('audio.wav')
You can set the environment variable WESPEAKER_HOME to specify the path of downloaded pre-trained models. By default it will be $HOME/.wespeaker.
Please refer to python usage for more command line and python programming usage.
git clone https://github.com/wenet-e2e/wespeaker.git
conda create -n wespeaker python=3.9
conda activate wespeaker
pip install torch==2.7.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu118 # cuda 11.X
pip install torch==2.7.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128 # cuda 12.X
conda install -c conda-forge sox
pip install -r requirements.txt
# visdom (dep of torchnet) needs pkg_resources at build time, bypass pip build isolation to use the existing setuptools
pip install --no-build-isolation torchnet==0.0.4
pre-commit install # for clean and tidy code
For Chinese users, you can scan the QR code on the left to follow our offical account of WeNet Community.
We also created a WeChat group for better discussion and quicker response. Please scan the QR code on the right to join the chat group.
![]() | ![]() |
|---|
If you find wespeaker useful, please cite it as
@article{wang2024advancing,
title={Advancing speaker embedding learning: Wespeaker toolkit for research and production},
author={Wang, Shuai and Chen, Zhengyang and Han, Bing and Wang, Hongji and Liang, Chengdong and Zhang, Binbin and Xiang, Xu and Ding, Wen and Rohdin, Johan and Silnova, Anna and others},
journal={Speech Communication},
volume={162},
pages={103104},
year={2024},
publisher={Elsevier}
}
@inproceedings{wang2023wespeaker,
title={Wespeaker: A research and production oriented speaker embedding learning toolkit},
author={Wang, Hongji and Liang, Chengdong and Wang, Shuai and Chen, Zhengyang and Zhang, Binbin and Xiang, Xu and Deng, Yanlei and Qian, Yanmin},
booktitle={IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
pages={1--5},
year={2023},
organization={IEEE}
}
If you are interested to contribute, feel free to contact @wsstriving or @robin1001
(top 30 of 32)
Python
86.1%
C++
8.3%
Shell
3.9%
CMake
1.1%
Research and Production Oriented Speaker Verification, Recognition and Diarization Toolkit
1,404
stars
335
commits
Python
primary language
Jul 8, 2026
updated
Roadmap | Docs | Paper | Runtime | Pretrained Models | Huggingface Demo | Modelscope Demo
WeSpeaker mainly focuses on speaker embedding learning, with application to the speaker verification task. We support online feature extraction or loading pre-extracted features in kaldi-format.
pip install git+https://github.com/wenet-e2e/wespeaker.git
Command-line usage (use -h for parameters):
$ wespeaker --task embedding --audio_file audio.wav --output_file embedding.txt
$ wespeaker --task embedding_kaldi --wav_scp wav.scp --output_file /path/to/embedding
$ wespeaker --task similarity --audio_file audio.wav --audio_file2 audio2.wav
$ wespeaker --task diarization --audio_file audio.wav
Python programming usage:
import wespeaker
model = wespeaker.load_model('chinese')
embedding = model.extract_embedding('audio.wav')
utt_names, embeddings = model.extract_embedding_list('wav.scp')
similarity = model.compute_similarity('audio1.wav', 'audio2.wav')
diar_result = model.diarize('audio.wav')
You can set the environment variable WESPEAKER_HOME to specify the path of downloaded pre-trained models. By default it will be $HOME/.wespeaker.
Please refer to python usage for more command line and python programming usage.
git clone https://github.com/wenet-e2e/wespeaker.git
conda create -n wespeaker python=3.9
conda activate wespeaker
pip install torch==2.7.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu118 # cuda 11.X
pip install torch==2.7.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu128 # cuda 12.X
conda install -c conda-forge sox
pip install -r requirements.txt
# visdom (dep of torchnet) needs pkg_resources at build time, bypass pip build isolation to use the existing setuptools
pip install --no-build-isolation torchnet==0.0.4
pre-commit install # for clean and tidy code
For Chinese users, you can scan the QR code on the left to follow our offical account of WeNet Community.
We also created a WeChat group for better discussion and quicker response. Please scan the QR code on the right to join the chat group.
![]() | ![]() |
|---|
If you find wespeaker useful, please cite it as
@article{wang2024advancing,
title={Advancing speaker embedding learning: Wespeaker toolkit for research and production},
author={Wang, Shuai and Chen, Zhengyang and Han, Bing and Wang, Hongji and Liang, Chengdong and Zhang, Binbin and Xiang, Xu and Ding, Wen and Rohdin, Johan and Silnova, Anna and others},
journal={Speech Communication},
volume={162},
pages={103104},
year={2024},
publisher={Elsevier}
}
@inproceedings{wang2023wespeaker,
title={Wespeaker: A research and production oriented speaker embedding learning toolkit},
author={Wang, Hongji and Liang, Chengdong and Wang, Shuai and Chen, Zhengyang and Zhang, Binbin and Xiang, Xu and Deng, Yanlei and Qian, Yanmin},
booktitle={IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
pages={1--5},
year={2023},
organization={IEEE}
}
If you are interested to contribute, feel free to contact @wsstriving or @robin1001
(top 30 of 32)
Python
86.1%
C++
8.3%
Shell
3.9%
CMake
1.1%