KELONMYOSA
commited on
Commit
•
078cc46
1
Parent(s):
5e4d806
Upload 4 files
Browse filesdata and load script
README.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1 |
---
|
2 |
-
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
task_categories:
|
3 |
+
- audio-classification
|
4 |
+
language:
|
5 |
+
- ru
|
6 |
---
|
7 |
+
|
8 |
+
This dataset was taken from the creators [GitHub repository](https://github.com/salute-developers/golos/tree/master/dusha) and converted for my own studying needs.
|
9 |
+
|
10 |
+
# Dusha dataset
|
11 |
+
Dusha is a bi-modal corpus suitable for speech emotion recognition (SER) tasks. The dataset consists of about 300 000 audio recordings with Russian speech, their transcripts and emotional labels. The corpus contains approximately 350 hours of data. Four basic emotions that usually appear in a dialog with a virtual assistant were selected: Happiness (Positive), Sadness, Anger and Neutral emotion.
|
12 |
+
|
13 |
+
## **License**
|
14 |
+
[English Version](https://github.com/salute-developers/golos/blob/master/license/en_us.pdf)
|
15 |
+
|
16 |
+
[Russian Version](https://github.com/salute-developers/golos/blob/master/license/ru.pdf)
|
17 |
+
|
18 |
+
## **Authors**
|
19 |
+
- Artem Sokolov
|
20 |
+
- Fedor Minkin
|
21 |
+
- Nikita Savushkin
|
22 |
+
- Nikolay Karpov
|
23 |
+
- Oleg Kutuzov
|
24 |
+
- Vladimir Kondratenko
|
data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f26f8d08cc54f81a25cf744a5edc75357d32d173740d8f5726301113123b4ee2
|
3 |
+
size 11669363689
|
dusha.py
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
from typing import Union
|
3 |
+
|
4 |
+
import datasets
|
5 |
+
|
6 |
+
_DESCRIPTION = """\
|
7 |
+
Dusha is a bi-modal corpus suitable for speech emotion recognition (SER) tasks.
|
8 |
+
The dataset consists of audio recordings with Russian speech and their emotional labels.
|
9 |
+
The corpus contains approximately 350 hours of data. Four basic emotions that usually appear in a dialog with
|
10 |
+
a virtual assistant were selected: Happiness (Positive), Sadness, Anger and Neutral emotion.
|
11 |
+
"""
|
12 |
+
|
13 |
+
_HOMEPAGE = "https://github.com/salute-developers/golos/tree/master/dusha#dusha-dataset"
|
14 |
+
|
15 |
+
DATA_DIR = "data.zip"
|
16 |
+
METADATA_DIR = "metadata.csv"
|
17 |
+
|
18 |
+
|
19 |
+
class Dusha(datasets.GeneratorBasedBuilder):
|
20 |
+
DEFAULT_WRITER_BATCH_SIZE = 256
|
21 |
+
|
22 |
+
def _info(self):
|
23 |
+
return datasets.DatasetInfo(
|
24 |
+
description=_DESCRIPTION,
|
25 |
+
features=datasets.Features(
|
26 |
+
{
|
27 |
+
"path": datasets.Value("string"),
|
28 |
+
"audio": datasets.Audio(sampling_rate=16_000),
|
29 |
+
"label": datasets.Value("string"),
|
30 |
+
}
|
31 |
+
),
|
32 |
+
supervised_keys=None,
|
33 |
+
homepage=_HOMEPAGE,
|
34 |
+
)
|
35 |
+
|
36 |
+
def _split_generators(self, dl_manager):
|
37 |
+
local_extracted_archive = dl_manager.extract([DATA_DIR]) if not dl_manager.is_streaming else None
|
38 |
+
return [datasets.SplitGenerator(
|
39 |
+
name=datasets.Split.ALL,
|
40 |
+
gen_kwargs={
|
41 |
+
"audio_files": local_extracted_archive,
|
42 |
+
"metadata": METADATA_DIR},
|
43 |
+
)]
|
44 |
+
|
45 |
+
def _generate_examples(self, audio_files: Union[str, os.PathLike], metadata: str):
|
46 |
+
examples = list()
|
47 |
+
|
48 |
+
with open(metadata) as f:
|
49 |
+
for row in f:
|
50 |
+
data = row.split(",")
|
51 |
+
audio_path = data[0]
|
52 |
+
label = data[1]
|
53 |
+
res = dict()
|
54 |
+
res["path"] = os.path.join(audio_files, audio_path)
|
55 |
+
res["label"] = label
|
56 |
+
examples.append(res)
|
57 |
+
|
58 |
+
key = 0
|
59 |
+
for example in examples:
|
60 |
+
audio_file = open(example["path"])
|
61 |
+
audio = {"path": example["path"], "bytes": audio_file.read()}
|
62 |
+
yield key, {**example, "audio": audio}
|
63 |
+
key += 1
|
metadata.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|