Datasets:
MoulSot-Tokens-v1
Discrete speech tokens for Moroccan Darija. 101 hours of transcribed speech, encoded to a single-codebook neural audio codec and paired with text, ready to train a text-to-speech model that predicts tokens directly.
| Size | |
|---|---|
| Source audio (16 kHz parquet) | ~12 GB |
| This dataset (tokens, text) | 153 MB |
Same speech, ~78× smaller. At the codec level that is 256 kbps of PCM reduced to 0.8 kbps — a 320× reduction in bits — since in this case, one second of audio becomes 50 integers instead of 16,000 samples.
That is the point of this release. Darija TTS work previously required downloading tens of gigabytes of audio and running a GPU encode pass before any modelling could start. This dataset removes that step.
The goal of this dataset is to accelerate R&D in using text to speech models on Moroccan Darija (Tamazight on the radar as well). This release provides an ultra small dataset, with over 100 hours of speech data tokenized.
At a glance
| Clips | 79,641 |
| Duration | 101.6 hours (mean 4.6 s, median 3.5 s) |
| Tokens | 18.3 million @ 50 tokens/second |
| Codec | neuphonic/neucodec — FSQ, 1 codebook, 65,536 codes |
| Source | atlasia/MoulSot-Full, config 100-gt-2.5 |
| Transcripts | Generated with Gemini 2.5 Pro (see source dataset card) |
| License | Apache-2.0 |
Single codebook. Most neural codecs use residual vector quantisation with 8–12 codebooks, so a second of audio becomes 600 tokens. NeuCodec uses one FSQ codebook at 50 Hz, which means a sequence model sees 50 tokens per second.
Usage
from datasets import load_dataset
ds = load_dataset("Tilas/MoulSot-Tokens-v1", split="train")
row = ds[0]
row["text"] # الترانسكريبت بالدارجة
row["tokens"] # [1243, 8421, 9901, ...] ints in [0, 65536)
len(row["tokens"]) / 50 # duration in seconds
Listening to a sample
import torch
from neucodec import NeuCodec
model = NeuCodec.from_pretrained("neuphonic/neucodec").eval()
codes = torch.tensor(row["tokens"]).reshape(1, 1, -1)
audio = model.decode_code(codes) # 24 kHz — the decoder has no 16 kHz path
Schema
| Field | Type | Notes |
|---|---|---|
audio_id |
string | Matches the source dataset |
text |
string | Darija transcript |
channel |
string | Source YouTube channel |
duration |
float | Seconds |
n_samples |
int | Raw 16 kHz sample count; n_samples // 320 == len(tokens) |
tokens |
list[int] | FSQ codes in [0, 65536), 50 per second |
encoder |
string | neucodec-v1 |
sampling_rate |
int | 16000 (encoder input rate) |
Reproducing the tokens
Token IDs depend on exactly what the encoder receives. Two details are easy to get wrong and both silently change the output — we measured each:
Do not pre-pad the audio. NeuCodec pads internally. Appending your own padding first shifts the semantic encoder's per-utterance feature normalisation: 10 ms of added silence changed 85.3% of tokens.
Do not batch clips of different lengths. encode_code applies no attention
mask, so padding a short clip up to a longer batch-mate perturbed 86% of its
frames, starting at frame 0. Batch only clips with identical sample counts, or
use batch size 1.
model = NeuCodec.from_pretrained("neuphonic/neucodec").eval()
# wav: 1-D float32 @ 16 kHz, raw length, mono, NO padding
codes = model.encode_code(wav.reshape(1, 1, -1))
Frame count is exactly n_samples // 320. This held for 79,857 / 79,857
clips in the full encode — the n_samples column lets you verify any row without
touching audio.
Quality audit
3,090 clips were decoded and compared against their originals. Full methodology and per-clip data are in the project repository.
Speaker identity is retained
ECAPA cosine similarity between original and reconstruction averages 0.709 on clips ≥2 s.
ECAPA's scale. Speaker verification with ECAPA-TDNN separates same-speaker from different-speaker around 0.25–0.35 cosine. Different speakers land near 0.1–0.3. Two genuine recordings of the same speaker, from different sessions, typically land around 0.5–0.7 — microphone, room and session variation move the embedding that much on their own. A score of 0.709 sits in same-speaker territory
English gives the same number. Running the identical pipeline on LibriSpeech returns 0.723. If 0.709 signalled damage to Darija, English would not land in the same place. Both languages sit together, which means the number reflects what 0.8 kbps can carry, not how the codec handles Darija.
Intelligibility: seen data vs unseen data
| Metric | Original | Reconstruction |
|---|---|---|
| WER | 9.57 | 37.83 |
| CER | 3.71 | 18.18 |
A 28-point gap looks like severe damage. It is not — it is a seen/unseen effect.
The ASR used (atlasia/moulsot.v0.3)
was fine-tuned on this same audio. Every original in this audit is a clip the
model already trained on, so 9.57 WER is a memorisation score The model's own published performance on data it has not
seen is 38.99 WER.
A reconstruction is acoustically different from its original, the same speech, resynthesised, so it no longer matches what the model memorised. From the ASR's point of view it is unseen data. It scores 37.83: the published baseline.
Basically The codec moved the audio from seen to unseen, and on unseen audio the model performs exactly as documented.
Native Darija speakers confirmed reconstructions are clearly intelligible. A clean measurement on held-out audio is in progress.
Signal quality
Mel-L1 averages 0.513. SI-SDR averages −8.94 dB, which sounds alarming and is not: NeuCodec decodes through a Vocos head that reconstructs perceptually and does not preserve phase, so waveform-domain metrics report large errors on audio that is perceptually intact.
Limitations
channel is not a speaker label. One channel can host many speakers and one
speaker can appear across channels. Do not use it for multi-speaker conditioning
without diarisation.
Transcripts are machine-generated Expect transcription noise.
Provenance
Audio and transcripts come from
atlasia/MoulSot-Full,
released under Apache-2.0.
Tokens were produced with the full neuphonic/neucodec encoder, using the entire encode path (Wav2Vec2-BERT semantic encoder,
BigCodec acoustic encoder, FSQ quantiser) frozen. No weights were modified, so
these tokens reproduce against the upstream checkpoint.
Citation
@misc{moulcodec2026,
title = {MoulSot-Tokens-v1: Discrete Speech Tokens for Moroccan Darija},
author = {Aymen Echchalim},
year = {2026},
url = {https://huggingface.co/datasets/Tilas/MoulSot-Tokens-v1}
}
Built as open infrastructure for the Moroccan AI community. Issues and contributions welcome.
- Downloads last month
- 38
