--- dataset_info: features: - name: audio dtype: audio - name: transcription dtype: string splits: - name: train num_bytes: 11189910118.05 num_examples: 50715 - name: validation num_bytes: 385055065.35 num_examples: 2199 download_size: 11017987865 dataset_size: 11574965183.4 configs: - config_name: default data_files: - split: train path: data/train-* - split: validation path: data/validation-* tags: - masrispeech - egyptian-arabic - arabic - speech - audio - asr - automatic-speech-recognition - speech-to-text - stt - dialectal-arabic - egypt - native-speakers - spoken-arabic - egyptian-dialect - arabic-dialect - audio-dataset - language-resources - low-resource-language - phonetics - speech-corpus - voice - transcription - linguistic-data - machine-learning - natural-language-processing - nlp - huggingface - open-dataset - labeled-data task_categories: - automatic-speech-recognition - audio-classification - audio-to-audio language: - arz - ar pretty_name: MasriSpeech-Full --- # 🗣️ MasriSpeech-Full: Large-Scale Egyptian Arabic Speech Corpus [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Dataset-blue)](https://huggingface.co/collections/NightPrince/masrispeech-dataset-68594e59e46fd12c723f1544)

MasriSpeech-Full Dataset Overview

## 🌍 Overview **MasriSpeech-Full** is the largest open-source Egyptian Arabic (Masri) speech dataset, designed to advance Automatic Speech Recognition (ASR) and speech processing research for dialectal Arabic. This corpus contains 52,914 professionally annotated audio samples totaling over 3,100 hours of natural Egyptian Arabic speech. > 💡 **Key Features**: > - High-quality 16kHz speech recordings > - Natural conversational Egyptian Arabic > - Speaker-balanced train/validation splits > - Comprehensive linguistic coverage > - Apache 2.0 license ## 📊 Dataset Summary | Feature | Value | |--------------------------|---------------------------| | **Total Samples** | 52,914 | | **Train Samples** | 50,715 | | **Validation Samples** | 2,199 | | **Sampling Rate** | 16 kHz | | **Total Duration** | ~3,100 hours | | **Languages** | Egyptian Arabic (arz), Arabic (ar) | | **Format** | Parquet | | **Dataset Size** | 11.57 GB | | **Download Size** | 10.26 GB | | **Annotations** | Transcripts | ## 🧱 Dataset Structure The dataset follows Hugging Face `datasets` format with two splits: ```python DatasetDict({ train: Dataset({ features: ['audio', 'transcription'], num_rows: 50715 }) validation: Dataset({ features: ['audio', 'transcription'], num_rows: 2199 }) }) ``` ## Data Fields - **audio**: Audio feature object containing: - `Array`: Raw speech waveform (1D float array) - `Path`: Relative audio path - `Sampling_rate`: 16,000 Hz - **transcription**: string with Egyptian Arabic transcription ## 📈 Data Statistics ### Split Distribution | Split | Examples | Size (GB) | Avg. Words | Empty | Non-Arabic | |--------------|----------|-----------|------------|-------|------------| | **Train** | 50,715 | 10.42 | 13.34 | 6 | 13 | | **Validation**| 2,199 | 0.36 | 9.60 | 0 | 1 | ### Linguistic Analysis | Feature | Train Set | Validation Set | |-----------------|---------------------------|----------------------------| | **Top Words** | في (20,250), و (16,977) | في (519), أنا (412) | | **Top Bigrams** | (إن, أنا) (1,305) | (شاء, الله) (63) | | **Vocab Size** | 38,451 | 7,892 | | **Unique Speakers** | 1,142 | 98 |

Train Distribution Validation Distribution
Word Count Distributions (Left: Train, Right: Validation)

