# ibibio-tts-lab
Reproducible data preparation and research tooling for an Ibibio (`ibb`)
Common Voice multi-speaker TTS baseline.
## Quick start
```bash
UV_CACHE_DIR=.uv-cache uv sync --python 3.11
UV_CACHE_DIR=.uv-cache uv run python scripts/validate_environment.py
UV_CACHE_DIR=.uv-cache uv run pytest
UV_CACHE_DIR=.uv-cache uv run ruff check .
UV_CACHE_DIR=.uv-cache uv run mypy src scripts
```
The validator checks the supported Python version, FFmpeg tools, free disk
space, and (when present) the Common Voice archive checksum. Run it before
downloading or importing data. A non-zero exit means the environment is not
ready for the next pipeline stage.
## Configuration
Copy `.env.example` to `.env` and fill in real values; `.env` is git-ignored
and must never be committed. `.env.example` must only ever hold placeholders.
- `YOUR_API_KEY` — Mozilla Data Collective API key used to fetch the Common
Voice dataset archive.
- `DATASET_ID` — Common Voice Scripted Speech 26.0 (Ibibio) dataset ID,
`cmqiohial00zgnq07ybhhu7ni`. Leave this at the pinned value; see
`PROTOCOL.md` before changing it.
With `.env` configured, run the pipeline in order (`import_common_voice.py`
downloads the archive itself via the Mozilla Data Collective API, verifies
its checksum against `reports/common_voice_ibb_archive.sha256`, and extracts
it into `data/raw/common_voice_ibb/` — no manual placement needed):
```bash
UV_CACHE_DIR=.uv-cache uv run python scripts/import_common_voice.py
UV_CACHE_DIR=.uv-cache uv run python scripts/audit_audio.py
UV_CACHE_DIR=.uv-cache uv run python scripts/analyse_speakers.py
UV_CACHE_DIR=.uv-cache uv run python scripts/build_manifests.py
```
This produces, in order: an import manifest with every rejection tracked
(`data/interim/.../imported.parquet`), decoded 24 kHz mono PCM16 WAV clips
plus an audio audit (`reports/audio_audit.*`), an anonymous per-speaker
audit (`reports/speaker_audit.*`), and leakage-safe 90/5/5 train/validation/
test manifests with a leak …