Sampling, quantification, coding


Free Download Mp4Gain
picture

Sampling, quantification, coding

Sampling

The computational problem of voice sampling is to convert analog data (smooth and continuous data), such as raw speech and music, into digital data (discontinuous and discontinuous data) that can be processed by a computer.

Bit Depth

In a familiar example, music recorded on a CD (compact disc) is analog data converted to digital data.
Aim to solve speech sampling computational problems, to understand the term “sampling”, “quantization”, “encoding”. Let’s use a general CD as an example to explain the meaning of each term.

What is “sampling”?
It consists of collecting data from analog signals by dividing them at regular time intervals. This time interval is called the “sample rate” and is expressed in units of Hz (Hertz). Once per second is 1 Hz.
The sampling frequency of the CD is 44.1 kHz (kilohertz) and the data is collected 44.1 x 1000 = 44100 times per second.
What is “quantification”?
It consists of converting the data collected by sampling into numerical values. The magnitude of this number is called the “quantization bit number”.
The number of quantization bits on a CD is 16 bits (16 digits in binary).
What is “encode”?
It consists of putting the numerical value obtained by quantification in a specific format. The “PCM (Pulse Code Modulation)” format encodes 16-bit quantized data in its original form.
Once you understand the meaning of the terms, as an example of the calculation, the amount of data when digitizing music with a 5-minute playback time at 44.1 kHz sample rate, 16-bit quantization bit number, PCM format, stereo (2ch), Let’s find it in units of M-byte (megabyte). Here, 1 Mbyte = 1,000,000 bytes. The way of thinking when calculating is shown below.

It is just a multiplication, but understand the method of calculation by associating it with the meaning of the term.

Five minutes of playing time is 5 x 60 = 300 seconds.
Since the sample rate is 44.1 kHz, the data is collected 44.1 x 1000 = 44100 times per second.
Therefore, the data is collected 300 x 44,100 = 13230,000 times in 5 minutes.
The number of 16-bit quantization bits is 8 bits = 1 byte, so 16 bits = 2 bytes.
Since it is in PCM format, this 2-byte data is converted to the code as is.
Since a data collection is a 2-byte code, 13230,000 data collections have a capacity of 2 x 13230000 = 26460000 bytes.
Since it is stereo (2 channels), there are two data of the same capacity (one for the left channel and one for the right channel), and the total capacity is 26460000 x 2 = 52920000 bytes.
Since 1 Mbyte = 1,000,000 bytes, 5,292,000 bytes = 52.92 Mbytes.
PR
The problem of finding the amount of data
Q26 (Spring 2012)
If a 60-minute (monaural) audio signal is digitized using the PCM method with a 44.1 kHz sample rate and 16-bit quantization bit rate, how many Mbytes of data are there? Here, the data is assumed to be uncompressed.
A 80 B 160 C 320 D 640

Let us now solve the above problem of speech sampling. The first is a problem that can be solved with the same procedure as in the calculation example shown above. The way of thinking when calculating is shown below.

M (mega) can be 1000 x 1000 = 1000000 or 1024 x 1024 = 1048576, which is not shown in this number. Here, it is calculated as 1,000 x 1,000 = 1,000,000.

The audio signal for 60 minutes is 60 x 60 = 3600 seconds.
Since the sample rate (sample rate) is 44.1 kHz, the data is collected 44.1 x 1000 = 44100 times per second.
Therefore, 3600 x 44100 = 158760000 times of data collection in 60 minutes.
The number of quantization bits is 16 bits, which is 8 bits = 1 byte, so 16 bits = 2 bytes.
Since it is in PCM format, this 2-byte data is converted to the code as is.
Since a data collection is a 2-byte code, data collections 158760000 have a capacity of 2 x 158760000 = 317520000 bytes.
Being monaural (not stereo), the total capacity is 317520000 bytes.
Given that 1 Mbyte = 1,000,000 bytes, 317520000 = 317.52 Mbytes.
Since the question says “how many Mbytes?”, The correct answer is 320 Mbytes, which is close to 317.52 Mbytes.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Author: R. Arias

R. Arias is the author of this article and has extensive experience for more than 30 years as a recording engineer and audio specialist, as well as more than 20 years of experience creating algorithms related to audio and video. Linkedin