Gregster commited on
Commit
7811049
·
verified ·
1 Parent(s): 8ab135e

Delete loading script

Browse files
Files changed (1) hide show
  1. cmu-arctic-xvectors.py +0 -45
cmu-arctic-xvectors.py DELETED
@@ -1,45 +0,0 @@
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
- }