## How to Use ? 🧑‍💻 ### Loading with Hugging Face ```python from datasets import load_dataset import IPython.display as ipd # Load dataset (streaming recommended for large datasets) ds = load_dataset('NightPrince/MasriSpeech-Full', split='train', streaming=True) # Get first sample sample = next(iter(ds)) print(f"Transcript: {sample['transcription']}") # Play audio ipd.Audio(sample['audio']['array'], rate=sample['audio']['sampling_rate']) ``` ### Preprocessing the Dataset ```python from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC from datasets import load_dataset import torch model_name = "facebook/wav2vec2-base-960h" # Spanish example # or "facebook/wav2vec2-large-xlsr-53-en" for English processor = Wav2Vec2Processor.from_pretrained(model_name) model = Wav2Vec2ForCTC.from_pretrained(model_name) def prepare_dataset(batch): audio = batch["audio"] # Extract audio array and sampling rate audio_array = audio["array"] sampling_rate = audio["sampling_rate"] # Process audio using feature extractor only inputs = processor.feature_extractor( audio_array, sampling_rate=sampling_rate, return_tensors="pt" ) batch["input_values"] = inputs.input_values[0] # Process transcription using tokenizer only labels = processor.tokenizer( batch["transcription"], return_tensors="pt" ) batch["labels"] = labels["input_ids"][0] return batch # Apply preprocessing to the entire dataset print("Processing entire dataset...") dataset = ds.map(prepare_dataset, remove_columns=["audio", "transcription"]) ``` ### Fine-Tuning an ASR Model ```python from transformers import AutoModelForCTC, TrainingArguments, Trainer # Load pre-trained model model = AutoModelForCTC.from_pretrained("facebook/wav2vec2-base-960h") # Define training arguments training_args = TrainingArguments( output_dir="./results", evaluation_strategy="epoch", learning_rate=2e-5, per_device_train_batch_size=16, num_train_epochs=3, save_steps=10, save_total_limit=2, logging_dir="./logs", logging_steps=10, ) # Initialize Trainer trainer = Trainer( model=model, args=training_args, train_dataset=dataset, eval_dataset=dataset, ) # Train the model trainer.train() ``` ### Evaluating the Model ```python # Evaluate the model eval_results = trainer.evaluate() print("Evaluation Results:", eval_results) ``` ### Exporting the Model ```python # Save the fine-tuned model model.save_pretrained("./fine_tuned_model") processor.save_pretrained("./fine_tuned_model") ``` ## 📜 Citation If you use **MasriSpeech-Full** in your research or work, please cite it as follows: ``` @dataset{masrispeech_full, author = {Yahya Muhammad Alnwsany}, title = {MasriSpeech-Full: Large-Scale Egyptian Arabic Speech Corpus}, year = {2025}, publisher = {Hugging Face}, url = {https://huggingface.co/collections/NightPrince/masrispeech-dataset-68594e59e46fd12c723f1544} } ``` ## 📜 Licensing 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). ## 🙌 Acknowledgments We would like to thank the following for their contributions and support: - **Annotators**: For their meticulous work in creating high-quality transcriptions. - **Hugging Face**: For providing tools and hosting the dataset. - **Open-Source Community**: For their continuous support and feedback. ## 💡 Use Cases **MasriSpeech-Full** can be used in various applications, including: - Automatic Speech Recognition (ASR) for Egyptian Arabic. - Dialectal Arabic linguistic research. - Speech synthesis and voice cloning. - Training and benchmarking machine learning models for low-resource languages. ## 🤝 Contributing We welcome contributions to improve **MasriSpeech-Full**. If you have suggestions, find issues, or want to add new features, please: 1. Fork the repository. 2. Create a new branch for your changes. 3. Submit a pull request with a detailed description of your changes. For questions or feedback, feel free to contact the maintainer. ## 📝 Changelog ### [1.0.0] - 2025-08-02 - Initial release of **MasriSpeech-Full**. - Includes 52,914 audio samples with transcriptions. - Train/validation splits provided. - Dataset hosted on Hugging Face.