sapc2 / README.md
yangwang825's picture
Add files using upload-large-folder tool
d516af0 verified
|
Raw
History Blame Contribute Delete
2.7 kB
---
license: other
language:
- en
task_categories:
- automatic-speech-recognition
tags:
- dysarthria
- speech-accessibility
pretty_name: SAPC2
---
# SAPC2
Speech Accessibility Project corpus, second release, repackaged for training.
Audio is 16 kHz mono WAV. Speakers have a range of etiologies (Parkinson's
disease, ALS, cerebral palsy, Down syndrome, stroke).
Access is restricted and inherited from the upstream Speech Accessibility
Project data use agreement. Do not redistribute.
## Layout
One tar per contributor, rather than one archive per split, so a run can fetch
a subset and an interrupted download resumes cheaply.
```
Train/<contributor-id>.tar 1,157 archives
Dev/<contributor-id>.tar 155 archives
manifest/ upstream CSV / TXT / reference transcripts
sapc2_train.jsonl 336,075 utterances
sapc2_dev.jsonl 47,929 utterances
```
Each archive expands to `<contributor-id>/`, holding that speaker's WAV files
plus a `<contributor-id>.json` metadata file:
```
<contributor-id>/
├── <contributor-id>.json
├── <contributor-id>_101_4308.wav
└── ...
```
## Download and extract
```bash
pip install "huggingface_hub[hf_transfer]"
export HF_HUB_ENABLE_HF_TRANSFER=1
CORPUS=/path/to/corpus/sapc2
hf download dys-asr/sapc2 --repo-type dataset --local-dir "$CORPUS"
for split in Train Dev; do
find "$CORPUS/$split" -maxdepth 1 -name '*.tar' -print0 |
xargs -0 -P 16 -I {} bash -c 'tar -xf "$1" -C "$(dirname "$1")" && rm -f "$1"' _ {}
done
```
To fetch a single speaker instead of the whole corpus:
```bash
hf download dys-asr/sapc2 Dev/0a71bb2c-5579-468f-3729-08dc13d38337.tar \
--repo-type dataset --local-dir "$CORPUS"
```
## Manifests
Each JSONL line is one utterance:
```json
{"audio": "/abs/path/sapc2/Train/<id>/<id>_1131_4218.wav", "text": "...", "duration": 8.59, "metadata": {...}}
```
`audio` holds **absolute paths from the machine that generated the manifest**.
Rewrite the prefix to your own corpus root before training:
```bash
OLD=/scratch/u6sn/yangw.u6sn/corpus/audio/sapc2
python - "$OLD" "$CORPUS" <<'PY'
import json, sys
old, new = sys.argv[1], sys.argv[2]
for name in ("sapc2_train.jsonl", "sapc2_dev.jsonl"):
with open(name) as src:
rows = [json.loads(line) for line in src]
for row in rows:
row["audio"] = row["audio"].replace(old, new, 1)
with open(name, "w") as dst:
for row in rows:
dst.write(json.dumps(row) + "\n")
PY
```
Then confirm every file resolved before starting a long job:
```bash
python -m ataxia.cli validate-manifest sapc2_train.jsonl sapc2_dev.jsonl \
--check-audio --audio-check-workers 96
```