Sound waves are analogue, meaning they are continuously changing. Any data that is stored on a computer needs to be digital: a series of binary numbers.
An analogue to digital converter (ADC) is used in a microphone to convert the analogue sound wave into a digital stream of binary numbers.
To do this, the amplitude (height) of the sound wave is sampled (measured) at regular intervals. These values are then rounded and then stored in binary.
The sample rate of an audio file is the number of samples every second.
We measure this in Hertz (Hz) or Kilohertz (kHz).
1Hz means one sample per second, and 1kHz means 1000 samples every second.
A typical sample rate is around 44.1kHz (44,100 samples per second).
The sample resolution of an audio file is the number of bits used to store each sample.
You can work out the file size by using the formula:
file size (in bits) = sample rate (in Hertz) × sample resolution (in bits) × audio length (in seconds)
You can then work out the file size in bytes by dividing this answer by 8.
What is the file size in bytes of a
2kHz, 16-bit, 15 sec audio file?
file size (in bits) = 2000 Hertz × 16 bits ×
15 seconds = 480,000 bits = 60,000 bytes