File size: 2,450 Bytes
fa4479c
24a35c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fa4479c
24a35c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
language: "en"
thumbnail:
tags:
- embeddings
- Speaker
- Verification
- Identification
- pytorch
- xvectors
- TDNN
- speechbrain
- audio-classification
license: "apache-2.0"
datasets:
- voxceleb
inference: false
---

# Xvector embeddings extraction on Voxceleb

This repository provides all the necessary tools to extract speaker embeddings with a pretrained TDNN model with SpeechBrain. 
The system is trained on Voxceleb 1+ Voxceleb2 training data. 

This repo traces the model shared at: https://huggingface.co/speechbrain/spkrec-xvect-voxceleb

For using this model, SpeechBrain is not required.

To use the model:

```python
import torchaudio
import torch

device = "cpu"  # or "cuda" for loading the model to a GPU 
model = torch.jit.load(f"<this_repo>/model_{device}.pt")
wavsignal, fs = torchaudio.load('audio.wav')
embeddings = model(wavsignal).squeeze()
```

## Warning

This model can only forward 1 wave audio.
Also, this model was traced for speaker embedding extraction, 
so any additional task (Speaker Classification, Verification) is disabled.

You can retrace the model using the code shared at: "tracing_code.py"

## All the credits to the SpeechBrain Team.

### Limitations
The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.

#### Referencing xvectors
```@inproceedings{DBLP:conf/odyssey/SnyderGMSPK18,
  author    = {David Snyder and
               Daniel Garcia{-}Romero and
               Alan McCree and
               Gregory Sell and
               Daniel Povey and
               Sanjeev Khudanpur},
  title     = {Spoken Language Recognition using X-vectors},
  booktitle = {Odyssey 2018},
  pages     = {105--111},
  year      = {2018},
}
```


# **Citing SpeechBrain**
Please, cite SpeechBrain if you use it for your research or business.


```bibtex
@misc{speechbrain,
  title={{SpeechBrain}: A General-Purpose Speech Toolkit},
  author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio},
  year={2021},
  eprint={2106.04624},
  archivePrefix={arXiv},
  primaryClass={eess.AS},
  note={arXiv:2106.04624}
}
```