CodexValidationTiny_20260531 / build_parquet.py
Slenser0's picture
upload build_parquet.py
303c6c4 verified
"""Build the dataset's parquet shards under `data/test-*.parquet`.
The output schema MUST match the canonical schema (PLAN.md §1.2):
Features({
"path": Value("string"),
"audio": Audio(sampling_rate=16000),
"label": ClassLabel(names=["bonafide", "spoof"]),
"notes": Value("string"),
})
`notes` is a JSON string and MUST contain a unique `utterance_id`. Audio MUST
be 16 kHz mono. Resample at build time.
After building, validate with:
speech-spoof-bench validate-dataset <this-dir> --skip-submissions
"""
from __future__ import annotations
def main() -> None:
# After writing data/test-*.parquet, ship the fast-path labels file:
# from speech_spoof_bench import labels
# labels.emit_labels(Path(__file__).resolve().parent)
# This lets reproduce/nightly fetch one small file instead of streaming
# every shard. See docs/developing/new-dataset.md.
raise NotImplementedError("Implement parquet build for this dataset.")
if __name__ == "__main__":
main()