# How standard libraries read WAV files

7 WAV files from loremfile.dev, given to 2 standard-library readers in 11 runtime versions: which read them, which refuse, which differ.

The page: <https://loremfile.dev/compat/wav>.

7 WAV files given to 2 readers in 11 runtime versions. Cells of the ordinary files: reads 70, differs 1, refuses 6, crashes 0.

| File | Manifest says | java/javax.sound.sampled | python/wave | Go (no reader) | Node.js (no reader) | Ruby (no reader) |
|---|---|---|---|---|---|---|
| [`wav/10mb.wav`](https://loremfile.dev/wav/10mb.wav) (10 MB (10,000,000 bytes)) | bit_depth 16, channels 2, duration_ms 56689, sample_rate 44100 | **reads** reports bit_depth 16, channels 2, duration_ms 56689, sample_rate 44100 | **reads** reports bit_depth 16, channels 2, duration_ms 56689, sample_rate 44100 | **no-reader** | **no-reader** | **no-reader** |
| [`wav/sine-440hz-3s-44k-16bit-mono.wav`](https://loremfile.dev/wav/sine-440hz-3s-44k-16bit-mono.wav) (264.6 KB (264,644 bytes)) | bit_depth 16, channels 1, duration_ms 3000, sample_rate 44100 | **reads** reports bit_depth 16, channels 1, duration_ms 3000, sample_rate 44100 | **reads** reports bit_depth 16, channels 1, duration_ms 3000, sample_rate 44100 | **no-reader** | **no-reader** | **no-reader** |
| [`wav/sine-440hz-3s-44k-16bit-stereo.wav`](https://loremfile.dev/wav/sine-440hz-3s-44k-16bit-stereo.wav) (529.2 KB (529,244 bytes)) | bit_depth 16, channels 2, duration_ms 3000, sample_rate 44100 | **reads** reports bit_depth 16, channels 2, duration_ms 3000, sample_rate 44100 | **reads** reports bit_depth 16, channels 2, duration_ms 3000, sample_rate 44100 | **no-reader** | **no-reader** | **no-reader** |
| [`wav/sine-440hz-3s-44k-32bit-float-stereo.wav`](https://loremfile.dev/wav/sine-440hz-3s-44k-32bit-float-stereo.wav) (1.1 MB (1,058,458 bytes)) | bit_depth 32, channels 2, duration_ms 3000, sample_rate 44100 | 8: **differs** reports duration_ms 24000 where the manifest has 3000<br>11 to 27: **reads** reports bit_depth 32, channels 2, duration_ms 3000, sample_rate 44100 | 3.11 to 3.14: **refuses** with wave.Error: unknown format: 3<br>3.15: **reads** reports bit_depth 32, channels 2, duration_ms 3000, sample_rate 44100 | **no-reader** | **no-reader** | **no-reader** |
| [`wav/sine-440hz-3s-44k-8bit-stereo.wav`](https://loremfile.dev/wav/sine-440hz-3s-44k-8bit-stereo.wav) (264.6 KB (264,644 bytes)) | bit_depth 8, channels 2, duration_ms 3000, sample_rate 44100 | **reads** reports bit_depth 8, channels 2, duration_ms 3000, sample_rate 44100 | **reads** reports bit_depth 8, channels 2, duration_ms 3000, sample_rate 44100 | **no-reader** | **no-reader** | **no-reader** |
| [`wav/sine-440hz-3s-48k-24bit-stereo.wav`](https://loremfile.dev/wav/sine-440hz-3s-48k-24bit-stereo.wav) (864.1 KB (864,068 bytes)) | bit_depth 24, channels 2, duration_ms 3000, sample_rate 48000 | 8: **refuses** with javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input file<br>11 to 27: **reads** reports bit_depth 24, channels 2, duration_ms 3000, sample_rate 48000 | 3.11: **refuses** with wave.Error: unknown format: 65534<br>3.12 to 3.15: **reads** reports bit_depth 24, channels 2, duration_ms 3000, sample_rate 48000 | **no-reader** | **no-reader** | **no-reader** |
| [`wav/with-list-chunk-3s.wav`](https://loremfile.dev/wav/with-list-chunk-3s.wav) (529.3 KB (529,294 bytes)) | bit_depth 16, channels 2, duration_ms 3000, sample_rate 44100 | **reads** reports bit_depth 16, channels 2, duration_ms 3000, sample_rate 44100 | **reads** reports bit_depth 16, channels 2, duration_ms 3000, sample_rate 44100 | **no-reader** | **no-reader** | **no-reader** |

Go has no reader for these files. The standard library has no audio file reader.

Node.js has no reader for these files. The standard library has no audio file reader.

Ruby has no reader for these files. The standard library has no audio file reader.

The results as JSON: <https://github.com/kumarprabhashanand/loremfile/blob/main/compat/results/wav.json>.
