Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

Dataset Card for DODa Moroccan Darija (CosyVoice2 Ready-to-Train)


Dataset Summary

DODa Moroccan Darija (CosyVoice2 Edition) is a curated, standardized, and tokenized speech dataset engineered specifically for fine-tuning CosyVoice2 on Moroccan Arabic (Darija).

While raw audio datasets typically require extensive preprocessing (sample rate normalization, voice activity detection, multi-speaker segmentation, semantic tokenization, speaker embedding extraction, and Kaldi-compliant manifest building), this repository provides an end-to-end prepared dataset. Users can bypass 1โ€“2 hours of high-overhead ONNX feature extraction and launch PyTorch Distributed Data Parallel (DDP) training directly.

Supported Tasks and Leaderboards

  • text-to-speech: Fine-tuning the Autoregressive Language Model (llm.pt) of CosyVoice2 to predict discrete speech tokens from Moroccan Darija text (in both Arabic script and Latin transliteration).
  • audio-to-audio & speaker-identification: Leveraging the extracted 7 speaker profiles and CAMPPlus embeddings for zero-shot speaker adaptation and voice conversion pipelines.

Languages

The dataset contains speech and transcriptions in Moroccan Arabic (Darija - ary / ary-MA). Transcripts are provided in:

  1. Modern Standard Arabic script (Darija Arab): Standard orthography adapted for Darija phonology.
  2. Latin script (Darija Latn): Phonetic transliteration commonly used across digital communications (Arabizi / Moroccan Latin).

Dataset Structure

Data Instances

An example instance in the training set:

{
  "utt": "doda_000042",
  "text": "ูˆุงุด ูƒุงูŠู† ุดูŠ ุญู„ ู„ู‡ุงุฏ ุงู„ู…ุดูƒู„ ูˆู„ุง ู…ุงุฒุงู„ุŸ",
  "audio": "/content/CosyVoice/data/wavs/000042.wav",
  "spk": "F1",
  "embedding": "/content/CosyVoice/data/train/embedding/doda_000042.pt",
  "speech_token": "/content/CosyVoice/data/train/speech_token/doda_000042.pt"
}

Data Fields

  • utt (string): Unique utterance identifier formatted as doda_{index:06d}.
  • text (string): Darija transcription.
  • audio (string): Path to the single-channel 24,000 Hz WAV audio file.
  • spk (string): Speaker identifier (F1, F2, F3, F4, M1, M2, M3).
  • embedding (string): Path to the 192-dimensional CAMPPlus speaker timbre embedding vector (.pt).
  • speech_token (string): Path to the discrete speech tokens extracted via Speech Tokenizer v2 (.pt).

Data Splits

Split Utterances Proportion Number of Speakers Total Duration
Train 12,105 95.0% 7 (F1โ€“F4, M1โ€“M3) ~9.6 Hours
Dev (Evaluation) 638 5.0% 2 (M1, M2) ~0.5 Hours
Total 12,743 100% 7 ~10.1 Hours

Directory Hierarchy & Kaldi Formats

doda-darija-cosyvoice2/
โ”œโ”€โ”€ train/
โ”‚   โ”œโ”€โ”€ wav.scp              # Mapping: <utt_id> <path_to_wav>
โ”‚   โ”œโ”€โ”€ text                 # Mapping: <utt_id> <transcription>
โ”‚   โ”œโ”€โ”€ utt2spk              # Mapping: <utt_id> <speaker_id>
โ”‚   โ”œโ”€โ”€ spk2utt              # Mapping: <speaker_id> <utt_id1> <utt_id2>...
โ”‚   โ”œโ”€โ”€ embedding.scp        # Mapping: <utt_id> <path_to_campplus_embedding.pt>
โ”‚   โ”œโ”€โ”€ speech_token.scp     # Mapping: <utt_id> <path_to_speech_tokens.pt>
โ”‚   โ””โ”€โ”€ parquet/             # Binary Apache Parquet chunks (1,000 utts/chunk)
โ”œโ”€โ”€ dev/
โ”‚   โ”œโ”€โ”€ wav.scp
โ”‚   โ”œโ”€โ”€ text
โ”‚   โ”œโ”€โ”€ utt2spk / spk2utt
โ”‚   โ”œโ”€โ”€ embedding.scp
โ”‚   โ”œโ”€โ”€ speech_token.scp
โ”‚   โ””โ”€โ”€ parquet/
โ”œโ”€โ”€ wavs/                    # 12,743 resampled 24kHz .wav files (000000.wav - 012742.wav)
โ”œโ”€โ”€ train.data.list          # Formatted pointer to all training Parquet files
โ””โ”€โ”€ dev.data.list            # Formatted pointer to all validation Parquet files

