NightPrince commited on
Commit
e724d4d
ยท
verified ยท
1 Parent(s): 8e7ab9b

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +278 -24
README.md CHANGED
@@ -1,24 +1,278 @@
1
- ---
2
- dataset_info:
3
- features:
4
- - name: audio
5
- dtype: audio
6
- - name: transcription
7
- dtype: string
8
- splits:
9
- - name: train
10
- num_bytes: 1110063079.0
11
- num_examples: 5000
12
- - name: validation
13
- num_bytes: 82102316.0
14
- num_examples: 500
15
- download_size: 1138402984
16
- dataset_size: 1192165395.0
17
- configs:
18
- - config_name: default
19
- data_files:
20
- - split: train
21
- path: data/train-*
22
- - split: validation
23
- path: data/validation-*
24
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ features:
4
+ - name: audio
5
+ dtype: audio
6
+ - name: transcription
7
+ dtype: string
8
+ splits:
9
+ - name: train
10
+ num_bytes: 1110063079
11
+ num_examples: 5000
12
+ - name: validation
13
+ num_bytes: 82102316
14
+ num_examples: 500
15
+ download_size: 1138402984
16
+ dataset_size: 1192165395
17
+ configs:
18
+ - config_name: default
19
+ data_files:
20
+ - split: train
21
+ path: data/train-*
22
+ - split: validation
23
+ path: data/validation-*
24
+ tags:
25
+ - masrispeech
26
+ - egyptian-arabic
27
+ - arabic
28
+ - speech
29
+ - audio
30
+ - asr
31
+ - automatic-speech-recognition
32
+ - speech-to-text
33
+ - stt
34
+ - dialectal-arabic
35
+ - egypt
36
+ - native-speakers
37
+ - spoken-arabic
38
+ - egyptian-dialect
39
+ - arabic-dialect
40
+ - audio-dataset
41
+ - language-resources
42
+ - low-resource-language
43
+ - phonetics
44
+ - speech-corpus
45
+ - voice
46
+ - transcription
47
+ - linguistic-data
48
+ - machine-learning
49
+ - natural-language-processing
50
+ - nlp
51
+ - huggingface
52
+ - open-dataset
53
+ - labeled-data
54
+ task_categories:
55
+ - automatic-speech-recognition
56
+ - audio-classification
57
+ - audio-to-audio
58
+ language:
59
+ - arz
60
+ - ar
61
+ pretty_name: MasriSpeech-ASR-Finetuning
62
+ ---
63
+
64
+
65
+ # ๐Ÿ—ฃ๏ธ MasriSpeech-ASR-Finetuning: Egyptian Arabic Speech Fine-Tuning Dataset
66
+
67
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
68
+ [![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Dataset-blue)](https://huggingface.co/collections/NightPrince/masrispeech-dataset-68594e59e46fd12c723f1544)
69
+
70
+ <p align="center">
71
+ <img src="https://photos.fife.usercontent.google.com/pw/AP1GczMrHAd6vsWiDzHtrWwBu_GzNBEpHvGZpDcnahMOt5npvlI-fdt65fuuig=w618-h927-s-no-gm?authuser=0" alt="MasriSpeech-ASR-Finetuning Dataset Overview" width="650">
72
+ </p>
73
+
74
+ ## ๐ŸŒ Overview
75
+ **MasriSpeech-ASR-Finetuning** is a specialized subset of the MasriSpeech dataset, designed for fine-tuning Automatic Speech Recognition (ASR) models for Egyptian Arabic. This dataset contains 5,500 professionally annotated audio samples totaling over 100 hours of natural Egyptian Arabic speech.
76
+
77
+ > ๐Ÿ’ก **Key Features**:
78
+ > - High-quality 16kHz speech recordings
79
+ > - Natural conversational Egyptian Arabic
80
+ > - Speaker-balanced train/validation splits
81
+ > - Comprehensive linguistic coverage
82
+ > - Apache 2.0 license
83
+
84
+ ## ๐Ÿ“Š Dataset Summary
85
+
86
+ | Feature | Value |
87
+ |--------------------------|---------------------------|
88
+ | **Total Samples** | 5,500 |
89
+ | **Train Samples** | 5,000 |
90
+ | **Validation Samples** | 500 |
91
+ | **Sampling Rate** | 16 kHz |
92
+ | **Total Duration** | ~100 hours |
93
+ | **Languages** | Egyptian Arabic (arz), Arabic (ar) |
94
+ | **Format** | Parquet |
95
+ | **Dataset Size** | 1.19 GB |
96
+ | **Download Size** | 1.13 GB |
97
+ | **Annotations** | Transcripts |
98
+
99
+ ## ๐Ÿงฑ Dataset Structure
100
+ The dataset follows Hugging Face `datasets` format with two splits:
101
+
102
+ ```python
103
+ DatasetDict({
104
+ train: Dataset({
105
+ features: ['audio', 'transcription'],
106
+ num_rows: 5000
107
+ })
108
+ validation: Dataset({
109
+ features: ['audio', 'transcription'],
110
+ num_rows: 500
111
+ })
112
+ })
113
+
114
+ ## Data Fields
115
+
116
+ - **audio**: Audio feature object containing:
117
+ - `Array`: Raw speech waveform (1D float array)
118
+ - `Path`: Relative audio path
119
+ - `Sampling_rate`: 16,000 Hz
120
+ - **transcription**: string with Egyptian Arabic transcription
121
+
122
+ ## ๐Ÿ“ˆ Data Statistics
123
+
124
+ ### Split Distribution
125
+
126
+ | Split | Examples | Size (GB) | Avg. Words | Empty | Non-Arabic |
127
+ |--------------|----------|-----------|------------|-------|------------|
128
+ | **Train** | 5,000 | 1.11 | 13.34 | 0 | 0 |
129
+ | **Validation**| 500 | 0.08 | 9.60 | 0 | 0 |
130
+
131
+ ### Linguistic Analysis
132
+
133
+ | Feature | Train Set | Validation Set |
134
+ |-----------------|---------------------------|----------------------------|
135
+ | **Top Words** | ููŠ (2,025), ูˆ (1,698) | ููŠ (52), ุฃู†ุง (41) |
136
+ | **Top Bigrams** | (ุฅู†, ุฃู†ุง) (130) | (ุดุงุก, ุงู„ู„ู‡) (6) |
137
+ | **Vocab Size** | 3,845 | 789 |
138
+ | **Unique Speakers** | 114 | 10 |
139
+
140
+ <p align="center">
141
+ <img src="https://photos.fife.usercontent.google.com/pw/AP1GczNy2HLdi9J2wLQt_m-9Wu713_9uX2k3FsIytd6NxS7C_bAYkPqisRLOLg=w800-h400-s-no-gm?authuser=0" alt="Train Distribution" width="45%">
142
+ <img src="https://photos.fife.usercontent.google.com/pw/AP1GczNPSXQnWjDc7LElNeCff8wmP6-nT59WmTiPREKDhlD6RrUHX8TIC6ocbw=w800-h400-s-no-gm?authuser=0" alt="Validation Distribution" width="45%">
143
+ <br><em>Word Count Distributions (Left: Train, Right: Validation)</em>
144
+ </p>
145
+
146
+
147
+ ## How to Use ? ๐Ÿง‘โ€๐Ÿ’ป
148
+
149
+ ### Loading with Hugging Face
150
+ ```python
151
+ from datasets import load_dataset
152
+ import IPython.display as ipd
153
+
154
+ # Load dataset (streaming recommended for large datasets)
155
+ ds = load_dataset('NightPrince/MasriSpeech-ASR-Finetuning',
156
+ split='train',
157
+ streaming=True)
158
+
159
+ # Get first sample
160
+ sample = next(iter(ds))
161
+ print(f"Transcript: {sample['transcription']}")
162
+
163
+ # Play audio
164
+ ipd.Audio(sample['audio']['array'],
165
+ rate=sample['audio']['sampling_rate'])
166
+ ```
167
+
168
+ ### Preprocessing the Dataset
169
+ ```python
170
+ from transformers import AutoProcessor
171
+
172
+ # Load pre-trained processor
173
+ processor = AutoProcessor.from_pretrained("facebook/wav2vec2-large-xlsr-53")
174
+
175
+ # Preprocessing function
176
+ def prepare_dataset(batch):
177
+ audio = batch["audio"]
178
+ # Process audio
179
+ batch["input_values"] = processor(audio["array"],
180
+ sampling_rate=audio["sampling_rate"],
181
+ return_tensors="pt").input_values[0]
182
+ # Process transcription
183
+ batch["labels"] = processor(text=batch["transcription"]).input_ids
184
+ return batch
185
+
186
+ # Apply preprocessing to the dataset
187
+ dataset = ds.map(prepare_dataset, remove_columns=ds.column_names)
188
+ ```
189
+
190
+ ### Fine-Tuning an ASR Model
191
+ ```python
192
+ from transformers import AutoModelForCTC, TrainingArguments, Trainer
193
+
194
+ # Load pre-trained model
195
+ model = AutoModelForCTC.from_pretrained("facebook/wav2vec2-large-xlsr-53")
196
+
197
+ # Define training arguments
198
+ training_args = TrainingArguments(
199
+ output_dir="./results",
200
+ evaluation_strategy="epoch",
201
+ learning_rate=2e-5,
202
+ per_device_train_batch_size=16,
203
+ num_train_epochs=3,
204
+ save_steps=10,
205
+ save_total_limit=2,
206
+ logging_dir="./logs",
207
+ logging_steps=10,
208
+ )
209
+
210
+ # Initialize Trainer
211
+ trainer = Trainer(
212
+ model=model,
213
+ args=training_args,
214
+ train_dataset=dataset,
215
+ eval_dataset=dataset,
216
+ )
217
+
218
+ # Train the model
219
+ trainer.train()
220
+ ```
221
+
222
+ ### Evaluating the Model
223
+ ```python
224
+ # Evaluate the model
225
+ eval_results = trainer.evaluate()
226
+ print("Evaluation Results:", eval_results)
227
+ ```
228
+
229
+ ### Exporting the Model
230
+ ```python
231
+ # Save the fine-tuned model
232
+ model.save_pretrained("./fine_tuned_model")
233
+ processor.save_pretrained("./fine_tuned_model")
234
+ ```
235
+
236
+ ## ๐Ÿ“œ Citation
237
+ If you use **MasriSpeech-ASR-Finetuning** in your research or work, please cite it as follows:
238
+
239
+ ```
240
+ @dataset{masrispeech_asr_finetuning,
241
+ author = {Yahya Muhammad Alnwsany},
242
+ title = {MasriSpeech-ASR-Finetuning: Egyptian Arabic Speech Fine-Tuning Dataset},
243
+ year = {2025},
244
+ publisher = {Hugging Face},
245
+ url = {https://huggingface.co/collections/NightPrince/masrispeech-dataset-68594e59e46fd12c723f1544}
246
+ }
247
+ ```
248
+
249
+ ## ๐Ÿ“œ Licensing
250
+ This dataset is released under the **Apache 2.0 License**. You are free to use, modify, and distribute the dataset, provided you comply with the terms of the license. For more details, see the [LICENSE](https://opensource.org/licenses/Apache-2.0).
251
+
252
+ ## ๐Ÿ™Œ Acknowledgments
253
+ We would like to thank the following for their contributions and support:
254
+ - **Annotators**: For their meticulous work in creating high-quality transcriptions.
255
+ - **Hugging Face**: For providing tools and hosting the dataset.
256
+ - **Open-Source Community**: For their continuous support and feedback.
257
+
258
+ ## ๐Ÿ’ก Use Cases
259
+ **MasriSpeech-ASR-Finetuning** can be used in various applications, including:
260
+ - Fine-tuning Automatic Speech Recognition (ASR) models for Egyptian Arabic.
261
+ - Dialectal Arabic linguistic research.
262
+ - Speech synthesis and voice cloning.
263
+ - Training and benchmarking machine learning models for low-resource languages.
264
+
265
+ ## ๐Ÿค Contributing
266
+ We welcome contributions to improve **MasriSpeech-ASR-Finetuning**. If you have suggestions, find issues, or want to add new features, please:
267
+ 1. Fork the repository.
268
+ 2. Create a new branch for your changes.
269
+ 3. Submit a pull request with a detailed description of your changes.
270
+
271
+ For questions or feedback, feel free to contact the maintainer.
272
+
273
+ ## ๐Ÿ“ Changelog
274
+ ### [1.0.0] - 2025-08-02
275
+ - Initial release of **MasriSpeech-ASR-Finetuning**.
276
+ - Includes 5,500 audio samples with transcriptions.
277
+ - Train/validation splits provided.
278
+ - Dataset hosted on Hugging Face.