open-standards/wai/wai-rs/tests/vectors/int_audio
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science a8bf1c560c wai: the int_codec vector's README, and the statements about what it was trained on
wai-rs/tests/vectors/int_audio/README.md states the vector's provenance (a
signal the export tool generates; no audio input), the seed (1), the
command, the tool versions, and that two runs gave byte-identical files.

research/decode-throughput.md keeps its text (a dated record) and gains a
dated correction: the int_audio vector it timed was trained on, and coded,
a third-party recording, and has been replaced by one trained and coded on a
generated signal of the same shape. wai_decode_bench's doc comment now lists
int_audio among the vectors trained on generated content.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 10:09:20 -04:00
..
audio.json wai: int_codec model and vectors regenerated from the generated signal 2026-10-07 09:43:20 -04:00
audio_bitstream.json wai: int_codec model and vectors regenerated from the generated signal 2026-10-07 09:43:20 -04:00
audio_bitstream.wia1 wai: int_codec model and vectors regenerated from the generated signal 2026-10-07 09:43:20 -04:00
audio_model.bin wai: int_codec model and vectors regenerated from the generated signal 2026-10-07 09:43:20 -04:00
README.md wai: the int_codec vector's README, and the statements about what it was trained on 2026-10-07 10:09:20 -04:00
sha256.json wai: int_codec model and vectors regenerated from the generated signal 2026-10-07 09:43:20 -04:00

wai.audio.int_codec — the committed vector

Provenance. Generated here. The signal the codec is trained on, and the clip the vector codes, are written by tools/wai_int_audio_export.py itself from a seed: 16 kHz, mono, signed 16-bit, a sequence of tones, chirps, noise bursts and speech-like formant sweeps. The tool reads no audio file. Apache-2.0, like the rest of the repository.

  • audio_model.bin — the integer synthesis (WAM1): 16 latent channels, four transposed convolutions with integer IGDN between them.
  • audio_bitstream.json — the export's JSON form: the latent (16 × 512), its per-channel tables and its rANS stream. audio_bitstream.wia1 is the same bitstream as a WIA1 payload, converted by wai_int_payload_vectors gen.
  • audio.json — the decoded PCM's FNV-1a, its sample count (8192) and its rate.
  • sha256.json — the decoded PCM's SHA-256 (SPEC §7 Digests), written by WAI_WRITE_SHA256_SIDECARS=1 cargo test --test int_kernels_vectors int_audio_clip after the decode has reproduced audio.json's FNV-1a.

How it was made. From wai/, with torch 2.14.1, numpy 1.26.4 and CompressAI 1.2.8 on an arm64 host:

python tools/wai_int_audio_export.py <out> --seed 1 --channels 16 --samples 8192 --steps 2500

then audio_model.bin, audio_bitstream.json and audio.json copied from <out>. The seed is 1: stream 0 of the seed is the training signal (8 s), stream 1 the coded clip. Training is seeded from the same seed, with deterministic algorithms and four threads. Two runs gave byte-identical files. A different host or torch build may train to different weights; the committed files are what conformance checks, and their decode is integer and the same everywhere.

The signal alone needs only the Python standard library:

python3 tools/wai_int_audio_export.py --signal-only clip.s16 --seed 1 --stream 1 --samples 8192

The site's demo clip is an export of the same tool with the same seed and the command's defaults (32 channels, 32768 samples, 3500 steps).

Checked. tools/wai_audio_provenance_check.py correlates the decoded clip (the staged-delivery case audio_int_codec_1l's stage 0) against the reference recordings the CI host has, and fails above 0.5.