Downloads · 30 days
10
17% of all-time downloads
fatymatariq/wespeaker-voxceleb-resnet34-LM
wespeaker-voxceleb-resnet34-LM is a machine learning model from fatymatariq. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for pyannote-audio. The card lists the license as cc-by-4.0.
Using this open-source model in production? Consider switching to pyannoteAI for better and faster options.
Downloads · 30 days
10
17% of all-time downloads
All-time downloads
60
Public
Repo size
26.6 MB
Likes
0
Public
Click a slice to open those files.
.bin26.6 MB · 100%
From the Hugging Face model README
Using this open-source model in production?
Consider switching to pyannoteAI for better and faster options.
This model requires pyannote.audio version 3.1 or higher.
This is a wrapper around WeSpeaker wespeaker-voxceleb-resnet34-LM pretrained speaker embedding model, for use in pyannote.audio.
# instantiate pretrained model
from pyannote.audio import Model
model = Model.from_pretrained("pyannote/wespeaker-voxceleb-resnet34-LM")
from pyannote.audio import Inference
inference = Inference(model, window="whole")
embedding1 = inference("speaker1.wav")
embedding2 = inference("speaker2.wav")
# `embeddingX` is (1 x D) numpy array extracted from the file as a whole.
from scipy.spatial.distance import cdist
distance = cdist(embedding1, embedding2, metric="cosine")[0,0]
# `distance` is a `float` describing how dissimilar speakers 1 and 2 are.
import torch
inference.to(torch.device("cuda"))
embedding = inference("audio.wav")
from pyannote.audio import Inference
from pyannote.core import Segment
inference = Inference(model, window="whole")
excerpt = Segment(13.37, 19.81)
embedding = inference.crop("audio.wav", excerpt)
# `embedding` is (1 x D) numpy array extracted from the file excerpt.
from pyannote.audio import Inference
inference = Inference(model, window="sliding",
duration=3.0, step=1.0)
embeddings = inference("audio.wav")
# `embeddings` is a (N x D) pyannote.core.SlidingWindowFeature
# `embeddings[i]` is the embedding of the ith position of the
# sliding window, i.e. from [i * step, i * step + duration].
According to this page:
The pretrained model in WeNet follows the license of it's corresponding dataset. For example, the pretrained model on VoxCeleb follows Creative Commons Attribution 4.0 International License., since it is used as license of the VoxCeleb dataset, see https://mm.kaist.ac.kr/datasets/voxceleb/.
@inproceedings{Wang2023,
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={ICASSP 2023, IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
pages={1--5},
year={2023},
organization={IEEE}
}
@inproceedings{Bredin23,
author={Hervé Bredin},
title={{pyannote.audio 2.1 speaker diarization pipeline: principle, benchmark, and recipe}},
year=2023,
booktitle={Proc. INTERSPEECH 2023},
pages={1983--1987},
doi={10.21437/Interspeech.2023-105}
}