Datasets:

Formats:
arrow
ArXiv:
Libraries:
Datasets
License:
admin commited on
Commit
81073f2
·
1 Parent(s): 9673a1c
README.md CHANGED
@@ -11,9 +11,76 @@ tags:
11
  pretty_name: Erhu Playing Technique Dataset
12
  size_categories:
13
  - 1K<n<10K
14
- viewer: false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  ---
16
- If you want to view the dataset, please visit [here](https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/dataPeview)
17
  # Dataset Card for Erhu Playing Technique
18
  ## Original Content
19
  This dataset was created and has been utilized for Erhu playing technique detection by [[1]](https://arxiv.org/pdf/1910.09021), which has not undergone peer review. The original dataset comprises 1,253 Erhu audio clips, all performed by professional Erhu players. These clips were annotated according to three hierarchical levels, resulting in annotations for four, seven, and 11 categories. Part of the audio data is sourced from the CTIS dataset described earlier.
@@ -21,7 +88,7 @@ This dataset was created and has been utilized for Erhu playing technique detect
21
  ## Integration
22
  We first perform label cleaning to abandon the labels for the four and seven categories, since they do not strictly form a hierarchical relationship, and there are also missing data problems. This process leaves us with only the labels for the 11 categories. Then, we add Chinese character label and Chinese pinyin label to enhance comprehensibility. The 11 labels are: Detache (分弓), Diangong (垫弓), Harmonic (泛音), Legato\slide\glissando (连弓\滑音\连音), Percussive (击弓), Pizzicato (拨弦), Ricochet (抛弓), Staccato (断弓), Tremolo (震音), Trill (颤音), and Vibrato (揉弦). After integration, the data structure contains six columns: audio (with a sampling rate of 44,100 Hz), mel spectrograms, numeric label, Italian label, Chinese character label, and Chinese pinyin label. The total number of audio clips remains at 1,253, with a total duration of 25.81 minutes. The average duration is 1.24 seconds.
23
 
24
- We constructed the <a href="#11-class-subset">default subset</a> of the current integrated version dataset based on its 11 classification data and optimized the names of the 11 categories. The data structure can be seen in the [viewer](https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/dataPeview). Although the original dataset has been cited in some articles, the experiments in those articles lack reproducibility. In order to demonstrate the effectiveness of the default subset, we further processed the data and constructed the [eval subset](#eval-subset) to supplement the evaluation of this integrated version dataset. The results of the evaluation can be viewed in [[2]](https://huggingface.co/ccmusic-database/erhu_playing_tech). In addition, the labels of categories 4 and 7 in the original dataset were not discarded. Instead, they were separately constructed into [4_class subset](#4-class-subset) and [7_class subset](#7-class-subset). However, these two subsets have not been evaluated and therefore are not reflected in our paper.
25
 
26
  ## Statistics
27
  | ![](https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/erhu_pie.jpg) | ![](https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/erhu.jpg) | ![](https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/erhu_bar.jpg) | ![](https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/erhu.png) |
 
11
  pretty_name: Erhu Playing Technique Dataset
12
  size_categories:
13
  - 1K<n<10K
14
+ dataset_info:
15
+ - config_name: default
16
+ features:
17
+ - name: audio
18
+ dtype:
19
+ audio:
20
+ sampling_rate: 44100
21
+ - name: mel
22
+ dtype: image
23
+ - name: label
24
+ dtype: int8
25
+ - name: name
26
+ dtype: string
27
+ - name: cname
28
+ dtype: string
29
+ - name: pinyin
30
+ dtype: string
31
+ splits:
32
+ - name: train
33
+ num_bytes: 344265
34
+ num_examples: 748
35
+ - name: validation
36
+ num_bytes: 115509
37
+ num_examples: 251
38
+ - name: test
39
+ num_bytes: 116824
40
+ num_examples: 254
41
+ download_size: 229212910
42
+ dataset_size: 576598
43
+ - config_name: eval
44
+ features:
45
+ - name: mel
46
+ dtype: image
47
+ - name: cqt
48
+ dtype: image
49
+ - name: chroma
50
+ dtype: image
51
+ - name: label
52
+ dtype: int8
53
+ splits:
54
+ - name: train
55
+ num_bytes: 454379
56
+ num_examples: 748
57
+ - name: validation
58
+ num_bytes: 152431
59
+ num_examples: 251
60
+ - name: test
61
+ num_bytes: 154162
62
+ num_examples: 254
63
+ download_size: 127625997
64
+ dataset_size: 760972
65
+ configs:
66
+ - config_name: default
67
+ data_files:
68
+ - split: train
69
+ path: default/train/data-*.arrow
70
+ - split: validation
71
+ path: default/validation/data-*.arrow
72
+ - split: test
73
+ path: default/test/data-*.arrow
74
+ - config_name: eval
75
+ data_files:
76
+ - split: train
77
+ path: eval/train/data-*.arrow
78
+ - split: validation
79
+ path: eval/validation/data-*.arrow
80
+ - split: test
81
+ path: eval/test/data-*.arrow
82
  ---
83
+
84
  # Dataset Card for Erhu Playing Technique
85
  ## Original Content
86
  This dataset was created and has been utilized for Erhu playing technique detection by [[1]](https://arxiv.org/pdf/1910.09021), which has not undergone peer review. The original dataset comprises 1,253 Erhu audio clips, all performed by professional Erhu players. These clips were annotated according to three hierarchical levels, resulting in annotations for four, seven, and 11 categories. Part of the audio data is sourced from the CTIS dataset described earlier.
 
88
  ## Integration
89
  We first perform label cleaning to abandon the labels for the four and seven categories, since they do not strictly form a hierarchical relationship, and there are also missing data problems. This process leaves us with only the labels for the 11 categories. Then, we add Chinese character label and Chinese pinyin label to enhance comprehensibility. The 11 labels are: Detache (分弓), Diangong (垫弓), Harmonic (泛音), Legato\slide\glissando (连弓\滑音\连音), Percussive (击弓), Pizzicato (拨弦), Ricochet (抛弓), Staccato (断弓), Tremolo (震音), Trill (颤音), and Vibrato (揉弦). After integration, the data structure contains six columns: audio (with a sampling rate of 44,100 Hz), mel spectrograms, numeric label, Italian label, Chinese character label, and Chinese pinyin label. The total number of audio clips remains at 1,253, with a total duration of 25.81 minutes. The average duration is 1.24 seconds.
90
 
91
+ We constructed the <a href="#11-class-subset">default subset</a> of the current integrated version dataset based on its 11 classification data and optimized the names of the 11 categories. The data structure can be seen in the [viewer](https://huggingface.co/datasets/ccmusic-database/erhu_playing_tech/viewer). Although the original dataset has been cited in some articles, the experiments in those articles lack reproducibility. In order to demonstrate the effectiveness of the default subset, we further processed the data and constructed the [eval subset](#eval-subset) to supplement the evaluation of this integrated version dataset. The results of the evaluation can be viewed in [[2]](https://huggingface.co/ccmusic-database/erhu_playing_tech). In addition, the labels of categories 4 and 7 in the original dataset were not discarded. Instead, they were separately constructed into [4_class subset](#4-class-subset) and [7_class subset](#7-class-subset). However, these two subsets have not been evaluated and therefore are not reflected in our paper.
92
 
93
  ## Statistics
94
  | ![](https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/erhu_pie.jpg) | ![](https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/erhu.jpg) | ![](https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/erhu_bar.jpg) | ![](https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/erhu.png) |
default/dataset_dict.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"splits": ["train", "validation", "test"]}
default/test/data-00000-of-00001.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af8048f6c5141902bcb842cc47e3be16f30af358ccbfdfdf7c10897065896209
3
+ size 28891424
default/test/dataset_info.json ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "builder_name": "erhu_playing_tech",
3
+ "citation": "",
4
+ "config_name": "11_classes",
5
+ "dataset_name": "erhu_playing_tech",
6
+ "dataset_size": 576598,
7
+ "description": "",
8
+ "download_checksums": {
9
+ "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/audio.zip": {
10
+ "num_bytes": 220667351,
11
+ "checksum": null
12
+ },
13
+ "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/mel.zip": {
14
+ "num_bytes": 8545559,
15
+ "checksum": null
16
+ }
17
+ },
18
+ "download_size": 229212910,
19
+ "features": {
20
+ "audio": {
21
+ "sampling_rate": 44100,
22
+ "_type": "Audio"
23
+ },
24
+ "mel": {
25
+ "_type": "Image"
26
+ },
27
+ "label": {
28
+ "names": [
29
+ "vibrato",
30
+ "trill",
31
+ "tremolo",
32
+ "staccato",
33
+ "ricochet",
34
+ "pizzicato",
35
+ "percussive",
36
+ "legato_slide_glissando",
37
+ "harmonic",
38
+ "diangong",
39
+ "detache"
40
+ ],
41
+ "_type": "ClassLabel"
42
+ },
43
+ "name": {
44
+ "dtype": "string",
45
+ "_type": "Value"
46
+ },
47
+ "cname": {
48
+ "dtype": "string",
49
+ "_type": "Value"
50
+ },
51
+ "pinyin": {
52
+ "dtype": "string",
53
+ "_type": "Value"
54
+ }
55
+ },
56
+ "homepage": "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech",
57
+ "license": "CC-BY-NC-ND",
58
+ "size_in_bytes": 229789508,
59
+ "splits": {
60
+ "train": {
61
+ "name": "train",
62
+ "num_bytes": 344265,
63
+ "num_examples": 748,
64
+ "dataset_name": "erhu_playing_tech"
65
+ },
66
+ "validation": {
67
+ "name": "validation",
68
+ "num_bytes": 115509,
69
+ "num_examples": 251,
70
+ "dataset_name": "erhu_playing_tech"
71
+ },
72
+ "test": {
73
+ "name": "test",
74
+ "num_bytes": 116824,
75
+ "num_examples": 254,
76
+ "dataset_name": "erhu_playing_tech"
77
+ }
78
+ },
79
+ "version": {
80
+ "version_str": "0.0.0",
81
+ "major": 0,
82
+ "minor": 0,
83
+ "patch": 0
84
+ }
85
+ }
default/test/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "3b23bbfb17e19f92",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": "test"
13
+ }
default/train/data-00000-of-00001.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a13b9f32e7e9972b13d8eba8a53ae04ccad29b63064e22cb3a9f787b799340cb
3
+ size 83851232
default/train/dataset_info.json ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "builder_name": "erhu_playing_tech",
3
+ "citation": "",
4
+ "config_name": "11_classes",
5
+ "dataset_name": "erhu_playing_tech",
6
+ "dataset_size": 576598,
7
+ "description": "",
8
+ "download_checksums": {
9
+ "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/audio.zip": {
10
+ "num_bytes": 220667351,
11
+ "checksum": null
12
+ },
13
+ "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/mel.zip": {
14
+ "num_bytes": 8545559,
15
+ "checksum": null
16
+ }
17
+ },
18
+ "download_size": 229212910,
19
+ "features": {
20
+ "audio": {
21
+ "sampling_rate": 44100,
22
+ "_type": "Audio"
23
+ },
24
+ "mel": {
25
+ "_type": "Image"
26
+ },
27
+ "label": {
28
+ "names": [
29
+ "vibrato",
30
+ "trill",
31
+ "tremolo",
32
+ "staccato",
33
+ "ricochet",
34
+ "pizzicato",
35
+ "percussive",
36
+ "legato_slide_glissando",
37
+ "harmonic",
38
+ "diangong",
39
+ "detache"
40
+ ],
41
+ "_type": "ClassLabel"
42
+ },
43
+ "name": {
44
+ "dtype": "string",
45
+ "_type": "Value"
46
+ },
47
+ "cname": {
48
+ "dtype": "string",
49
+ "_type": "Value"
50
+ },
51
+ "pinyin": {
52
+ "dtype": "string",
53
+ "_type": "Value"
54
+ }
55
+ },
56
+ "homepage": "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech",
57
+ "license": "CC-BY-NC-ND",
58
+ "size_in_bytes": 229789508,
59
+ "splits": {
60
+ "train": {
61
+ "name": "train",
62
+ "num_bytes": 344265,
63
+ "num_examples": 748,
64
+ "dataset_name": "erhu_playing_tech"
65
+ },
66
+ "validation": {
67
+ "name": "validation",
68
+ "num_bytes": 115509,
69
+ "num_examples": 251,
70
+ "dataset_name": "erhu_playing_tech"
71
+ },
72
+ "test": {
73
+ "name": "test",
74
+ "num_bytes": 116824,
75
+ "num_examples": 254,
76
+ "dataset_name": "erhu_playing_tech"
77
+ }
78
+ },
79
+ "version": {
80
+ "version_str": "0.0.0",
81
+ "major": 0,
82
+ "minor": 0,
83
+ "patch": 0
84
+ }
85
+ }
default/train/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "e25a6f7d779d2608",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": "train"
13
+ }
default/validation/data-00000-of-00001.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a1fddd5fb306367db4344df0e2d61a93aafa8794ad22e9b1f4034f5822304de
3
+ size 28426056
default/validation/dataset_info.json ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "builder_name": "erhu_playing_tech",
3
+ "citation": "",
4
+ "config_name": "11_classes",
5
+ "dataset_name": "erhu_playing_tech",
6
+ "dataset_size": 576598,
7
+ "description": "",
8
+ "download_checksums": {
9
+ "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/audio.zip": {
10
+ "num_bytes": 220667351,
11
+ "checksum": null
12
+ },
13
+ "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/mel.zip": {
14
+ "num_bytes": 8545559,
15
+ "checksum": null
16
+ }
17
+ },
18
+ "download_size": 229212910,
19
+ "features": {
20
+ "audio": {
21
+ "sampling_rate": 44100,
22
+ "_type": "Audio"
23
+ },
24
+ "mel": {
25
+ "_type": "Image"
26
+ },
27
+ "label": {
28
+ "names": [
29
+ "vibrato",
30
+ "trill",
31
+ "tremolo",
32
+ "staccato",
33
+ "ricochet",
34
+ "pizzicato",
35
+ "percussive",
36
+ "legato_slide_glissando",
37
+ "harmonic",
38
+ "diangong",
39
+ "detache"
40
+ ],
41
+ "_type": "ClassLabel"
42
+ },
43
+ "name": {
44
+ "dtype": "string",
45
+ "_type": "Value"
46
+ },
47
+ "cname": {
48
+ "dtype": "string",
49
+ "_type": "Value"
50
+ },
51
+ "pinyin": {
52
+ "dtype": "string",
53
+ "_type": "Value"
54
+ }
55
+ },
56
+ "homepage": "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech",
57
+ "license": "CC-BY-NC-ND",
58
+ "size_in_bytes": 229789508,
59
+ "splits": {
60
+ "train": {
61
+ "name": "train",
62
+ "num_bytes": 344265,
63
+ "num_examples": 748,
64
+ "dataset_name": "erhu_playing_tech"
65
+ },
66
+ "validation": {
67
+ "name": "validation",
68
+ "num_bytes": 115509,
69
+ "num_examples": 251,
70
+ "dataset_name": "erhu_playing_tech"
71
+ },
72
+ "test": {
73
+ "name": "test",
74
+ "num_bytes": 116824,
75
+ "num_examples": 254,
76
+ "dataset_name": "erhu_playing_tech"
77
+ }
78
+ },
79
+ "version": {
80
+ "version_str": "0.0.0",
81
+ "major": 0,
82
+ "minor": 0,
83
+ "patch": 0
84
+ }
85
+ }
default/validation/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "a8272097a8b970b3",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": "validation"
13
+ }
erhu_playing_tech.py DELETED
@@ -1,183 +0,0 @@
1
- import os
2
- import random
3
- import hashlib
4
- import datasets
5
-
6
-
7
- _NAMES = {
8
- "4_classes": {
9
- "trill": ["颤音", "chan4_yin1"],
10
- "staccato": ["断弓", "duan4_gong1"],
11
- "slide": ["滑音", "hua2_yin1"],
12
- "others": ["其它", "qi2_ta1"],
13
- },
14
- "7_classes": {
15
- "trill_short_up": ["短上颤音", "duan3_shang4_chan4_yin1"],
16
- "trill_long": ["长颤音", "chang2_chan4_yin1"],
17
- "staccato": ["断弓", "duan4_gong1"],
18
- "slide_up": ["上滑音", "shang4_hua2_yin1"],
19
- "slide_legato": ["连滑音", "lian2_hua2_yin1"],
20
- "slide_down": ["下滑音", "xia4_hua2_yin1"],
21
- "others": ["其它", "qi2_ta1"],
22
- },
23
- "11_classes": {
24
- "vibrato": ["揉弦", "rou2_xian2"],
25
- "trill": ["颤音", "chan4_yin1"],
26
- "tremolo": ["震音", "zhen4_yin1"],
27
- "staccato": ["断弓", "duan4_gong1"],
28
- "ricochet": ["抛弓", "pao1_gong1"],
29
- "pizzicato": ["拨弦", "bo1_xian2"],
30
- "percussive": ["击弓", "ji1_gong1"],
31
- "legato_slide_glissando": [
32
- "连弓、滑音、连音",
33
- "lian2_gong1, hua2_yin1, lian2_yin1",
34
- ],
35
- "harmonic": ["泛音", "fan4_yin1"],
36
- "diangong": ["垫弓", "dian4_gong1"],
37
- "detache": ["分弓", "fen1_gong1"],
38
- },
39
- }
40
-
41
- _HOMEPAGE = f"https://www.modelscope.cn/datasets/ccmusic-database/{os.path.basename(__file__)[:-3]}"
42
-
43
- _DOMAIN = f"{_HOMEPAGE}/resolve/master/data"
44
-
45
- _URLS = {
46
- "audio": f"{_DOMAIN}/audio.zip",
47
- "mel": f"{_DOMAIN}/mel.zip",
48
- "eval": f"{_DOMAIN}/eval.zip",
49
- }
50
-
51
-
52
- class erhu_playing_tech(datasets.GeneratorBasedBuilder):
53
- def _info(self):
54
- if self.config.name == "default":
55
- self.config.name = "11_classes"
56
-
57
- return datasets.DatasetInfo(
58
- features=(
59
- datasets.Features(
60
- {
61
- "audio": datasets.Audio(sampling_rate=44100),
62
- "mel": datasets.Image(),
63
- "label": datasets.features.ClassLabel(
64
- names=list(_NAMES[self.config.name].keys())
65
- ),
66
- "name": datasets.Value("string"),
67
- "cname": datasets.Value("string"),
68
- "pinyin": datasets.Value("string"),
69
- }
70
- )
71
- if self.config.name != "eval"
72
- else datasets.Features(
73
- {
74
- "mel": datasets.Image(),
75
- "cqt": datasets.Image(),
76
- "chroma": datasets.Image(),
77
- "label": datasets.features.ClassLabel(
78
- names=_NAMES["11_classes"]
79
- ),
80
- }
81
- )
82
- ),
83
- homepage=_HOMEPAGE,
84
- license="CC-BY-NC-ND",
85
- version="1.2.0",
86
- )
87
-
88
- def _str2md5(self, original_string: str):
89
- md5_obj = hashlib.md5()
90
- md5_obj.update(original_string.encode("utf-8"))
91
- return md5_obj.hexdigest()
92
-
93
- def _split_generators(self, dl_manager):
94
- if self.config.name != "eval":
95
- audio_files = dl_manager.download_and_extract(_URLS["audio"])
96
- mel_files = dl_manager.download_and_extract(_URLS["mel"])
97
- files = {}
98
- for fpath in dl_manager.iter_files([audio_files]):
99
- fname = os.path.basename(fpath)
100
- dirname = os.path.dirname(fpath)
101
- subset = os.path.basename(os.path.dirname(dirname))
102
- if self.config.name == subset and fname.endswith(".wav"):
103
- cls = f"{subset}/{os.path.basename(dirname)}/"
104
- item_id = self._str2md5(cls + fname.split(".wa")[0])
105
- files[item_id] = {"audio": fpath}
106
-
107
- for fpath in dl_manager.iter_files([mel_files]):
108
- fname = os.path.basename(fpath)
109
- dirname = os.path.dirname(fpath)
110
- subset = os.path.basename(os.path.dirname(dirname))
111
- if self.config.name == subset and fname.endswith(".jpg"):
112
- cls = f"{subset}/{os.path.basename(dirname)}/"
113
- item_id = self._str2md5(cls + fname.split(".jp")[0])
114
- files[item_id]["mel"] = fpath
115
-
116
- dataset = list(files.values())
117
-
118
- else:
119
- eval_files = dl_manager.download_and_extract(_URLS["eval"])
120
- dataset = []
121
- for fpath in dl_manager.iter_files([eval_files]):
122
- fname: str = os.path.basename(fpath)
123
- if "_mel" in fname and fname.endswith(".jpg"):
124
- dataset.append({"mel": fpath, "label": fname.split("__")[0]})
125
-
126
- categories = {}
127
- names = _NAMES["11_classes" if "eval" in self.config.name else self.config.name]
128
- for name in names:
129
- categories[name] = []
130
-
131
- for data in dataset:
132
- if self.config.name != "eval":
133
- data["label"] = os.path.basename(os.path.dirname(data["audio"]))
134
-
135
- categories[data["label"]].append(data)
136
-
137
- testset, validset, trainset = [], [], []
138
- for cls in categories:
139
- random.shuffle(categories[cls])
140
- count = len(categories[cls])
141
- p60 = int(count * 0.6)
142
- p80 = int(count * 0.8)
143
- trainset += categories[cls][:p60]
144
- validset += categories[cls][p60:p80]
145
- testset += categories[cls][p80:]
146
-
147
- random.shuffle(trainset)
148
- random.shuffle(validset)
149
- random.shuffle(testset)
150
-
151
- return [
152
- datasets.SplitGenerator(
153
- name=datasets.Split.TRAIN, gen_kwargs={"files": trainset}
154
- ),
155
- datasets.SplitGenerator(
156
- name=datasets.Split.VALIDATION, gen_kwargs={"files": validset}
157
- ),
158
- datasets.SplitGenerator(
159
- name=datasets.Split.TEST, gen_kwargs={"files": testset}
160
- ),
161
- ]
162
-
163
- def _generate_examples(self, files):
164
- if self.config.name != "eval":
165
- for i, item in enumerate(files):
166
- pt = item["label"]
167
- yield i, {
168
- "audio": item["audio"],
169
- "mel": item["mel"],
170
- "label": pt,
171
- "name": pt,
172
- "cname": _NAMES[self.config.name][pt][0],
173
- "pinyin": _NAMES[self.config.name][pt][1],
174
- }
175
-
176
- else:
177
- for i, item in enumerate(files):
178
- yield i, {
179
- "mel": item["mel"],
180
- "cqt": item["mel"].replace("_mel", "_cqt"),
181
- "chroma": item["mel"].replace("_mel", "_chroma"),
182
- "label": item["label"],
183
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
eval/dataset_dict.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"splits": ["train", "validation", "test"]}
eval/test/data-00000-of-00001.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd1d9fbcf22c3e66ec8747c42726895b5921704599413624455cb698313a72a5
3
+ size 27087792
eval/test/dataset_info.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "builder_name": "erhu_playing_tech",
3
+ "citation": "",
4
+ "config_name": "eval",
5
+ "dataset_name": "erhu_playing_tech",
6
+ "dataset_size": 760972,
7
+ "description": "",
8
+ "download_checksums": {
9
+ "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/eval.zip": {
10
+ "num_bytes": 127625997,
11
+ "checksum": null
12
+ }
13
+ },
14
+ "download_size": 127625997,
15
+ "features": {
16
+ "mel": {
17
+ "_type": "Image"
18
+ },
19
+ "cqt": {
20
+ "_type": "Image"
21
+ },
22
+ "chroma": {
23
+ "_type": "Image"
24
+ },
25
+ "label": {
26
+ "names": [
27
+ "vibrato",
28
+ "trill",
29
+ "tremolo",
30
+ "staccato",
31
+ "ricochet",
32
+ "pizzicato",
33
+ "percussive",
34
+ "legato_slide_glissando",
35
+ "harmonic",
36
+ "diangong",
37
+ "detache"
38
+ ],
39
+ "_type": "ClassLabel"
40
+ }
41
+ },
42
+ "homepage": "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech",
43
+ "license": "CC-BY-NC-ND",
44
+ "size_in_bytes": 128386969,
45
+ "splits": {
46
+ "train": {
47
+ "name": "train",
48
+ "num_bytes": 454379,
49
+ "num_examples": 748,
50
+ "dataset_name": "erhu_playing_tech"
51
+ },
52
+ "validation": {
53
+ "name": "validation",
54
+ "num_bytes": 152431,
55
+ "num_examples": 251,
56
+ "dataset_name": "erhu_playing_tech"
57
+ },
58
+ "test": {
59
+ "name": "test",
60
+ "num_bytes": 154162,
61
+ "num_examples": 254,
62
+ "dataset_name": "erhu_playing_tech"
63
+ }
64
+ },
65
+ "version": {
66
+ "version_str": "0.0.0",
67
+ "major": 0,
68
+ "minor": 0,
69
+ "patch": 0
70
+ }
71
+ }
eval/test/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "15b9909f9dccd41d",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": "test"
13
+ }
eval/train/data-00000-of-00001.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7538e207a1d04170b64a0f284412be1a06ed497eb8f3ecedfcd8f1b31a13e86
3
+ size 79243168
eval/train/dataset_info.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "builder_name": "erhu_playing_tech",
3
+ "citation": "",
4
+ "config_name": "eval",
5
+ "dataset_name": "erhu_playing_tech",
6
+ "dataset_size": 760972,
7
+ "description": "",
8
+ "download_checksums": {
9
+ "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/eval.zip": {
10
+ "num_bytes": 127625997,
11
+ "checksum": null
12
+ }
13
+ },
14
+ "download_size": 127625997,
15
+ "features": {
16
+ "mel": {
17
+ "_type": "Image"
18
+ },
19
+ "cqt": {
20
+ "_type": "Image"
21
+ },
22
+ "chroma": {
23
+ "_type": "Image"
24
+ },
25
+ "label": {
26
+ "names": [
27
+ "vibrato",
28
+ "trill",
29
+ "tremolo",
30
+ "staccato",
31
+ "ricochet",
32
+ "pizzicato",
33
+ "percussive",
34
+ "legato_slide_glissando",
35
+ "harmonic",
36
+ "diangong",
37
+ "detache"
38
+ ],
39
+ "_type": "ClassLabel"
40
+ }
41
+ },
42
+ "homepage": "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech",
43
+ "license": "CC-BY-NC-ND",
44
+ "size_in_bytes": 128386969,
45
+ "splits": {
46
+ "train": {
47
+ "name": "train",
48
+ "num_bytes": 454379,
49
+ "num_examples": 748,
50
+ "dataset_name": "erhu_playing_tech"
51
+ },
52
+ "validation": {
53
+ "name": "validation",
54
+ "num_bytes": 152431,
55
+ "num_examples": 251,
56
+ "dataset_name": "erhu_playing_tech"
57
+ },
58
+ "test": {
59
+ "name": "test",
60
+ "num_bytes": 154162,
61
+ "num_examples": 254,
62
+ "dataset_name": "erhu_playing_tech"
63
+ }
64
+ },
65
+ "version": {
66
+ "version_str": "0.0.0",
67
+ "major": 0,
68
+ "minor": 0,
69
+ "patch": 0
70
+ }
71
+ }
eval/train/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "58f064cc01664c67",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": "train"
13
+ }
eval/validation/data-00000-of-00001.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e48b72d161283ec9d833484a9bebe189169c3220d347be414084d5d4d7e583cc
3
+ size 26542632
eval/validation/dataset_info.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "builder_name": "erhu_playing_tech",
3
+ "citation": "",
4
+ "config_name": "eval",
5
+ "dataset_name": "erhu_playing_tech",
6
+ "dataset_size": 760972,
7
+ "description": "",
8
+ "download_checksums": {
9
+ "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech/resolve/master/data/eval.zip": {
10
+ "num_bytes": 127625997,
11
+ "checksum": null
12
+ }
13
+ },
14
+ "download_size": 127625997,
15
+ "features": {
16
+ "mel": {
17
+ "_type": "Image"
18
+ },
19
+ "cqt": {
20
+ "_type": "Image"
21
+ },
22
+ "chroma": {
23
+ "_type": "Image"
24
+ },
25
+ "label": {
26
+ "names": [
27
+ "vibrato",
28
+ "trill",
29
+ "tremolo",
30
+ "staccato",
31
+ "ricochet",
32
+ "pizzicato",
33
+ "percussive",
34
+ "legato_slide_glissando",
35
+ "harmonic",
36
+ "diangong",
37
+ "detache"
38
+ ],
39
+ "_type": "ClassLabel"
40
+ }
41
+ },
42
+ "homepage": "https://www.modelscope.cn/datasets/ccmusic-database/erhu_playing_tech",
43
+ "license": "CC-BY-NC-ND",
44
+ "size_in_bytes": 128386969,
45
+ "splits": {
46
+ "train": {
47
+ "name": "train",
48
+ "num_bytes": 454379,
49
+ "num_examples": 748,
50
+ "dataset_name": "erhu_playing_tech"
51
+ },
52
+ "validation": {
53
+ "name": "validation",
54
+ "num_bytes": 152431,
55
+ "num_examples": 251,
56
+ "dataset_name": "erhu_playing_tech"
57
+ },
58
+ "test": {
59
+ "name": "test",
60
+ "num_bytes": 154162,
61
+ "num_examples": 254,
62
+ "dataset_name": "erhu_playing_tech"
63
+ }
64
+ },
65
+ "version": {
66
+ "version_str": "0.0.0",
67
+ "major": 0,
68
+ "minor": 0,
69
+ "patch": 0
70
+ }
71
+ }
eval/validation/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "788c0ac9643f652f",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": "validation"
13
+ }