DEV Community

zhuyue
zhuyue

Posted on

I may have inadvertently become an audio expert

In order to improve the audio effect of the product, I have done a more in-depth research on audio with my colleagues in recent times.
1) Designed a set of simple automation work for testing the sound as well as the frequency response of hardware circuits, I used the computer's 3.5mm audio interface design, recorded and played back with octave, while automatically analyzing the data to generate reports. When the sound effects of the computer's sound input and output are disabled, the amplitude of the output and input sound signals in the audio range of consistency is very good, write your own program to test test the amplitude of the captured scanning signal as well as THD distortion.

Image description
2) Analyze the frequency response characteristics of the audio circuits of competing products as well as the spectrum of standard audio signals with homemade tools. Analyze and compare to get the difference between the frequency response of our product and that of the competitor.

Image description
3) Use the OCTAVE tool to set the FIR filter, get the tap coefficients of the filter, and write the FIR filter function in C. Running on the CPU platform of ARM A7 with a sampling rate of 16kSa/s, the 120th-order FIR filter is used to realize the EQ effect with the computing time of about 5us for each data, and the occupancy of the CPU is 8%, and according to the obtained in the step 2 The filter is designed according to the frequency response difference obtained in step 2, and the measured tone of the competitor is achieved.

Image description
4) The root cause of crossover sound distortion, including speaker unit distortion, shell distortion and saturation distortion of classD output;
Discuss with the supplier to improve the speaker design, reduce distortion and increase sensitivity, and buy a number of speakers from the market, the actual test frequency response and THD distortion, select the best speaker monomer, and structural engineers to improve the front and rear cavities as well as the design of the outlet holes, to improve the shell of the sound efficiency and reduce distortion;
Select a higher operating voltage class D, reduce the volume is relatively large, class D output signal saturation distortion;

Image description
(5) Design the circuit, write the algorithm, through the cortext M0 processor to realize the half-duplex control of the call;

6) Research webrtc audio processing aec, webrtc audio processing aec3, speex and other open-source AEC algorithms, select the best matlab implementation of the aec algorithm, and step-by-step comparison, according to the algorithm to modify the c++ source code of webrtc aec, and ultimately achieve the following A set of algorithms with cleaner echo cancellation and better double-talk effect.

Image description
7) Research the cause of background noise on the line, isolate the signal ground and power ground of audio sampling , for the input RC low-pass filtering of audio acquisition ADC, at the same time, when guaranteeing the same time constant, reduce the resistor resistance and increase the capacitance value of the capacitor, place the capacitor close to the CPU, which can effectively reduce the background noise of the sound, and on the basis of this, use the ANR algorithm of the webrtc, which siginificantly reduces the Noise.

Top comments (0)