Technical Processing Pipeline

                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ”‚   Raw DODa Dataset (AtlasIA)         โ”‚
                     โ”‚   12,743 samples (Variable SR, FLAC) โ”‚
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                        โ”‚
                         PyTorch / torchaudio Pipeline
                                        โ–ผ
                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ”‚   Native 24,000 Hz Mono Audio        โ”‚
                     โ”‚   Saved to data/wavs/*.wav           โ”‚
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                        โ”‚
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
            โ–ผ                                                       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Speaker Disambiguation (7 Actors)   โ”‚  โ”‚  Feature Extraction (ONNX Engine)    โ”‚
โ”‚  - F1, F2, F3, F4 (Female)           โ”‚  โ”‚  - CAMPPlus (Timbre Vectors)         โ”‚
โ”‚  - M1, M2, M3 (Male)                 โ”‚  โ”‚  - Speech Tokenizer v2 (Tokens)      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚                                         โ”‚
                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                        โ”‚
                                        โ–ผ
                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ”‚   Parquet Sharding (1k utts/chunk)   โ”‚
                     โ”‚   Kaldi Compliant SCP Manifests      โ”‚
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Acoustic Normalization (24 kHz)

CosyVoice2's neural vocoder operates natively at 24,000 Hz. Previous community pipelines downsampled to 22,050 Hz (legacy CosyVoice 1.0 standard), introducing high-frequency phase cancellation and token misalignment. Every clip was converted to 32-bit float, downmixed to mono, and resampled to 24 kHz using high-fidelity Kaiser sinc-interpolation filters.

Multi-Speaker Partitioning (7 Voice Actors)

The original DODa recording sessions were performed by 7 distinct native Moroccan speakers across sequential record blocks. Treating all samples as a single speaker prevents the model from separating linguistic phonemes from personal pitch and formant structure. The samples are mapped to their respective speaker indices:

Speaker ID Gender Audio Index Range Assigned Role
F1 Female 000000โ€“000999, 008000โ€“008999 Primary Female Speaker
F2 Female 002000โ€“002730 Female Voice Actor 2
F3 Female 005000โ€“005999 Female Voice Actor 3
F4 Female 007000โ€“007999 Female Voice Actor 4
M1 Male 002731โ€“002800, 004000โ€“004999, 006000โ€“006999, 010000โ€“011999, 012351โ€“012742 Primary Male Speaker
M2 Male 002801โ€“003999, 009000โ€“009999, 012000โ€“012350 Male Voice Actor 2
M3 Male 001000โ€“001999 Male Voice Actor 3

Feature Extraction (CAMPPlus & Speech Tokenizer v2)

  • Acoustic Timbre: Extracted via campplus.onnx, generating a 192-dimensional normalized embedding for each sample.
  • Semantic Units: Extracted via speech_tokenizer_v2.onnx, producing temporal discrete indices mapping the audio into the discrete token space expected by the CosyVoice2 Autoregressive LLM backbone.

Usage & Quickstart

Official Fine-Tuned Model

A production-ready zero-shot Moroccan Darija model trained on this dataset is available at: ๐Ÿ‘‰ Jip7e/habibi-tts-doda-darija (Habibi-TTS / F5-TTS Flow-Matching DiT Architecture).


Direct Training with Habibi-TTS / F5-TTS (Recommended)

To fine-tune Habibi-TTS on this dataset using Flow-Matching Diffusion Transformers:

# 1. Clone F5-TTS repository
git clone https://github.com/SWivid/F5-TTS.git
cd F5-TTS
pip install -e .

# 2. Prepare metadata manifest from train/text and wavs/
python -m f5_tts.train.datasets.prepare_csv_wavs --pretrain metadata.csv data/doda_char

# 3. Launch Dual-GPU PyTorch DDP Fine-Tuning
accelerate launch --multi_gpu --num_processes=2 --mixed_precision fp16 \
  -m f5_tts.train.finetune_cli \
  --exp_name F5TTS_v1_Base \
  --learning_rate 1e-5 \
  --batch_size_type frame --batch_size_per_gpu 3200 \
  --grad_accumulation_steps 6 \
  --epochs 12 \
  --pretrain "SWivid/Habibi-TTS/Specialized/MAR/model_100000.safetensors" \
  --tokenizer custom --tokenizer_path "vocab.txt" \
  --dataset_name doda_char

Direct Training with CosyVoice2

To fine-tune CosyVoice2 on the Parquet speech tokens:

# 1. Clone CosyVoice repository
git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git
cd CosyVoice

# 2. Download Pre-processed Dataset directly
git clone https://huggingface.co/datasets/Jip7e/doda-darija-cosyvoice2 data/

# 3. Download Base Weights
python -c "
from huggingface_hub import snapshot_download
snapshot_download('FunAudioLLM/CosyVoice2-0.5B', local_dir='pretrained_models/CosyVoice2-0.5B')
"

# 4. Launch Autoregressive LLM Fine-Tuning
export PYTHONPATH=.:third_party/Matcha-TTS
torchrun --standalone --nnodes=1 --nproc_per_node=1 \
  cosyvoice/bin/train.py \
    --train_engine torch_ddp \
    --config pretrained_models/CosyVoice2-0.5B/cosyvoice2.yaml \
    --train_data data/train.data.list \
    --cv_data data/dev.data.list \
    --qwen_pretrain_path pretrained_models/CosyVoice2-0.5B/CosyVoice-BlankEN \
    --model llm \
    --checkpoint pretrained_models/CosyVoice2-0.5B/llm.pt \
    --model_dir exp/darija/llm \
    --tensorboard_dir tensorboard/darija/llm \
    --num_workers 2 --prefetch 50 --pin_memory --use_amp

Zero-Shot Darija Inference (Habibi-TTS / F5-TTS)

import soundfile as sf
from huggingface_hub import hf_hub_download
from f5_tts.infer.utils_infer import load_model, load_vocoder, preprocess_ref_audio_text, infer_process
from f5_tts.model import DiT

# 1. Load fine-tuned Habibi-TTS Moroccan Model
ckpt = hf_hub_download(repo_id="Jip7e/habibi-tts-doda-darija", filename="model_last.pt")
vocab = hf_hub_download(repo_id="Jip7e/habibi-tts-doda-darija", filename="vocab.txt")

cfg = dict(dim=1024, depth=22, heads=16, ff_mult=2, text_dim=512, conv_layers=4)
model = load_model(DiT, cfg, ckpt, vocab_file=vocab)
vocoder = load_vocoder("vocos")

# 2. Zero-shot voice cloning (3-5s prompt)
ref_audio = "data/wavs/000000.wav"
ref_text = "ูˆุงุด ูƒุงูŠู† ุดูŠ ุฌุฏูŠุฏ ุงู„ูŠูˆู…"
target_text = "ุงู„ุณู„ุงู… ุนู„ูŠูƒู…ุŒ ูƒูŠ ุฏุงูŠุฑ ุงู„ูŠูˆู…ุŸ ูƒู„ุดูŠ ุจุฎูŠุฑ ุงู„ุญู…ุฏ ู„ู„ู‡ุŒ ูƒู†ุชู…ู†ู‰ ุชูƒูˆู† ุจุฃู„ู ุฎูŠุฑ."

ra, rt = preprocess_ref_audio_text(ref_audio, ref_text)
wav, sr, _ = infer_process(ra, rt, target_text, model, vocoder, speed=0.9, nfe_step=64, cfg_strength=1.8)
sf.write("darija_habibi_output.wav", wav, sr)
print("Generated: darija_habibi_output.wav")

Zero-Shot Darija Inference (CosyVoice2)

Once fine-tuned, generate zero-shot Moroccan Darija speech:

import os
import torchaudio
from cosyvoice.cli.cosyvoice import CosyVoice2

# Load fine-tuned checkpoint
cosyvoice = CosyVoice2('pretrained_models/CosyVoice2-0.5B', fp16=True)

# Prompt audio reference (from DODa female speaker F1)
prompt_speech_16k = 'data/wavs/000000.wav'
prompt_text = "ูˆุงุด ูƒุงูŠู† ุดูŠ ุฌุฏูŠุฏ ุงู„ูŠูˆู…"

# Target Darija text to synthesize
target_text = "ุงู„ุณู„ุงู… ุนู„ูŠูƒู…ุŒ ูƒูŠ ุฏุงูŠุฑ ุงู„ูŠูˆู…ุŸ ูƒู„ุดูŠ ุจุฎูŠุฑ ุงู„ุญู…ุฏ ู„ู„ู‡ุŒ ูƒู†ุชู…ู†ู‰ ุชูƒูˆู† ุจุฃู„ู ุฎูŠุฑ."

# Generate speech
for i, output in enumerate(cosyvoice.inference_zero_shot(target_text, prompt_text, prompt_speech_16k, stream=False)):
    torchaudio.save(f"darija_output_{i}.wav", output['tts_speech'], cosyvoice.sample_rate)
    print(f"Generated: darija_output_{i}.wav")

Dataset Creation

Curation Rationale

State-of-the-art TTS models such as CosyVoice2, F5-TTS, and Voicecraft have achieved near-human voice synthesis in English and Mandarin, but suffer severe phonetic degradation and unnatural prosody when prompted in non-standardized Arabic dialects. Moroccan Darija presents unique acoustic challenges due to heavy consonant clustering, distinct vowel reductions, and frequent code-switching with French. This dataset was constructed to provide a benchmark for open-source Maghrebi speech synthesis.

Source Data

  • AtlasIA DODa Corpus: 12,743 studio-recorded clips designed for conversational Moroccan speech.
  • Preprocessing Scripts: Developed using torchaudio, soundfile, onnxruntime, and datasets.

Personal and Sensitive Information

All audio was recorded by consenting contributors for the DODa project under open research licenses. No personally identifiable information (PII), biometric IDs, or private data are contained in the transcripts.


Considerations for Using the Data

Social Impact of Dataset

Enables the creation of localized conversational AI assistants, voice navigation, accessibility screen readers, and automated dubbing tools accessible to over 35 million native Moroccan Darija speakers.

Discussion of Biases

  • Acoustic Environment: Studio-recorded with low background noise. Additional noise augmentation is recommended if fine-tuning for noisy real-world telephony/microphone environments.
  • Gender Balance: Balanced across 4 female and 3 male speaker profiles.

Other Known Limitations

  • The dataset is primarily read speech; conversational interjections and overlapping speech are limited.

Additional Information

Dataset Curators

Packaged and curated by Jip7e with contributions from the Moroccan AI developer community.

Licensing Information

This dataset is distributed under the Creative Commons Attribution 4.0 International (CC-BY-4.0) license, adhering to the original license of the underlying DODa Audio Dataset.

Citation Information

@dataset{doda_darija_cosyvoice2_2026,
  author       = {Jip7e},
  title        = {DODa Moroccan Darija Dataset for CosyVoice2},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/Jip7e/doda-darija-cosyvoice2}}
}

@dataset{atlasia_doda_2024,
  author       = {AtlasIA},
  title        = {DODa: The Open Moroccan Darija Audio Dataset},
  year         = {2024},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/atlasia/DODa-audio-dataset}}
}

@article{cosyvoice2_2024,
  title        = {CosyVoice 2: Scalable Streaming Speech Synthesis with Large Language Models},
  author       = {Zhihao Du and Qian Chen and Shiliang Zhang and et al.},
  journal      = {arXiv preprint arXiv:2412.10117},
  year         = {2024}
}
Downloads last month
94

Models trained or fine-tuned on Jip7e/doda-darija-cosyvoice2

Paper for Jip7e/doda-darija-cosyvoice2