KELONMYOSA
commited on
Commit
•
e6461a4
1
Parent(s):
3ec0f8e
train_test_split
Browse files- dusha_emotion_audio.py +20 -8
dusha_emotion_audio.py
CHANGED
@@ -11,8 +11,10 @@ The corpus contains approximately 350 hours of data. Four basic emotions that us
|
|
11 |
|
12 |
_HOMEPAGE = "https://github.com/salute-developers/golos/tree/master/dusha#dusha-dataset"
|
13 |
|
14 |
-
|
15 |
-
|
|
|
|
|
16 |
|
17 |
|
18 |
class Dusha(datasets.GeneratorBasedBuilder):
|
@@ -33,14 +35,24 @@ class Dusha(datasets.GeneratorBasedBuilder):
|
|
33 |
)
|
34 |
|
35 |
def _split_generators(self, dl_manager):
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
39 |
name=datasets.Split.TRAIN,
|
40 |
gen_kwargs={
|
41 |
-
"audio_files": dl_manager.iter_archive(
|
42 |
-
"metadata":
|
43 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
def _generate_examples(self, audio_files, metadata):
|
46 |
examples = dict()
|
|
|
11 |
|
12 |
_HOMEPAGE = "https://github.com/salute-developers/golos/tree/master/dusha#dusha-dataset"
|
13 |
|
14 |
+
_DATA_URL_TRAIN = "https://huggingface.co/datasets/KELONMYOSA/dusha_emotion_audio/resolve/main/data/train.tar.gz"
|
15 |
+
_DATA_URL_TEST = "https://huggingface.co/datasets/KELONMYOSA/dusha_emotion_audio/resolve/main/data/test.tar.gz"
|
16 |
+
_METADATA_URL_TRAIN = "https://huggingface.co/datasets/KELONMYOSA/dusha_emotion_audio/resolve/main/data/train.csv"
|
17 |
+
_METADATA_URL_TEST = "https://huggingface.co/datasets/KELONMYOSA/dusha_emotion_audio/resolve/main/data/test.csv"
|
18 |
|
19 |
|
20 |
class Dusha(datasets.GeneratorBasedBuilder):
|
|
|
35 |
)
|
36 |
|
37 |
def _split_generators(self, dl_manager):
|
38 |
+
metadata_train = dl_manager.download(_METADATA_URL_TRAIN)
|
39 |
+
metadata_test = dl_manager.download(_METADATA_URL_TEST)
|
40 |
+
archive_train = dl_manager.download(_DATA_URL_TRAIN)
|
41 |
+
archive_test = dl_manager.download(_DATA_URL_TEST)
|
42 |
+
return [
|
43 |
+
datasets.SplitGenerator(
|
44 |
name=datasets.Split.TRAIN,
|
45 |
gen_kwargs={
|
46 |
+
"audio_files": dl_manager.iter_archive(archive_train),
|
47 |
+
"metadata": metadata_train},
|
48 |
+
),
|
49 |
+
datasets.SplitGenerator(
|
50 |
+
name=datasets.Split.TEST,
|
51 |
+
gen_kwargs={
|
52 |
+
"audio_files": dl_manager.iter_archive(archive_test),
|
53 |
+
"metadata": metadata_test},
|
54 |
+
)
|
55 |
+
]
|
56 |
|
57 |
def _generate_examples(self, audio_files, metadata):
|
58 |
examples = dict()
|