Traditional Culture Encyclopedia - Traditional stories - Audio data calculation

Audio data calculation

Data volume (bytes per second) = (sampling frequency (Hz)* sampling bits) * number of channels) /8 The quality of sound processing by a sound card can be measured by three basic parameters, namely sampling frequency, sampling bits and number of channels.

Sampling frequency refers to the number of sampling times per unit time. The greater the sampling frequency, the smaller the interval between sampling points, and the more realistic the digitized sound, but the larger the corresponding data volume. Sound cards generally provide different sampling frequencies such as 1 1.025kHz, 22.05kHz, 44. 1kHz.

The general method to obtain audio data is to sample (quantize) the audio voltage at a fixed time interval and store the result at a certain resolution (for example, each sample of CDDA is 16 bits or 2 bytes).

Sampling interval can have different standards, such as CDDA using 44 100 times per second; DVD is used 48,000 or 96,000 times per second. Therefore, sampling rate, resolution and number of channels (for example, stereo is 2 channels) are key parameters of audio file format.

Extended data

The essence of computer recording is to convert analog sound signals into digital signals. On the contrary, when playing, the digital signal is restored to analog sound signal for output.

The bits of the acquisition card refer to the binary digits of the digital sound signal used by the acquisition card when collecting and playing sound files. The number of bits of the acquisition card objectively reflects the accuracy of the description of the input sound signal by the digital sound signal. Eight bits represent the power of 2-256, and 16 bits represent the power of 2-64K 16.

The lossy file format is based on the model of acoustic psychology, which deletes sounds that are difficult or impossible for human beings to hear, for example, a high-volume sound followed by a low-volume sound. MP3 belongs to this kind of file.

The compression ratio of lossless audio formats (such as FLAC) is about 2: 1, and there is no loss of data/quality during decompression, and the data generated by decompression is exactly the same as the uncompressed data. If you need to ensure the original quality of music, you should choose lossless audio codec. For example, with the free FLAC lossless audio codec, you can store the music equivalent to 20 CDs on a DVD-R disc.

Lossy compression is widely used, but rarely used in professional fields. Lossy compression has a large compression ratio and provides relatively good sound quality.

Baidu Encyclopedia-Audio Sampling