afrilang / README.md
mimba's picture
Update README.md
9b63278 verified
metadata
language:
  - nnh
  - plt
  - fub
license: cc-by-nc-sa-4.0
size_categories:
  - 10K<n<100K
task_categories:
  - automatic-speech-recognition
pretty_name: Multilingual African ASR (Ngiemboon & More)
tags:
  - audio
  - speech-recognition
  - low-resource-languages
  - bible
  - aeneas
configs:
  - config_name: fub_cm
    data_files:
      - split: train
        path: fub_cm/train-*
      - split: test
        path: fub_cm/test-*
  - config_name: nnh_cm
    default: true
    data_files:
      - split: train
        path: nnh_cm/train-*
      - split: test
        path: nnh_cm/test-*
  - config_name: plt_mdg
    data_files:
      - split: train
        path: plt_mdg/train-*
      - split: test
        path: plt_mdg/test-*
dataset_info:
  - config_name: fub_cm
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 16000
            num_channels: 1
      - name: text
        dtype: string
      - name: audio_file_name
        dtype: string
    splits:
      - name: train
        num_bytes: 8510848284
        num_examples: 39064
      - name: test
        num_bytes: 2407713127
        num_examples: 11343
    download_size: 6495729090
    dataset_size: 10918561411
  - config_name: nnh_cm
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 16000
            num_channels: 1
      - name: text
        dtype: string
      - name: audio_file_name
        dtype: string
    splits:
      - name: train
        num_bytes: 2319359059
        num_examples: 10841
      - name: test
        num_bytes: 494019097
        num_examples: 2163
    download_size: 2448461231
    dataset_size: 2813378156
  - config_name: plt_mdg
    features:
      - name: audio
        dtype:
          audio:
            sampling_rate: 16000
            num_channels: 1
      - name: text
        dtype: string
      - name: audio_file_name
        dtype: string
    splits:
      - name: train
        num_bytes: 7405654024
        num_examples: 27052
      - name: test
        num_bytes: 1724912714
        num_examples: 6801
    download_size: 6025600373
    dataset_size: 9130566738

AFRILANG

Dataset Card for Multilingual African ASR

Dataset Description

  • Primary Language: Ngiemboon (ISO 639-3: nnh)
  • Secondary Languages: Planned support for Bulu, Morisyen, Malagasy and other African languages.
  • Audio Format: WAV (16kHz, Mono)
  • Task: Automatic Speech Recognition (ASR).

Dataset Summary

This dataset is a curated collection of aligned audio-text pairs for African languages, starting with Ngiemboon. The data originates from high-quality recordings of the New Testament, offering excellent phonetic coverage for these low-resource languages. The processing pipeline utilizes Apache Airflow for orchestration and Aeneas for forced alignment. This allows the conversion of long-form chapters into clean, short segments (99% of the audio files are less than 30 seconds long.) perfectly optimized for fine-tuning state-of-the-art models like OpenAI Whisper or Meta MMS.


Usage: How to Load for Fine-Tuning

This dataset is compatible with the Hugging Face datasets library. It includes an Audio feature that decodes sound files on the fly.

1. Installation

pip install datasets[audio] transformers

2. Load the dataset

from datasets import load_dataset, Audio

# Load the dataset
dataset = load_dataset("mimba/afrilang", "nnh_cm", split={"train": "train[:10%]", "test": "test[:2%]" })

# Essential: Resample to 16kHz for Whisper or MMS models
dataset = dataset.cast_column("audio", Audio(sampling_rate=16000))

# Access the first sample
example = dataset[0]
print(example["text"])
print(example["audio"]["array"])

3. Preparation for Training

The following snippet shows how to process the data for a Whisper model:

def prepare_dataset(batch):
    audio = batch["audio"]
    # Extract features from the audio array
    batch["input_features"] = processor(audio["array"], sampling_rate=audio["sampling_rate"]).input_features[0]
    # Tokenize the target text
    batch["labels"] = processor(text=batch["text"]).input_ids
    return batch

dataset = dataset.map(prepare_dataset)

Dataset Creation & Methodology

1. Source Data

  • Audio: Studio-quality recordings of the Old or Testament.
  • Text: Digital transcriptions following standard Ngiemboon orthography

2. Automated Pipeline

  1. Orchestration: Apache Airflow manages the sequence of tasks.
  2. Alignment: Aeneas (Forced Alignment) synchronizes text with the original audio chapters.
  3. Segmentation: Audio is automatically sliced based on alignment timestamps using Pydub.
  4. Validation: Checks are performed to ensure every audio segment has its corresponding text and vice-versa.

Future Roadmap: Expanding the Dataset 🌍

We are committed to increasing the digital presence of African languages. Our roadmap includes:

  • Ngiemboon (nnh) Cameroon: Complete and ready for training.
  • Adamawa Fulfulde (fub) Cameroon: Complete and ready for training.
  • Malagasy (plt) Malagasy: Complete and ready for training.
  • Bulu (bum) Cameroon: Currently in the alignment phase.
  • Morisyen (mfe) Mauritius: Data collection ongoing.
  • Community Contributions: Soon, users will be able to submit their own recordings to improve model robustness.

Considerations

Limitations

  • Domain: Currently focused on religious and narrative text. General conversational performance may vary.
  • Acoustics: Clean studio audio. We recommend adding "background noise" augmentation during fine-tuning for real-world applications.

Licensing Information

This dataset is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.

Contact

For questions or contributions, please open a discussion in the "Community" tab of this repository.

BibTeX entry and citation info

@misc{
      title={afrilang: Small Out-of-domain resource for various africain languages}, 
      author={Mimba Ngouana Fofou},
      year={2026},
}
Contact For all questions contact @Mimba.