Update MELD_Audio.py
Browse files- MELD_Audio.py +17 -15
MELD_Audio.py
CHANGED
@@ -8,6 +8,8 @@ import os
|
|
8 |
|
9 |
"""The Audio, Speech, and Vision Processing Lab - Emotional Sound Database (ASVP - ESD)"""
|
10 |
|
|
|
|
|
11 |
_CITATION = """\
|
12 |
@article{poria2018meld,
|
13 |
title={Meld: A multimodal multi-party dataset for emotion recognition in conversations},
|
@@ -65,13 +67,13 @@ class MELD_Audio(datasets.GeneratorBasedBuilder):
|
|
65 |
def _split_generators(self, dl_manager):
|
66 |
"""Returns SplitGenerators."""
|
67 |
metadata_dir: dict[str, str] = dl_manager.download_and_extract(
|
68 |
-
{"train": "
|
69 |
) # type: ignore # noqa: PGH003
|
70 |
data_path: dict[str, str] = dl_manager.download(
|
71 |
{
|
72 |
-
"
|
73 |
-
"
|
74 |
-
"
|
75 |
}
|
76 |
) # type: ignore # noqa: PGH003
|
77 |
path_to_clips = "MELD_Audio"
|
@@ -79,9 +81,9 @@ class MELD_Audio(datasets.GeneratorBasedBuilder):
|
|
79 |
dl_manager.extract(data_path)
|
80 |
if not dl_manager.is_streaming
|
81 |
else {
|
82 |
-
"
|
83 |
-
"
|
84 |
-
"
|
85 |
}
|
86 |
) # type: ignore # noqa: PGH003
|
87 |
|
@@ -91,18 +93,18 @@ class MELD_Audio(datasets.GeneratorBasedBuilder):
|
|
91 |
gen_kwargs={
|
92 |
"filepath": metadata_dir["train"],
|
93 |
"split": "train",
|
94 |
-
"local_extracted_archive": local_extracted_archive["
|
95 |
-
"audio_files": dl_manager.iter_archive(data_path["
|
96 |
"path_to_clips": path_to_clips,
|
97 |
},
|
98 |
),
|
99 |
datasets.SplitGenerator(
|
100 |
name=datasets.Split.VALIDATION, # type: ignore # noqa: PGH003
|
101 |
gen_kwargs={
|
102 |
-
"filepath": metadata_dir["
|
103 |
-
"split": "
|
104 |
-
"local_extracted_archive": local_extracted_archive["
|
105 |
-
"audio_files": dl_manager.iter_archive(data_path["
|
106 |
"path_to_clips": path_to_clips,
|
107 |
},
|
108 |
),
|
@@ -111,8 +113,8 @@ class MELD_Audio(datasets.GeneratorBasedBuilder):
|
|
111 |
gen_kwargs={
|
112 |
"filepath": metadata_dir["test"],
|
113 |
"split": "test",
|
114 |
-
"local_extracted_archive": local_extracted_archive["
|
115 |
-
"audio_files": dl_manager.iter_archive(data_path["
|
116 |
"path_to_clips": path_to_clips,
|
117 |
},
|
118 |
),
|
|
|
8 |
|
9 |
"""The Audio, Speech, and Vision Processing Lab - Emotional Sound Database (ASVP - ESD)"""
|
10 |
|
11 |
+
_HOMEPAGE = "https://affective-meld.github.io/"
|
12 |
+
|
13 |
_CITATION = """\
|
14 |
@article{poria2018meld,
|
15 |
title={Meld: A multimodal multi-party dataset for emotion recognition in conversations},
|
|
|
67 |
def _split_generators(self, dl_manager):
|
68 |
"""Returns SplitGenerators."""
|
69 |
metadata_dir: dict[str, str] = dl_manager.download_and_extract(
|
70 |
+
{"train": "train.csv", "dev": "dev.csv", "test": "test.csv"}
|
71 |
) # type: ignore # noqa: PGH003
|
72 |
data_path: dict[str, str] = dl_manager.download(
|
73 |
{
|
74 |
+
"train": "archive/train.tar.gz",
|
75 |
+
"dev": "archive/dev.tar.gz",
|
76 |
+
"test": "archive/test.tar.gz",
|
77 |
}
|
78 |
) # type: ignore # noqa: PGH003
|
79 |
path_to_clips = "MELD_Audio"
|
|
|
81 |
dl_manager.extract(data_path)
|
82 |
if not dl_manager.is_streaming
|
83 |
else {
|
84 |
+
"train": None,
|
85 |
+
"dev": None,
|
86 |
+
"test": None,
|
87 |
}
|
88 |
) # type: ignore # noqa: PGH003
|
89 |
|
|
|
93 |
gen_kwargs={
|
94 |
"filepath": metadata_dir["train"],
|
95 |
"split": "train",
|
96 |
+
"local_extracted_archive": local_extracted_archive["train"],
|
97 |
+
"audio_files": dl_manager.iter_archive(data_path["train"]),
|
98 |
"path_to_clips": path_to_clips,
|
99 |
},
|
100 |
),
|
101 |
datasets.SplitGenerator(
|
102 |
name=datasets.Split.VALIDATION, # type: ignore # noqa: PGH003
|
103 |
gen_kwargs={
|
104 |
+
"filepath": metadata_dir["dev"],
|
105 |
+
"split": "dev",
|
106 |
+
"local_extracted_archive": local_extracted_archive["dev"],
|
107 |
+
"audio_files": dl_manager.iter_archive(data_path["dev"]),
|
108 |
"path_to_clips": path_to_clips,
|
109 |
},
|
110 |
),
|
|
|
113 |
gen_kwargs={
|
114 |
"filepath": metadata_dir["test"],
|
115 |
"split": "test",
|
116 |
+
"local_extracted_archive": local_extracted_archive["test"],
|
117 |
+
"audio_files": dl_manager.iter_archive(data_path["test"]),
|
118 |
"path_to_clips": path_to_clips,
|
119 |
},
|
120 |
),
|