Datasets:
Bharat Ramanathan
commited on
Commit
·
a809d84
1
Parent(s):
229a75e
add first version of the mile dataset
Browse files- README.md +161 -0
- mile_dataset.py +136 -0
README.md
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language:
|
5 |
+
- ta
|
6 |
+
language_creators:
|
7 |
+
- expert-generated
|
8 |
+
license:
|
9 |
+
- cc-by-2.0
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
pretty_name: IISc-MILE Tamil ASR Corpus
|
13 |
+
size_categories:
|
14 |
+
- 10K<n<100K
|
15 |
+
source_datasets:
|
16 |
+
- original
|
17 |
+
tags:
|
18 |
+
- Tamil ASR
|
19 |
+
- Speech Recognition
|
20 |
+
task_categories:
|
21 |
+
- automatic-speech-recognition
|
22 |
+
task_ids: []
|
23 |
+
---
|
24 |
+
|
25 |
+
# Dataset Card for [Dataset Name]
|
26 |
+
|
27 |
+
## Table of Contents
|
28 |
+
- [Table of Contents](#table-of-contents)
|
29 |
+
- [Dataset Description](#dataset-description)
|
30 |
+
- [Dataset Summary](#dataset-summary)
|
31 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
32 |
+
- [Languages](#languages)
|
33 |
+
- [Dataset Structure](#dataset-structure)
|
34 |
+
- [Data Instances](#data-instances)
|
35 |
+
- [Data Fields](#data-fields)
|
36 |
+
- [Data Splits](#data-splits)
|
37 |
+
- [Dataset Creation](#dataset-creation)
|
38 |
+
- [Curation Rationale](#curation-rationale)
|
39 |
+
- [Source Data](#source-data)
|
40 |
+
- [Annotations](#annotations)
|
41 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
42 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
43 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
44 |
+
- [Discussion of Biases](#discussion-of-biases)
|
45 |
+
- [Other Known Limitations](#other-known-limitations)
|
46 |
+
- [Additional Information](#additional-information)
|
47 |
+
- [Dataset Curators](#dataset-curators)
|
48 |
+
- [Licensing Information](#licensing-information)
|
49 |
+
- [Citation Information](#citation-information)
|
50 |
+
- [Contributions](#contributions)
|
51 |
+
|
52 |
+
## Dataset Description
|
53 |
+
|
54 |
+
- **Homepage:** https://www.openslr.org/127/
|
55 |
+
- **Repository:** https://github.com/MILE-IISc
|
56 |
+
- **Paper:** https://arxiv.org/abs/2207.13331
|
57 |
+
- **Leaderboard:**
|
58 |
+
- **Point of Contact:**
|
59 |
+
|
60 |
+
### Dataset Summary
|
61 |
+
|
62 |
+
Tamil transcribed speech corpus for ASR
|
63 |
+
|
64 |
+
### Supported Tasks and Leaderboards
|
65 |
+
|
66 |
+
[More Information Needed]
|
67 |
+
|
68 |
+
### Languages
|
69 |
+
|
70 |
+
- Tamil
|
71 |
+
|
72 |
+
## Dataset Structure
|
73 |
+
|
74 |
+
### Data Instances
|
75 |
+
|
76 |
+
[More Information Needed]
|
77 |
+
|
78 |
+
### Data Fields
|
79 |
+
|
80 |
+
[More Information Needed]
|
81 |
+
|
82 |
+
### Data Splits
|
83 |
+
|
84 |
+
[More Information Needed]
|
85 |
+
|
86 |
+
## Dataset Creation
|
87 |
+
|
88 |
+
### Curation Rationale
|
89 |
+
|
90 |
+
[More Information Needed]
|
91 |
+
|
92 |
+
### Source Data
|
93 |
+
|
94 |
+
#### Initial Data Collection and Normalization
|
95 |
+
|
96 |
+
[More Information Needed]
|
97 |
+
|
98 |
+
#### Who are the source language producers?
|
99 |
+
|
100 |
+
[More Information Needed]
|
101 |
+
|
102 |
+
### Annotations
|
103 |
+
|
104 |
+
#### Annotation process
|
105 |
+
|
106 |
+
[More Information Needed]
|
107 |
+
|
108 |
+
#### Who are the annotators?
|
109 |
+
|
110 |
+
[More Information Needed]
|
111 |
+
|
112 |
+
### Personal and Sensitive Information
|
113 |
+
|
114 |
+
[More Information Needed]
|
115 |
+
|
116 |
+
## Considerations for Using the Data
|
117 |
+
|
118 |
+
### Social Impact of Dataset
|
119 |
+
|
120 |
+
[More Information Needed]
|
121 |
+
|
122 |
+
### Discussion of Biases
|
123 |
+
|
124 |
+
[More Information Needed]
|
125 |
+
|
126 |
+
### Other Known Limitations
|
127 |
+
|
128 |
+
[More Information Needed]
|
129 |
+
|
130 |
+
## Additional Information
|
131 |
+
|
132 |
+
### Dataset Curators
|
133 |
+
|
134 |
+
[More Information Needed]
|
135 |
+
|
136 |
+
### Licensing Information
|
137 |
+
|
138 |
+
Attribution 2.0 Generic (CC BY 2.0)
|
139 |
+
|
140 |
+
### Citation Information
|
141 |
+
@misc{mile_1,
|
142 |
+
doi = {10.48550/ARXIV.2207.13331},
|
143 |
+
url = {https://arxiv.org/abs/2207.13331},
|
144 |
+
author = {A, Madhavaraj and Pilar, Bharathi and G, Ramakrishnan A},
|
145 |
+
title = {Subword Dictionary Learning and Segmentation Techniques for Automatic Speech Recognition in Tamil and Kannada},
|
146 |
+
publisher = {arXiv},
|
147 |
+
year = {2022},
|
148 |
+
}
|
149 |
+
|
150 |
+
@misc{mile_2,
|
151 |
+
doi = {10.48550/ARXIV.2207.13333},
|
152 |
+
url = {https://arxiv.org/abs/2207.13333},
|
153 |
+
author = {A, Madhavaraj and Pilar, Bharathi and G, Ramakrishnan A},
|
154 |
+
title = {Knowledge-driven Subword Grammar Modeling for Automatic Speech Recognition in Tamil and Kannada},
|
155 |
+
publisher = {arXiv},
|
156 |
+
year = {2022},
|
157 |
+
}
|
158 |
+
|
159 |
+
### Contributions
|
160 |
+
|
161 |
+
Thanks to [@parambharat](https://github.com/parambharat) for adding this dataset.
|
mile_dataset.py
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
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 |
+
"""IISc-MILE Tamil ASR Corpus contains transcribed speech corpus for training ASR systems for Tamil language. It contains ~150 hours of read speech data collected from 531 speakers in a noise-free recording environment with high quality USB microphones. """
|
16 |
+
|
17 |
+
|
18 |
+
import json
|
19 |
+
import os
|
20 |
+
|
21 |
+
import datasets
|
22 |
+
|
23 |
+
_CITATION = """\
|
24 |
+
@misc{mile_1,
|
25 |
+
doi = {10.48550/ARXIV.2207.13331},
|
26 |
+
url = {https://arxiv.org/abs/2207.13331},
|
27 |
+
author = {A, Madhavaraj and Pilar, Bharathi and G, Ramakrishnan A},
|
28 |
+
title = {Subword Dictionary Learning and Segmentation Techniques for Automatic Speech Recognition in Tamil and Kannada},
|
29 |
+
publisher = {arXiv},
|
30 |
+
year = {2022},
|
31 |
+
}
|
32 |
+
|
33 |
+
@misc{mile_2,
|
34 |
+
doi = {10.48550/ARXIV.2207.13333},
|
35 |
+
url = {https://arxiv.org/abs/2207.13333},
|
36 |
+
author = {A, Madhavaraj and Pilar, Bharathi and G, Ramakrishnan A},
|
37 |
+
title = {Knowledge-driven Subword Grammar Modeling for Automatic Speech Recognition in Tamil and Kannada},
|
38 |
+
publisher = {arXiv},
|
39 |
+
year = {2022},
|
40 |
+
}
|
41 |
+
"""
|
42 |
+
|
43 |
+
_DESCRIPTION = """\
|
44 |
+
IISc-MILE Tamil ASR Corpus contains transcribed speech corpus for training ASR systems for Tamil language. It contains ~150 hours of read speech data collected from 531 speakers in a noise-free recording environment with high quality USB microphones.
|
45 |
+
"""
|
46 |
+
|
47 |
+
_HOMEPAGE = "https://www.openslr.org/127/"
|
48 |
+
|
49 |
+
_LICENSE = "Attribution 2.0 Generic (CC BY 2.0)"
|
50 |
+
|
51 |
+
|
52 |
+
_METADATA_URLS = {
|
53 |
+
"train": "data/train.jsonl",
|
54 |
+
"test": "data/test.jsonl"
|
55 |
+
}
|
56 |
+
_URLS = {
|
57 |
+
"train": "data/train.tar.gz",
|
58 |
+
"test": "data/test.tar.gz",
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
+
class MileDataset(datasets.GeneratorBasedBuilder):
|
63 |
+
"""IISc-MILE Tamil ASR Corpus contains transcribed speech corpus for training ASR systems for Tamil language."""
|
64 |
+
|
65 |
+
VERSION = datasets.Version("1.1.0")
|
66 |
+
def _info(self):
|
67 |
+
features = datasets.Features(
|
68 |
+
{
|
69 |
+
"audio": datasets.Audio(sampling_rate=16_000),
|
70 |
+
"file_name": datasets.Value("string"),
|
71 |
+
"sentence": datasets.Value("string"),
|
72 |
+
}
|
73 |
+
)
|
74 |
+
return datasets.DatasetInfo(
|
75 |
+
description=_DESCRIPTION,
|
76 |
+
features=features,
|
77 |
+
supervised_keys=("sentence", "label"),
|
78 |
+
homepage=_HOMEPAGE,
|
79 |
+
license=_LICENSE,
|
80 |
+
citation=_CITATION,
|
81 |
+
)
|
82 |
+
|
83 |
+
def _split_generators(self, dl_manager):
|
84 |
+
metadata_paths = dl_manager.download(_METADATA_URLS)
|
85 |
+
train_archive = dl_manager.download(_URLS["train"])
|
86 |
+
test_archive = dl_manager.download(_URLS["test"])
|
87 |
+
local_extracted_train_archive = dl_manager.extract(train_archive) if not dl_manager.is_streaming else None
|
88 |
+
local_extracted_test_archive = dl_manager.extract(test_archive) if not dl_manager.is_streaming else None
|
89 |
+
test_archive = dl_manager.download(_URLS["test"])
|
90 |
+
train_dir = "train"
|
91 |
+
test_dir = "test"
|
92 |
+
|
93 |
+
return [
|
94 |
+
datasets.SplitGenerator(
|
95 |
+
name=datasets.Split.TRAIN,
|
96 |
+
gen_kwargs={
|
97 |
+
"metadata_path": metadata_paths["train"],
|
98 |
+
"local_extracted_archive": local_extracted_train_archive,
|
99 |
+
"path_to_clips": train_dir + "/mp3",
|
100 |
+
"audio_files": dl_manager.iter_archive(train_archive),
|
101 |
+
},
|
102 |
+
),
|
103 |
+
datasets.SplitGenerator(
|
104 |
+
name=datasets.Split.TEST,
|
105 |
+
gen_kwargs={
|
106 |
+
"metadata_path": metadata_paths["test"],
|
107 |
+
"local_extracted_archive": local_extracted_test_archive,
|
108 |
+
"path_to_clips": test_dir + "/mp3",
|
109 |
+
"audio_files": dl_manager.iter_archive(test_archive),
|
110 |
+
},
|
111 |
+
),
|
112 |
+
|
113 |
+
]
|
114 |
+
|
115 |
+
def _generate_examples(self, metadata_path, local_extracted_archive, path_to_clips, audio_files):
|
116 |
+
"""Yields examples as (key, example) tuples."""
|
117 |
+
examples = {}
|
118 |
+
with open(metadata_path, encoding="utf-8") as f:
|
119 |
+
for key, row in enumerate(f):
|
120 |
+
data = json.loads(row)
|
121 |
+
examples[data["file_name"]] = data
|
122 |
+
inside_clips_dir = False
|
123 |
+
id_ = 0
|
124 |
+
for path, f in audio_files:
|
125 |
+
if path.startswith(path_to_clips):
|
126 |
+
inside_clips_dir = True
|
127 |
+
if path in examples:
|
128 |
+
result = examples[path]
|
129 |
+
path = os.path.join(local_extracted_archive, path) if local_extracted_archive else path
|
130 |
+
result["audio"] = {"path": path, "bytes": f.read()}
|
131 |
+
result["file_name"] = path
|
132 |
+
yield id_, result
|
133 |
+
id_ += 1
|
134 |
+
elif inside_clips_dir:
|
135 |
+
break
|
136 |
+
|