jimbozhang commited on
Commit
dfe82cf
1 Parent(s): 050f24e

Add the loading script

Browse files
Files changed (7) hide show
  1. .gitignore +157 -0
  2. README.md +0 -7
  3. about.html +0 -9
  4. info.txt +0 -8
  5. speechocean762.py +96 -0
  6. test/dataviewer.tsv +0 -0
  7. train/dataviewer.tsv +0 -0
.gitignore ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # IDEs
156
+ .vscode/
157
+ .idea/
README.md CHANGED
@@ -9,13 +9,6 @@ tags:
9
  pretty_name: speechocean762
10
  size_categories:
11
  - 1K<n<10K
12
- configs:
13
- - config_name: default
14
- data_files:
15
- - split: train
16
- path: "train/dataviewer.tsv"
17
- - split: test
18
- path: "test/dataviewer.tsv"
19
  ---
20
  # speechocean762: A non-native English corpus for pronunciation scoring task
21
 
 
9
  pretty_name: speechocean762
10
  size_categories:
11
  - 1K<n<10K
 
 
 
 
 
 
 
12
  ---
13
  # speechocean762: A non-native English corpus for pronunciation scoring task
14
 
about.html DELETED
@@ -1,9 +0,0 @@
1
- This corpus aims to provide a free public dataset for the pronunciation scoring task.
2
- <p>
3
- This corpus consists of 5000 English sentences.
4
- All the speakers are non-native, and their mother tongue is Mandarin.
5
- Half of the speakers are Children, and the others are adults.
6
- The information of age and gender are provided. Five experts made the scores.
7
- To avoid subjective bias, each expert scores independently under the same metric.
8
- <p>
9
- For more details, please read the `README.md` in the corpus.
 
 
 
 
 
 
 
 
 
 
info.txt DELETED
@@ -1,8 +0,0 @@
1
- name: speechocean762
2
- summary: Pronunciation scoring dataset, labeled independently by five human experts
3
- category: speech
4
- license: Apache License v.2.0
5
- file: WAVE.tgz The audio files of both the train-set and test-set
6
- file: train.tgz Information for the train-set
7
- file: test.tgz Information for the test-set
8
- file: resource.tgz Transcripts and some miscellaneous files
 
 
 
 
 
 
 
 
 
speechocean762.py ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2023 Xiaomi Corporation (Author: Junbo Zhang) and the HuggingFace Datasets Authors.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+
16
+ import json
17
+
18
+ import datasets
19
+
20
+ _CITATION = """\
21
+ @inproceedings{speechocean762,
22
+ title={speechocean762: An Open-Source Non-native English Speech Corpus For Pronunciation Assessment},
23
+ booktitle={Proc. Interspeech 2021},
24
+ year=2021,
25
+ author={Junbo Zhang, Zhiwen Zhang, Yongqing Wang, Zhiyong Yan, Qiong Song, Yukai Huang, Ke Li, Daniel Povey, Yujun Wang}
26
+ }
27
+ """
28
+
29
+ _DESCRIPTION = """\
30
+ A free public dataset for the pronunciation scoring task.
31
+ This corpus consists of 5000 English sentences.
32
+ All the speakers are non-native, and their mother tongue is Mandarin.
33
+ Half of the speakers are Children, and the others are adults.
34
+ The information of age and gender are provided. Five experts made the scores.
35
+ To avoid subjective bias, each expert scores independently under the same metric.
36
+ """
37
+
38
+ _HOMEPAGE = "https://github.com/jimbozhang/speechocean762"
39
+
40
+ _LICENSE = "Attribution 4.0 International (CC BY 4.0)"
41
+
42
+
43
+ class Speechocean762Dataset(datasets.GeneratorBasedBuilder):
44
+ VERSION = datasets.Version("1.3.0")
45
+
46
+ BUILDER_CONFIGS = [
47
+ datasets.BuilderConfig(name="train", version=VERSION),
48
+ datasets.BuilderConfig(name="test", version=VERSION),
49
+ ]
50
+
51
+ DEFAULT_CONFIG_NAME = "test"
52
+
53
+ def _info(self):
54
+ return datasets.DatasetInfo(
55
+ description=_DESCRIPTION,
56
+ features=datasets.Features(
57
+ {
58
+ "file": datasets.Value("string"),
59
+ "audio": datasets.Audio(sampling_rate=16_000),
60
+ "text": datasets.Value("string"),
61
+ "accuracy": datasets.Value("int16"),
62
+ "fluency": datasets.Value("int16"),
63
+ "prosodic": datasets.Value("int16"),
64
+ "total": datasets.Value("int16"),
65
+ }
66
+ ),
67
+ homepage=_HOMEPAGE,
68
+ license=_LICENSE,
69
+ citation=_CITATION,
70
+ )
71
+
72
+ def _split_generators(self):
73
+ return [
74
+ datasets.SplitGenerator(
75
+ name=datasets.Split.TRAIN,
76
+ gen_kwargs={"filepath": "train/all-info.json"},
77
+ ),
78
+ datasets.SplitGenerator(
79
+ name=datasets.Split.TEST,
80
+ gen_kwargs={"filepath": "test/all-info.json"},
81
+ ),
82
+ ]
83
+
84
+ def _generate_examples(self, filepath):
85
+ with open(filepath, encoding="utf-8") as f:
86
+ for key, row in json.load(f).items():
87
+ path = f"WAVE/SPEAKER{row['speaker']}/{key}.WAV"
88
+ yield key, {
89
+ "file": path,
90
+ "audio": path,
91
+ "text": row["text"],
92
+ "accuracy": row["accuracy"],
93
+ "fluency": row["fluency"],
94
+ "prosodic": row["prosodic"],
95
+ "total": row["total"],
96
+ }
test/dataviewer.tsv DELETED
The diff for this file is too large to render. See raw diff
 
train/dataviewer.tsv DELETED
The diff for this file is too large to render. See raw diff