Creation of Real and fake Swahili voices
# Swahili-Deepfake-dataset
A multi-corpus, multi-generator Swahili audio deepfake detection dataset and
construction pipeline.
Rather than recording a new corpus from scratch, this project aggregates
existing public Swahili speech corpora (e.g. Mozilla Common Voice, FLEURS),
selects a phoneme-balanced and speaker-diverse subset, generates synthetic
("deepfake") counterparts with multiple TTS/voice-cloning systems, and
produces a labeled real/fake dataset with speaker-independent splits for
training and benchmarking detection models.
See `docs/METHODOLOGY.md` for the full methodology and
`docs/PAPER_OUTLINE.md` for the paper this dataset
supports.
## Repository structure
```
swahili_deepfake_dataset/ Core pipeline logic (no heavy ML deps required)
phonemes.py Swahili grapheme-phoneme tokenizer + frequency counting
selection.py Greedy phoneme-coverage + speaker-diversity selection
manifest.py Real/fake labeling + speaker-independent train/val/test splits
audio_preprocess.py Audio standardization (16 kHz mono WAV) and quality filtering
deepfake_gen.py Pluggable interface for TTS/voice-cloning backends
scripts/ CLI entry points
select_subset.py Corpus metadata -> phoneme-balanced subset
extract_selected_clips.py Corpus archive + selected subset -> just those clips (skips full extraction)
preprocess_audio.py Raw audio -> standardized, filtered WAV
generate_deepfakes.py Selected subset -> synthetic speech (per generator)
build_manifest.py Real + fake -> final labeled dataset manifest
sync_drive.py Sync data/ to/from Google Drive (Colab session persistence)
tests/ Unit tests for the core pipeline logic
docs/ Methodology and paper outline
notebooks/ Kaggle/Jupyter notebooks (e.g. corpus download)
data/ Not committed to git (see .gitignore); lo …