In this article
Specify the written subtype and inspect the round trip instead of inferring it from NumPy dtype.
The generated-data scenario
A generator adds a faint synthetic acoustic component to a floating waveform and saves a WAV file with default settings. Its manifest describes a floating target because the in-memory array used a floating dtype. The actual file can use an integer subtype, changing representable values during export. The investigation asks which signal reached the student after encoding rather than which numeric type existed in generator memory.
The generation mechanism
SoundFile documents that the data-array type does not choose the written-file subtype. Audio is converted to the selected subtype, and the documented default for WAV is PCM_16. File representation and input dtype are therefore separate choices. A later read into a floating array cannot by itself establish that the earlier artifact preserved all floating values before the read conversion.
Define the dataset contract
Define input amplitude convention, intended stored subtype, channel layout, sample rate and allowed round-trip differences. Distinguish an intentional quantized training target from a claim of preserving the original floating signal. Keep the pre-encoding reference when evaluating faint components or residuals. A filename extension and a decoded array dtype are insufficient provenance for the actual numerical transformation applied during storage.
A step-by-step protocol
Prepare a disposable waveform with representative amplitudes and a deliberately small diagnostic component. Save using the real export defaults and the explicitly intended subtype as separate controls. Inspect file metadata, reopen through the student loader and compare samples with the retained reference under the declared tolerance. Check whether the diagnostic component remains represented instead of concluding from listening alone.
Evidence required for acceptance
Acceptance requires recorded subtype, actual file metadata and justified sample-difference evidence after the complete round trip. Preserve clipping or normalization policies if the exporter applies them. Confirm that a later format conversion did not change the representation again. The absence of a write error demonstrates a completed operation, not retention of every synthetic signal detail needed by the chosen training objective.
Failure cases and limits
Integer audio storage can be entirely appropriate; this review does not claim floating storage always improves learned quality or that every faint signal is important. The tolerance depends on the task and declared representation. No acoustic measurement is supplied here. The protocol exposes export quantization as part of dataset construction, keeping intentional storage choices separate from unsupported claims of lossless target preservation.
Primary references and related reading
Specify the written subtype and inspect the round trip instead of inferring it from NumPy dtype. SoundFile array dtype versus written audio subtype; SoundFile write conversion and explicit subtype API.
The proposed investigation of soundfile array dtype exported waveform subtype is a proposed dataset-contract review; no production dataset was generated or evaluated. Related reading: RNNoise floating-point input: PCM amplitude scale is part of the interface; Audio resampling for datasets: keep timestamps aligned when sample counts change.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.