
Audio Basics Explained

Audio and video basics

1. Introduction
In real life, the sounds we hear are continuous in time, and we call this type of signal . Analog signals must be digitized before they can be used in a computer.
At present, we need to rely on audio files for audio playback on the computer. The process of generating audio files is the process of combining sound information and generated digital signals. The sound that the human ear can hear has the lowest frequency of 20Hz to the highest frequency of 20KHZ, so the maximum bandwidth of the audio file format is 20KHZ. . According to the theory, only when the sampling frequency is greater than twice the highest frequency of the sound signal, the sound represented by the digital signal can be restored to the original sound, so the sampling frequency of the file audio is generally 40~50KHZ. , such as the most common CD quality sampling rate 44.1KHZ.
2. Audio Basics
Sampling: the wave is infinitely smooth. The sampling process consists of extracting the frequency value from some points of the wave, which consists of digitizing the analog signal. Like shown in the next figure:
insert image description here
blue represents the analog audio signal and red represents the quantized value obtained by sampling
Sample Rate: The number of times the analog signal is sampled per unit of time, expressed in Hertz (Hz). The higher the sample rate, the more realistic and natural the sound restoration will be, and of course, the larger the amount of data. The sampling frequency is generally divided into three levels: 22.05 KHz, 44.1 KHz, and 48 KHz. 8 KHz: the sampling frequency used by phones, is enough for human speech, 22.05 KHz can only achieve the sound quality of FM radio (suitable for medium quality voice and music), 44.1 KHz is the most common sampling rate standard, theoretically quality limit CD sound, 48KHz is more accurate (for the sampling rate above 48KHz, the human ear cannot distinguish it, so it has little use value in the computer).
Quick tip: one
5 kHz sampling rate is as good as people’s speech.
A sample rate of 11 kHz is the minimum standard for reproducing small pieces of sound, a quarter of CD quality.
The 22 kHz sample rate can achieve half the quality of a CD, and most websites now use this sample rate.
44kHz sampling rate is standard CD quality, which can achieve good listening effect.
Resampling: It is mainly divided into upsampling and downsampling. In the sampling process, it is necessary to pay attention to the sampling rate problem. It is not possible to change the size of the sample rate at will. According to the sampling theorem: in the analog/digital signal process During the conversion process, when the sampling frequency is greater than 2 times the highest frequency of the signal, the digital signal after sampling completely retains the information of the original signal. , in practical applications, the sampling frequency is guaranteed to be 5 to 10 times the highest frequency of the signal. The sampling theorem is also known as the Nyquist theorem.
Upsampling: In the sampling process, it is generally divided into upsampling and downsampling, and the basis for the distinction is the comparison of the new sampling rate and the original sampling rate when resampling, if it is greater than the original signal, becomes a Oversampling, if smaller than the original signal, is called undersampling. The essence of upsampling is interpolation or interpolation.
Downsampling: The size of the new sample rate is smaller than the size of the original sample rate.
Methods: When resampling, there are mainly three methods: the nearest neighbor method, the bilinear interpolation method, and the cubic convolution interpolation method. There are also deconvolutions, subpixel convolutions, etc. in convolutional networks.



