Real sound files you can hear, and whose size you can calculate to the exact byte.
The idea
Every sound below is a real file, stored as a WAV. A WAV stores every
sample with no compression, plus a 44-byte header at the front: the metadata that
records the sample rate, the bit depth and the length. That header is always 44 bytes.
Work out the file size in bytes with the formula, before you look.
Download the file with the link under the player (or the player's ⋮ menu, then Download).
Find the saved file. On Windows, right-click it and choose Properties: the Size line shows the exact number of bytes.
Open Check your answer and compare all three numbers.
Use headphones if the room is busy.
The tune: sample rate
Ode to Joy, 6 seconds, 16 bits per sample every time. Only the sample rate changes. Listen from the top down: the notes lose their brightness, and at 4,000 Hz some of them come out wrong, because the wave is not being measured often enough to follow it.
44,100 Hz (CD quality)
44,100 samples per second · 16 bits per sample · 6 seconds Header: 44 bytes
Check your answer
44,100 × 6 × 16 ÷ 8 = 529,200 bytes of samples
+ 44 bytes of header = 529,244 bytes
Ode to Joy, Ludwig van Beethoven (1824, public domain). Synthesised in code for this page by Mr Rawson.
The tune: bit depth
Now the sample rate stays at 22,050 Hz and the bit depth changes. Fewer bits means fewer heights to round each sample to. Listen for a hiss that grows as the notes fade away.
16-bit · 65,536 levels
22,050 samples per second · 16 bits per sample · 6 seconds Header: 44 bytes
Check your answer
22,050 × 6 × 16 ÷ 8 = 264,600 bytes of samples
+ 44 bytes of header = 264,644 bytes
Ode to Joy, Ludwig van Beethoven (1824, public domain). Synthesised in code for this page by Mr Rawson.
A voice: sample rate
The same sentence, 4 seconds, 16 bits per sample. Speech stays understandable a long way down, which is why phone calls use a low sample rate, but listen to how the s sounds disappear.
22,050 Hz
22,050 samples per second · 16 bits per sample · 4 seconds Header: 44 bytes
Check your answer
22,050 × 4 × 16 ÷ 8 = 176,400 bytes of samples
+ 44 bytes of header = 176,444 bytes
Voice: speaker 76 of the VCTK corpus, Centre for Speech Technology Research, University of Edinburgh, used under CC BY 4.0. Spoken by the open-source Piper text-to-speech on Mr Rawson's computer.
A voice: bit depth
The same sentence at 22,050 Hz, with the bit depth changing.
16-bit · 65,536 levels
22,050 samples per second · 16 bits per sample · 4 seconds Header: 44 bytes
Check your answer
22,050 × 4 × 16 ÷ 8 = 176,400 bytes of samples
+ 44 bytes of header = 176,444 bytes
Voice: speaker 76 of the VCTK corpus, Centre for Speech Technology Research, University of Edinburgh, used under CC BY 4.0. Spoken by the open-source Piper text-to-speech on Mr Rawson's computer.