Commit
•
a437a77
0
Parent(s):
Update files from the datasets library (from 1.3.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.3.0
- .gitattributes +27 -0
- README.md +158 -0
- arabic_speech_corpus.py +142 -0
- dataset_infos.json +1 -0
- dummy/clean/2.1.0/dummy_data.zip +3 -0
.gitattributes
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language_creators:
|
5 |
+
- crowdsourced
|
6 |
+
languages:
|
7 |
+
- ar
|
8 |
+
licenses:
|
9 |
+
- cc-by-4-0
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
size_categories:
|
13 |
+
- 1K<n<10K
|
14 |
+
source_datasets:
|
15 |
+
- original
|
16 |
+
task_categories:
|
17 |
+
- other
|
18 |
+
task_ids:
|
19 |
+
- other-other-automatic speech recognition
|
20 |
+
---
|
21 |
+
|
22 |
+
# Dataset Card for Arabic Speech Corpus
|
23 |
+
|
24 |
+
## Table of Contents
|
25 |
+
- [Dataset Description](#dataset-description)
|
26 |
+
- [Dataset Summary](#dataset-summary)
|
27 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
28 |
+
- [Languages](#languages)
|
29 |
+
- [Dataset Structure](#dataset-structure)
|
30 |
+
- [Data Instances](#data-instances)
|
31 |
+
- [Data Fields](#data-instances)
|
32 |
+
- [Data Splits](#data-instances)
|
33 |
+
- [Dataset Creation](#dataset-creation)
|
34 |
+
- [Curation Rationale](#curation-rationale)
|
35 |
+
- [Source Data](#source-data)
|
36 |
+
- [Annotations](#annotations)
|
37 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
38 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
39 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
40 |
+
- [Discussion of Biases](#discussion-of-biases)
|
41 |
+
- [Other Known Limitations](#other-known-limitations)
|
42 |
+
- [Additional Information](#additional-information)
|
43 |
+
- [Dataset Curators](#dataset-curators)
|
44 |
+
- [Licensing Information](#licensing-information)
|
45 |
+
- [Citation Information](#citation-information)
|
46 |
+
- [Contributions](#contributions)
|
47 |
+
|
48 |
+
## Dataset Description
|
49 |
+
|
50 |
+
- **Homepage:** [Arabic Speech Corpus](http://en.arabicspeechcorpus.com/)
|
51 |
+
- **Repository:** [Needs More Information]
|
52 |
+
- **Paper:** [Modern standard Arabic phonetics for speech synthesis](http://en.arabicspeechcorpus.com/Nawar%20Halabi%20PhD%20Thesis%20Revised.pdf)
|
53 |
+
- **Leaderboard:** [Paperswithcode Leaderboard][Needs More Information]
|
54 |
+
- **Point of Contact:** [Nawar Halabi](mailto:nawar.halabi@gmail.com)
|
55 |
+
|
56 |
+
### Dataset Summary
|
57 |
+
|
58 |
+
This Speech corpus has been developed as part of PhD work carried out by Nawar Halabi at the University of Southampton. The corpus was recorded in south Levantine Arabic (Damascian accent) using a professional studio. Synthesized speech as an output using this corpus has produced a high quality, natural voice.
|
59 |
+
|
60 |
+
### Supported Tasks and Leaderboards
|
61 |
+
|
62 |
+
[Needs More Information]
|
63 |
+
|
64 |
+
### Languages
|
65 |
+
|
66 |
+
The audio is in Arabic.
|
67 |
+
|
68 |
+
## Dataset Structure
|
69 |
+
|
70 |
+
### Data Instances
|
71 |
+
|
72 |
+
A typical data point comprises the path to the audio file, usually called `file` and its transcription, called `text`.
|
73 |
+
An example from the dataset is:
|
74 |
+
```
|
75 |
+
{
|
76 |
+
'file': '/Users/username/.cache/huggingface/datasets/downloads/extracted/baebe85e2cb67579f6f88e7117a87888c1ace390f4f14cb6c3e585c517ad9db0/arabic-speech-corpus/wav/ARA NORM 0002.wav',
|
77 |
+
'orthographic': 'waraj~aHa Alt~aqoriyru Al~a*iy >aEad~ahu maEohadu >aboHaA^i haDabapi Alt~ibiti fiy Alo>akaAdiymiy~api AlS~iyniy~api liloEuluwmi - >ano tasotamir~a darajaAtu AloHaraArapi wamusotawayaAtu Alr~uTuwbapi fiy Alo<irotifaAEi TawaAla ha*aA Aloqarono',
|
78 |
+
'phonetic': "sil w a r a' jj A H a tt A q r ii0' r u0 ll a * i0 < a E a' dd a h u0 m a' E h a d u0 < a b H aa' ^ i0 h A D A' b a t i0 tt i1' b t i0 f i0 l < a k aa d ii0 m ii0' y a t i0 SS II0 n ii0' y a t i0 l u0 l E u0 l uu0' m i0 sil < a' n t a s t a m i0' rr a d a r a j aa' t u0 l H a r aa' r a t i0 w a m u0 s t a w a y aa' t u0 rr U0 T UU0' b a t i0 f i0 l Ah i0 r t i0 f aa' E i0 T A' w A l a h aa' * a l q A' r n sil",
|
79 |
+
'text': '\ufeffwaraj~aHa Alt~aqoriyru Al~aTHiy >aEad~ahu maEohadu >aboHaA^i haDabapi Alt~ibiti fiy Alo>akaAdiymiy~api AlS~iyniy~api liloEuluwmi - >ano tasotamir~a darajaAtu AloHaraArapi wamusotawayaAtu Alr~uTuwbapi fiy Alo<irotifaAEi TawaAla haTHaA Aloqarono'
|
80 |
+
}
|
81 |
+
```
|
82 |
+
|
83 |
+
### Data Fields
|
84 |
+
|
85 |
+
- file: A path to the downloaded audio file in .wav format.
|
86 |
+
- text: the transcription of the audio file.
|
87 |
+
- phonetic: the transcription in phonentics format.
|
88 |
+
- orthographic: the transcriptions written in orthographic format.
|
89 |
+
|
90 |
+
### Data Splits
|
91 |
+
|
92 |
+
| | Train | Test |
|
93 |
+
| ----- | ----- | ---- |
|
94 |
+
| dataset | 1813 | 100 |
|
95 |
+
|
96 |
+
|
97 |
+
|
98 |
+
## Dataset Creation
|
99 |
+
|
100 |
+
### Curation Rationale
|
101 |
+
|
102 |
+
[Needs More Information]
|
103 |
+
|
104 |
+
### Source Data
|
105 |
+
|
106 |
+
#### Initial Data Collection and Normalization
|
107 |
+
|
108 |
+
[Needs More Information]
|
109 |
+
|
110 |
+
#### Who are the source language producers?
|
111 |
+
|
112 |
+
[Needs More Information]
|
113 |
+
|
114 |
+
### Annotations
|
115 |
+
|
116 |
+
#### Annotation process
|
117 |
+
|
118 |
+
[Needs More Information]
|
119 |
+
|
120 |
+
#### Who are the annotators?
|
121 |
+
|
122 |
+
[Needs More Information]
|
123 |
+
|
124 |
+
### Personal and Sensitive Information
|
125 |
+
|
126 |
+
[Needs More Information]
|
127 |
+
|
128 |
+
## Considerations for Using the Data
|
129 |
+
|
130 |
+
### Social Impact of Dataset
|
131 |
+
|
132 |
+
[More Information Needed]
|
133 |
+
|
134 |
+
### Discussion of Biases
|
135 |
+
|
136 |
+
[More Information Needed]
|
137 |
+
|
138 |
+
### Other Known Limitations
|
139 |
+
|
140 |
+
[Needs More Information]
|
141 |
+
|
142 |
+
## Additional Information
|
143 |
+
|
144 |
+
### Dataset Curators
|
145 |
+
|
146 |
+
The corpus was recorded in south Levantine Arabic (Damascian accent) using a professional studio by Nawar Halabi.
|
147 |
+
|
148 |
+
### Licensing Information
|
149 |
+
|
150 |
+
CC BY 4.0
|
151 |
+
|
152 |
+
### Citation Information
|
153 |
+
|
154 |
+
[Needs More Information]
|
155 |
+
|
156 |
+
### Contributions
|
157 |
+
|
158 |
+
Thanks to [@zaidalyafeai](https://github.com/zaidalyafeai) for adding this dataset.
|
arabic_speech_corpus.py
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2021 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
|
3 |
+
#
|
4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
+
# you may not use this file except in compliance with the License.
|
6 |
+
# You may obtain a copy of the License at
|
7 |
+
#
|
8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
#
|
10 |
+
# Unless required by applicable law or agreed to in writing, software
|
11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
+
# See the License for the specific language governing permissions and
|
14 |
+
# limitations under the License.
|
15 |
+
|
16 |
+
# Lint as: python3
|
17 |
+
"""Arabic Speech Corpus"""
|
18 |
+
|
19 |
+
from __future__ import absolute_import, division, print_function
|
20 |
+
|
21 |
+
import os
|
22 |
+
|
23 |
+
import datasets
|
24 |
+
|
25 |
+
|
26 |
+
_CITATION = """\
|
27 |
+
@phdthesis{halabi2016modern,
|
28 |
+
title={Modern standard Arabic phonetics for speech synthesis},
|
29 |
+
author={Halabi, Nawar},
|
30 |
+
year={2016},
|
31 |
+
school={University of Southampton}
|
32 |
+
}
|
33 |
+
"""
|
34 |
+
|
35 |
+
_DESCRIPTION = """\
|
36 |
+
This Speech corpus has been developed as part of PhD work carried out by Nawar Halabi at the University of Southampton.
|
37 |
+
The corpus was recorded in south Levantine Arabic
|
38 |
+
(Damascian accent) using a professional studio. Synthesized speech as an output using this corpus has produced a high quality, natural voice.
|
39 |
+
Note that in order to limit the required storage for preparing this dataset, the audio
|
40 |
+
is stored in the .flac format and is not converted to a float32 array. To convert, the audio
|
41 |
+
file to a float32 array, please make use of the `.map()` function as follows:
|
42 |
+
|
43 |
+
|
44 |
+
```python
|
45 |
+
import soundfile as sf
|
46 |
+
|
47 |
+
def map_to_array(batch):
|
48 |
+
speech_array, _ = sf.read(batch["file"])
|
49 |
+
batch["speech"] = speech_array
|
50 |
+
return batch
|
51 |
+
|
52 |
+
dataset = dataset.map(map_to_array, remove_columns=["file"])
|
53 |
+
```
|
54 |
+
"""
|
55 |
+
|
56 |
+
_URL = "http://en.arabicspeechcorpus.com/arabic-speech-corpus.zip"
|
57 |
+
|
58 |
+
|
59 |
+
class ArabicSpeechCorpusConfig(datasets.BuilderConfig):
|
60 |
+
"""BuilderConfig for ArabicSpeechCorpu."""
|
61 |
+
|
62 |
+
def __init__(self, **kwargs):
|
63 |
+
"""
|
64 |
+
Args:
|
65 |
+
data_dir: `string`, the path to the folder containing the files in the
|
66 |
+
downloaded .tar
|
67 |
+
citation: `string`, citation for the data set
|
68 |
+
url: `string`, url for information about the data set
|
69 |
+
**kwargs: keyword arguments forwarded to super.
|
70 |
+
"""
|
71 |
+
super(ArabicSpeechCorpusConfig, self).__init__(version=datasets.Version("2.1.0", ""), **kwargs)
|
72 |
+
|
73 |
+
|
74 |
+
class ArabicSpeechCorpus(datasets.GeneratorBasedBuilder):
|
75 |
+
"""ArabicSpeechCorpus dataset."""
|
76 |
+
|
77 |
+
BUILDER_CONFIGS = [
|
78 |
+
ArabicSpeechCorpusConfig(name="clean", description="'Clean' speech."),
|
79 |
+
]
|
80 |
+
|
81 |
+
def _info(self):
|
82 |
+
return datasets.DatasetInfo(
|
83 |
+
description=_DESCRIPTION,
|
84 |
+
features=datasets.Features(
|
85 |
+
{
|
86 |
+
"file": datasets.Value("string"),
|
87 |
+
"text": datasets.Value("string"),
|
88 |
+
"phonetic": datasets.Value("string"),
|
89 |
+
"orthographic": datasets.Value("string"),
|
90 |
+
}
|
91 |
+
),
|
92 |
+
supervised_keys=("file", "text"),
|
93 |
+
homepage=_URL,
|
94 |
+
citation=_CITATION,
|
95 |
+
)
|
96 |
+
|
97 |
+
def _split_generators(self, dl_manager):
|
98 |
+
archive_path = dl_manager.download_and_extract(_URL)
|
99 |
+
archive_path = os.path.join(archive_path, "arabic-speech-corpus")
|
100 |
+
return [
|
101 |
+
datasets.SplitGenerator(name="train", gen_kwargs={"archive_path": archive_path}),
|
102 |
+
datasets.SplitGenerator(name="test", gen_kwargs={"archive_path": os.path.join(archive_path, "test set")}),
|
103 |
+
]
|
104 |
+
|
105 |
+
def _generate_examples(self, archive_path):
|
106 |
+
"""Generate examples from a Librispeech archive_path."""
|
107 |
+
lab_dir = os.path.join(archive_path, "lab")
|
108 |
+
wav_dir = os.path.join(archive_path, "wav")
|
109 |
+
if "test set" in archive_path:
|
110 |
+
phonetic_path = os.path.join(archive_path, "phonetic-transcript.txt")
|
111 |
+
else:
|
112 |
+
phonetic_path = os.path.join(archive_path, "phonetic-transcipt.txt")
|
113 |
+
|
114 |
+
orthographic_path = os.path.join(archive_path, "orthographic-transcript.txt")
|
115 |
+
|
116 |
+
phonetics = {}
|
117 |
+
orthographics = {}
|
118 |
+
|
119 |
+
with open(phonetic_path, "r", encoding="utf-8") as f:
|
120 |
+
for line in f:
|
121 |
+
wav_file, phonetic = line.split('"')[1::2]
|
122 |
+
phonetics[wav_file] = phonetic
|
123 |
+
|
124 |
+
with open(orthographic_path, "r", encoding="utf-8") as f:
|
125 |
+
for line in f:
|
126 |
+
wav_file, orthographic = line.split('"')[1::2]
|
127 |
+
orthographics[wav_file] = orthographic
|
128 |
+
|
129 |
+
for _id, lab_name in enumerate(sorted(os.listdir(lab_dir))):
|
130 |
+
lab_path = os.path.join(lab_dir, lab_name)
|
131 |
+
lab_text = open(lab_path, "r", encoding="utf-8").read()
|
132 |
+
|
133 |
+
wav_name = lab_name[:-4] + ".wav"
|
134 |
+
wav_path = os.path.join(wav_dir, wav_name)
|
135 |
+
|
136 |
+
example = {
|
137 |
+
"file": wav_path,
|
138 |
+
"text": lab_text,
|
139 |
+
"phonetic": phonetics[wav_name],
|
140 |
+
"orthographic": orthographics[wav_name],
|
141 |
+
}
|
142 |
+
yield str(_id), example
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"clean": {"description": "This Speech corpus has been developed as part of PhD work carried out by Nawar Halabi at the University of Southampton.\nThe corpus was recorded in south Levantine Arabic\n(Damascian accent) using a professional studio. Synthesized speech as an output using this corpus has produced a high quality, natural voice.\nNote that in order to limit the required storage for preparing this dataset, the audio\nis stored in the .flac format and is not converted to a float32 array. To convert, the audio\nfile to a float32 array, please make use of the `.map()` function as follows:\n\n\n```python\nimport soundfile as sf\n\ndef map_to_array(batch):\n speech_array, _ = sf.read(batch[\"file\"])\n batch[\"speech\"] = speech_array\n return batch\n\ndataset = dataset.map(map_to_array, remove_columns=[\"file\"])\n```\n", "citation": "@phdthesis{halabi2016modern,\n title={Modern standard Arabic phonetics for speech synthesis},\n author={Halabi, Nawar},\n year={2016},\n school={University of Southampton}\n}\n", "homepage": "http://en.arabicspeechcorpus.com/arabic-speech-corpus.zip", "license": "", "features": {"file": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "phonetic": {"dtype": "string", "id": null, "_type": "Value"}, "orthographic": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "file", "output": "text"}, "builder_name": "arabic_speech_corpus", "config_name": "clean", "version": {"version_str": "2.1.0", "description": "", "major": 2, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1002365, "num_examples": 1813, "dataset_name": "arabic_speech_corpus"}, "test": {"name": "test", "num_bytes": 65784, "num_examples": 100, "dataset_name": "arabic_speech_corpus"}}, "download_checksums": {"http://en.arabicspeechcorpus.com/arabic-speech-corpus.zip": {"num_bytes": 1192302846, "checksum": "1df85219370fb1ebe8bfc46aa886265586411d04e7c1caa5a5b9847b3ad5f9de"}}, "download_size": 1192302846, "post_processing_size": null, "dataset_size": 1068149, "size_in_bytes": 1193370995}}
|
dummy/clean/2.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d2ac90a7a32ca47673962afd9e4c8eaaadb18a2a164784d630aae683b9f32013
|
3 |
+
size 1229059
|