Matthijs Hollemans
commited on
Commit
•
0109099
1
Parent(s):
20c9bc6
create dataset
Browse files- README.md +29 -0
- cmu-arctic-xvectors.py +45 -0
- spkrec-xvect.zip +3 -0
README.md
CHANGED
@@ -1,3 +1,32 @@
|
|
1 |
---
|
|
|
|
|
|
|
2 |
license: mit
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
pretty_name: CMU ARCTIC X-Vectors
|
3 |
+
task_categories:
|
4 |
+
- audio
|
5 |
license: mit
|
6 |
---
|
7 |
+
|
8 |
+
# Speaker embeddings extracted from CMU ARCTIC
|
9 |
+
|
10 |
+
There is one `.npy` file for each utterance in the dataset, 7931 files in total. The speaker embeddings are 512-element X-vectors.
|
11 |
+
|
12 |
+
The [CMU ARCTIC](http://www.festvox.org/cmu_arctic/) dataset divides the utterances among the following speakers:
|
13 |
+
|
14 |
+
- bdl (US male)
|
15 |
+
- slt (US female)
|
16 |
+
- jmk (Canadian male)
|
17 |
+
- awb (Scottish male)
|
18 |
+
- rms (US male)
|
19 |
+
- clb (US female)
|
20 |
+
- ksp (Indian male)
|
21 |
+
|
22 |
+
The X-vectors were extracted using [this script](https://huggingface.co/mechanicalsea/speecht5-vc/blob/main/manifest/utils/prep_cmu_arctic_spkemb.py), which uses the `speechbrain/spkrec-xvect-voxceleb` model.
|
23 |
+
|
24 |
+
Usage:
|
25 |
+
|
26 |
+
```python
|
27 |
+
from datasets import load_dataset
|
28 |
+
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
29 |
+
|
30 |
+
speaker_embeddings = embeddings_dataset[7306]["xvector"]
|
31 |
+
speaker_embeddings = torch.tensor(speaker_embeddings).unsqueeze(0)
|
32 |
+
```
|
cmu-arctic-xvectors.py
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
|
3 |
+
import os
|
4 |
+
import numpy as np
|
5 |
+
import datasets
|
6 |
+
|
7 |
+
|
8 |
+
_DATA_URL = "https://huggingface.co/datasets/Matthijs/cmu-arctic-xvectors/resolve/main/spkrec-xvect.zip"
|
9 |
+
|
10 |
+
|
11 |
+
class ArcticXvectors(datasets.GeneratorBasedBuilder):
|
12 |
+
|
13 |
+
BUILDER_CONFIGS = [
|
14 |
+
datasets.BuilderConfig(
|
15 |
+
name="default",
|
16 |
+
version=datasets.Version("0.0.1", ""),
|
17 |
+
description="",
|
18 |
+
)
|
19 |
+
]
|
20 |
+
|
21 |
+
def _info(self):
|
22 |
+
return datasets.DatasetInfo(
|
23 |
+
features=datasets.Features(
|
24 |
+
{
|
25 |
+
"filename": datasets.Value("string"),
|
26 |
+
"xvector": datasets.Sequence(feature=datasets.Value(dtype="float32"), length=512),
|
27 |
+
}
|
28 |
+
),
|
29 |
+
)
|
30 |
+
|
31 |
+
def _split_generators(self, dl_manager):
|
32 |
+
archive = os.path.join(dl_manager.download_and_extract(_DATA_URL), "spkrec-xvect")
|
33 |
+
return [
|
34 |
+
datasets.SplitGenerator(
|
35 |
+
name=datasets.Split.VALIDATION, gen_kwargs={"files": dl_manager.iter_files(archive)}
|
36 |
+
),
|
37 |
+
]
|
38 |
+
|
39 |
+
def _generate_examples(self, files):
|
40 |
+
for i, file in enumerate(sorted(files)):
|
41 |
+
if os.path.basename(file).endswith(".npy"):
|
42 |
+
yield str(i), {
|
43 |
+
"filename": os.path.basename(file)[:-4], # strip off .npy
|
44 |
+
"xvector": np.load(file),
|
45 |
+
}
|
spkrec-xvect.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:28ea1b685a49fedce92d1af7e68b22bf511a23432bc7a13d621a4deeee9fe9a1
|
3 |
+
size 17943510
|