Speech and audio compression / decompression technology based on MSP430

introduction

Using a microcontroller (MCU) to implement a voice recorder is relatively simple. Many MCUs use integrated analog-to-digital (A / D) converters. The amplifier provides the captured sound to the amplifier and then feeds it to the analog input of the A / D converter. The recorded sound can be stored in memory such as flash memory or RAM. Press the button to trigger the MCU to play the recorded sound. The principle is to provide the stored data to the digital-to-analog (D / A) converter before Provided to audio power amplifiers.

It is easy to realize this kind of voice recorder using MSP430. The MSP430 microcontroller uses integrated peripherals to implement the on-chip analog signal chain. In addition, MSP430's CPU processing power is very powerful enough to perform the compression of recorded sound.

Compression and decompression algorithms

For example, the easiest way to implement a voice recorder is to store the A / D converter conversion results (such as 12-bit samples) directly in flash memory. Audio data does not use the entire A / D converter range most of the time, that is, redundant data is also stored in flash memory. The compression algorithm can remove this redundant information, thereby reducing the capacity of the stored data.

Adaptive differential pulse code modulation (ADPCM) is this type of compression algorithm. There are various types of ADPCM algorithms, but they all use the quantizer differential encoding and adaptive quantization step step scheme in the quantizer. Before further discussing the IMA ADPCM algorithm used in related codes, we first briefly introduce the differential PCM encoding.

Differential Pulse Code Modulation (DPCM)

DPCM encodes the analog audio input signal by using the difference between the current sample and the previous sample. Figure 1 shows the structure of the DPCM encoder and decoder. In this example, we use the signal estimate Se (n) instead of the previous input to determine the signal difference d (n), thus ensuring that the encoder uses the same information as the decoder. If the encoder uses the last input sample, it will cause a cumulative error of quantization, which makes the reconstructed signal different from the original input signal. By using the signal estimation shown in Figure 1, we can avoid the difference between the reconstructed signal Sr (n) and the original input signal. The reconstructed signal Sr (n) is the input to the predictor, which determines the next signal estimate Se (n + 1).

Signal estimation

Figure 2 shows a short recorded audio stream, and two schematic diagrams are given to compare the difference between analog audio input samples (PCM values) and continuous samples (DPCM values).

Comparison of the difference between analog audio input samples (PCM value) and continuous samples (DPCM value).

PCM values ​​range from 26 to 203, with a total of 177 steps. The encoded DPCM values ​​range from -44 to 46, with a total of 90 steps. Although the quantizer step size is only 1, this DPCM encoding has realized the compression function of the input data. Simply select a larger quantizer step size to further narrow the range of encoded DPCM values.

Disposable Vape Pen

Tobacco control has been a common global concern, while the traditional tobacco industry gradually, new tobacco has become the new strategic layout of tobacco giants. In this context, the emergence of e-cigarettes has further led to the replacement of traditional tobacco. At present, there are already a thousand different types of e-cigarettes, which have undergone several stages of development. The e-cigarette we are introducing today is the CBD pod systewm, a new type of e-cigarette. In this article we will combine the characteristics of the CBD with a brief analysis of it.


·Anti-anxiety

According to scientific studies,CBD can help depressed patients reduce their anxiety. The use of CBD can help maintain endogenous cannabinoids at a reasonable level, making the patient feel good and happy physically, and without any dependence.

·Anti-ageing

CBD is very powerful in anti-ageing. As a non-psychoactive component of the cannabis plant CBD inhibits the glutamate toxic response of cortical neurons and suppresses excessive oxidative stress, helping the body to achieve anti-ageing effects.

·Anti-inflammatory

CBD reduces the free radicals that cause neurodegenerative diseases and reduces swelling through its anti-inflammatory effects. In addition, CBD stimulates appetite and relieves pain.

China Disposble Vape Pen,E-Cigarette Cbd Vaporizer,Best Disposable Cbd Vape Pen,Disposable Cbd Vape

Shenzhen MASON VAP Technology Co., Ltd. , https://www.disposablevapepenfactory.com