Integrated speech signal processor based on spectrum analysis and LMS algorithm

. Spectrum analysis is often used for sound signal analysis. LMS algorithm is an improved algorithm of steepest descent algorithm, which is an optimized extension of wiener filter theory and is often used in audio noise reduction. In this paper, we display the time-frequency domain image of audio, use spectrum analysis for audio gender recognition, and use LMS algorithm for noise reduction. Experimental results show that the method adopted in this paper has high accuracy for sound discrimination, and can significantly eliminate the environmental noise, which can not only be heard but seen in the frequency domain figure. After our audio enhancement, the speaker's voice can be very clear.


Introduction
As the leading direction of intelligent computer research and the key technology of human-machine voice communication, speech recognition technology has always received extensive attention from the scientific community of various countries.The range of human pitch is about 70～350Hz.Due to the different physiological structure, male and female voices show different auditory characteristics.The pitch frequency of male voice is mostly between 100-200HZ, while female voice is between 200-350HZ.Compared with male voices, the average and standard deviation of the former are about twice that of the latter.The pitch frequencies of different speakers are normally distributed on the logarithmic frequency axis for male and female voices.The average and standard deviation of the pitch frequencies of male voices are 125Hz and 20Hz, respectively.The female voice is about twice that of the male voice.In view of the obvious difference in the pitch frequency of male and female voices, the pitch frequency can be used as the basis for the recognition of male and female voices.We designed a player based on this feature using Matlab.The player can record audio, play audio, display the time domain and frequency domain waveforms of the audio, double the speed of the audio, adjust the volume, and perform male and female voice recognition on the audio.In order to improve the accuracy of the male and female voice recognition technology in noisy environments, we have added a noise reduction function based on the improved LMS algorithm to process the voice signal and display the time domain and frequency domain of the processed audio.
The least mean square algorithm, or LMS algorithm, is an improved algorithm of the steepest descent algorithm.It is an optimized extension of wiener filtering theory using the fast descent method.The algorithm does not need to know the statistical characteristics of the input signal and the expected signal, and the weight coefficient of the "current moment" is obtained by the weight coefficient of the "previous moment" plus a proportional term of a negative mean square error gradient.

Time domain describes the relationship of mathematical functions or physical signals to time.
The frequency domain is a coordinate system used to describe the frequency characteristics of a signal.In electronics, control system engineering, and statistics, frequency domain diagrams show the amount of signal in each given frequency band within a frequency range.Time domain analysis and frequency domain analysis are two observation planes of analog signals.Time domain analysis uses the time axis as the coordinate to express the relationship of the dynamic signal; frequency domain analysis changes the signal to the frequency axis as the coordinate to express.Generally speaking, the time domain representation is more vivid and intuitive, and the frequency domain analysis is more concise, and the analysis of the problem is more profound and convenient.In order to display the sound processing effect more conveniently, we use the Fourier transform function of Matlab to process the signal and display the frequency domain and time domain waveforms of the signal.

LMS algorithm
LMS algorithm is updated point by point.Every time an input signal and error signal are sampled, the filter coefficient will be updated once, so that the error signal E (n) becomes smaller and smaller until it is close enough to 0 to judge that the algorithm has converged.
Initialization must be set up before performing the LMS algorithm.Determine the update step μ and filter order N, and then initialize the filter coefficient, generally initialized to 0, for specific noise, you can first let the algorithm convergence once, the convergence of the filter coefficient set as the initial value, so that you can get better noise reduction effect, finally start the LMS algorithm operation.
Assuming that the filter is of order N, the coefficient is W(N), and the input signal is x(N), the output signal y(N) of the filter should be: Its Wiener solution should be: LMS filter coefficient update formula should be: LMS algorithm is used to iterate, and the appropriate filter weight matrix is obtained.Finally, the original signal can be successfully recovered.

Results
This project adopts MATLAB software for graphic interface design, and finally obtains an App with comprehensive functions.Click the Gender button to identify the Gender of the speaker and display it at the bottom of the screen.
Click the Denoise button on the right for Denoise processing, and the Denoise signal waveform and spectrum will be displayed on the interface.Click the Play button at the bottom right of the interface to play the noise-reduced audio.
To demonstrate, we will test two example audio clips and check the effect.The first audio clip is a three-second speech voice.
The time and frequency domain waveform of the original signal is: The results were fantastic.According to common sense, the frequency of human voice is concentrated in 300-3400Hz.After noise reduction, the spectrum value of the waveform is concentrated between 300-3400Hz, which perfectly conforms to our expectations.In fact, after playing the audio noise reduction, you can hear the obvious noise reduction effect.

Conclusion
This project realizes the recording, playback, and processing of sound signals (LMS algorithm noise reduction processing, volume adjustment, reverse playback, double speed, etc.), and can display waveforms in the time domain and frequency domain, display the fundamental frequency of the sound, and perform men and women.Acoustic recognition.Through the LMS algorithm filtering, the audio tested in the experiment achieves a good noise reduction effect, the environmental noise is greatly reduced, and the human voice becomes very clear.The volume of the human voice can be artificially amplified by changing the amplitude coefficient, although there is also a non-negligible energy loss.Therefore, this paper realizes the extraction and enhancement of human voice, which also makes the judgment result more accurate and the sound processing effect more obvious.

Fig. 3 .
Fig. 3. Integrated audio processor interface.Now the specific functions are described as follows: First press the Start button to Start recording sound, such as recording a human voice in a noisy environment, and real-time signal time domain waveform will be displayed on the interface.

10 A
comparison of the three signals The input signal to the filter The output signal of the filter Error signal ITM Web of Conferences 47, 02035 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224702035After recording, press the Stop button to Stop recording.Click the Play button to Play back, and automatically draw the spectrum of the original signal.Click the Save button to select a local path to Save the recorded audio.

Fig. 4 .Fig. 5 .
Fig. 4. First audio clip original signal.The time and frequency domain waveform of the denoised signal is: