With the rapid development of Internet, Internet voice communications applications become increasingly popular.Comparing with traditional telephone, IP telephone has been widely used because of its advantages of high utilization ratio of network bandwidth, low talking cost and multiple bearing services. IP telephone network is different from the traditional one for its packing the voice into IP packets and sending them to the end through IP address. Thus, it causes some problems such as time-delay, jitter and echo. To eliminate these influences, the speech signals should be preprocessed, and it can greatly improve the system performance under the condition of outside environment interference and the speech quality.Practical voice preprocess system mainly includes noise reduction system, echo control system, voice activity detection module and automatic gain control module and so on. The automatic gain control module can make signal transmission level stable.Through the process of signal gain control,it can adjust level variation according to input signal level and specified output level,and can make no influence to transmission signal, and make sure that the intelligibility of controlled speech will not fluctuate.The main research content of this thesis is automatic gain control module in the voice preprocess system.The focuses are VAD-based AGC algorithm and energy comparison-based AGC algorithm, and the main work is to implement the AGC algorithm used in Speex speech code algorithm on the DSP chip, and then apply it to the telephone terminal in VoIP system. In this thesis, the 24-bit AR1688 chip is used. The fixed-point digital signal processor chip has the advantages of practical application because of the little power consumption, inexpensive price and shorter operation time than the float-point one, and it is more suitable for realtime voice transmission application and large scale production, so the fixed-point DSP chip is adopted. The implementation in this thesis is in two steps, first make the floating point to fixed-point conversion in C with optimization. Then translate the C to DSP assembly codes. After the AGC algorithm passing the testing sequence, the next work is the optimization of the AGC algorithm using the hardware features and instruction characteristics of AR1688 chip, in order to reduce the complexity of algorithm and adapt the requirements of processor. Eventually, we successfully achieved the requirements of automatic gain control on equipment of which the core element is AR1688 chip. |