Disclosure of Invention
The embodiment of the invention provides an AEC debugging method, an AEC debugging device and a computer readable storage medium, which can effectively solve the problem that the AEC debugging efficiency and accuracy of VOIP equipment in the prior art are not high.
An embodiment of the present invention provides an AEC debugging method, including:
debugging basic parameters of the equipment to be tested; the basic parameters comprise echo path loss and harmonic distortion; the device to be tested comprises acquisition equipment and playing equipment;
manufacturing a duplex scene, and enabling the equipment to be tested to work in the duplex scene;
processing a playing signal and a collected signal in a duplex scene through an AEC linear echo cancellation algorithm and an AEC nonlinear echo cancellation algorithm; the playing signal is generated by the playing device, and the collecting signal is generated by the collecting device;
after the playing signal and the collected signal are processed, the duplex standard is achieved, and parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm are stored;
manufacturing a simplex scene, and performing simplex debugging on the equipment to be tested;
and storing parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm when the simplex debugging result reaches the simplex standard.
As an improvement of the above scheme, the manufacturing of the duplex scene to enable the device under test to work in the duplex scene specifically includes:
and keeping a preset distance between the tester and the microphone, carrying out voice insertion or noise manufacturing, and manufacturing a duplex scene to enable the device to be tested to work in the duplex scene.
As an improvement of the above scheme, the AEC linear echo cancellation algorithm includes delay estimation alignment, MDF filtering, and NLMS algorithm; the linear echo cancellation algorithm parameters comprise convergence speed, convergence time, tailing time, filter divergence threshold, echo leakage threshold, acquisition and playing equipment time delay and clock drift.
As an improvement to the above scheme, the AEC nonlinear echo cancellation algorithm includes an ERL and ERLE algorithm; the AEC nonlinear echo cancellation algorithm parameters comprise an ERL parameter, an ERLE parameter, a harmonic parameter, a residual echo suppression factor, a residual echo attenuation factor and a duplex threshold.
As an improvement of the above scheme, the processing of the playing signal and the collected signal to reach the duplex standard, and the storing of the parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm further comprises:
after the playing signal and the collected signal are processed, inhibiting, missing words and leaking echoes occur, and parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm are adjusted;
and processing the playing signals and the collected signals in the duplex scene through the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm.
As an improvement of the above scheme, the manufacturing a simplex scene, performing simplex debugging on the device to be tested specifically includes:
manufacturing a simplex scene, and enabling the equipment to be tested to work under the simplex scene;
and processing the playing signal and the collected signal in a simplex scene by an AEC linear echo cancellation algorithm and an AEC nonlinear echo cancellation algorithm.
As an improvement of the above scheme, the simplex debugging result reaches the simplex standard, and the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm parameters are stored, specifically including:
if the suppression, word loss and echo leakage do not occur after the playing signal and the collected signal are processed, storing parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm;
and if the played signal and the collected signal are subjected to suppression, word loss and echo leakage after processing, manufacturing a duplex scene again to perform duplex debugging on the equipment to be tested.
Another embodiment of the present invention correspondingly provides an AEC debugging apparatus, including:
a basic debug module to: debugging basic parameters of the equipment to be tested; the basic parameters comprise echo path loss and harmonic distortion; the device to be tested comprises acquisition equipment and playing equipment;
a duplex simulation module to: manufacturing a duplex scene, and enabling the equipment to be tested to work in the duplex scene;
a signal processing module to: processing a playing signal and a collected signal in a duplex scene through an AEC linear echo cancellation algorithm and an AEC nonlinear echo cancellation algorithm; the playing signal is generated by the playing device, and the collecting signal is generated by the collecting device;
a duplex determination module configured to: after the playing signal and the collected signal are processed, the duplex standard is achieved, and parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm are stored;
a simplex simulation module to: manufacturing a simplex scene, and performing simplex debugging on the equipment to be tested;
a simplex judgment module for: and storing parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm when the simplex debugging result reaches the simplex standard.
Another embodiment of the present invention provides a storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the AEC debugging method described in the above embodiment of the present invention.
Compared with the prior art, the AEC debugging method, the AEC debugging device and the storage medium provided by the embodiment of the invention have the advantages that after basic parameter debugging is carried out, duplex effects and parameters are debugged first, and after the duplex effects reach a preset value, the simplex debugging effect is confirmed on the basis. The first round of simplex-duplex tuning can determine most basic parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm, and the second round is part of parameters of the fine tuning algorithm. Therefore, the method can complete the AEC debugging of the VOIP equipment by only debugging one round and at most two rounds, avoids the repeated debugging of the AEC algorithm and can ensure the debugging efficiency and the single-round debugging accuracy.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of an AEC debugging method according to an embodiment of the present invention. The debugging method comprises the following steps:
s10, debugging basic parameters of the equipment to be tested; the basic parameters comprise echo path loss and harmonic distortion; the device to be tested comprises acquisition equipment and playing equipment.
And S11, manufacturing a duplex scene, and enabling the device to be tested to work in the duplex scene.
S12, processing the playing signal and the collected signal in the duplex scene through an AEC linear echo cancellation algorithm and an AEC nonlinear echo cancellation algorithm; the playing signal is generated by the playing device, and the collecting signal is generated by the collecting device.
And S13, processing the playing signal and the collected signal to reach a duplex standard, and storing parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm.
And S14, manufacturing a simplex scene, and performing simplex debugging on the device to be tested.
And S15, storing parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm when the simplex debugging result reaches the simplex standard.
In the embodiment of the invention, the whole AEC debugging process mainly comprises three parts: basic parameter adjustment (S10), duplex mode adjustment (S11-S13), and simplex debugging adjustment (S14-S15).
Referring to fig. 2, the adjustment of the basic parameters is mainly achieved by playing the white noise to debug the ERL and by playing the swept tone to debug the harmonics.
It should be noted that ERL is echo path loss (echo return loss), which represents the path loss of sound from the speaker to the microphone, and depending on the structure, ERL is better and less echo. Typically the loudspeaker and microphone are fixed, the ERL is also fixed, and echo cancellation can use this parameter to construct a model.
Illustratively, the step of debugging the ERL by playing white noise comprises:
s100, the device to be tested plays a white noise signal, the signal is directly played by a loudspeaker without being processed by any algorithm, and the general volume can be set to be-6 dB.
S101, capturing, playing and collecting signals through a tool. In this embodiment, the playing signal refers to an input signal of a speaker, and the collecting signal refers to an output signal of a microphone.
S102, drawing a frequency response curve of the playing signal and the collected signal through a tool, and calculating ERL values of all frequency bands.
S103, judging whether the ERL value of each frequency band reaches the expectation, if so, storing and setting the ERL parameter of the module, otherwise, indicating that the ERL of the equipment does not reach the standard, and analyzing whether the hardware structure or the codec gain parameter setting of the equipment is normal or not and performing rectification and modification.
Specifically, in S102, the ERL value of each frequency band is calculated in a specific calculation manner:
erl (k) ═ espk (k) -emic (k) ═ 0 … FFT _ len/2, where espk (k) and emic (k) are the energy of the k-th band of the playing signal and the collected signal, respectively, and k ranges from 0 to half of the FFT length.
Illustratively, the testing harmonics by playing the swept tone specifically includes:
s104, the device to be tested plays the sweep tone, and the frequency spectrum range of the sweep tone is generally 0 to 16000 Hz.
And S105, drawing a frequency response curve of the playing signal and the collected signal through a tool, and calculating an ERL value of each frequency band.
And S106, drawing a frequency response curve of the acquired signal through a tool, calculating harmonic distortion of each frequency band, and judging the fundamental frequency of the generated harmonic.
S107, judging whether the harmonic distortion reaches the expectation, if so, storing and setting the module harmonic suppression parameters, otherwise, indicating that the harmonic distortion of the equipment does not reach the standard, and analyzing whether the hardware structure or the equipment assembly of the equipment to be tested is normal or not, and performing rectification and modification.
Exemplarily, S11 specifically includes:
and keeping a preset distance between the tester and the microphone, carrying out voice insertion or noise manufacturing, and manufacturing a duplex scene to enable the device to be tested to work in the duplex scene.
Before a duplex scene is manufactured, the acquisition and playing equipment is placed according to the use scene of a product, the distance between the acquisition and playing equipment is in a relatively limited position, namely a relatively close position, and the acquisition and playing equipment can be directly placed on the product which is acquired and played on the same equipment. The device under test then plays a male or female voice test sequence, typically a standard test voice. The local tester then either cuts the phone call or makes noise at a different distance from the microphone, creating a duplex scenario, typically at distances of 0.5m, 1m, 2m, 3m, 4m, etc.
Illustratively, the AEC linear echo cancellation algorithm in S11-S12 includes delay estimation alignment, MDF filtering and NLMS algorithm; the linear echo cancellation algorithm parameters comprise convergence speed, convergence time, tailing time, filter divergence threshold, echo leakage threshold, acquisition and playing equipment time delay and clock drift.
The linear echo cancellation mainly includes time delay estimation alignment, mdf (multiple delay block frequency domain) filter and nlms (normalized Least Mean square) algorithm. The filter will automatically converge.
The convergence speed and the convergence duration are mainly determined by adjusting step length factors, and the larger the step length is, the faster the speed is. The longer the tail time, the better the echo cancellation effect, but the larger the calculation amount. The filter divergence threshold is used for judging whether the filter diverges, if yes, the filter is reset, and algorithm convergence is carried out again. The echo leakage threshold is used for judging whether the echo is leaked in the algorithm starting stage, namely whether the algorithm is converged, and if the echo is smaller than the threshold, the algorithm is converged. And acquiring the time delay of the playing equipment, namely the time delay between the reference signal and the microphone input signal, and determining the initial position of the reference signal. The clock drift compensation is to solve the problem of unstable time delay caused by different acquisition and playing clocks.
Exemplarily, the AEC nonlinear echo cancellation algorithms in S11-S12 include ERL and ERLE algorithms; the AEC nonlinear echo cancellation algorithm parameters comprise an ERL parameter, an ERLE parameter, a harmonic parameter, a residual echo suppression factor, a residual echo attenuation factor and a duplex threshold.
The echoes include linear echoes and nonlinear echoes, which are mainly caused by nonlinear processing of microphone-loudspeaker devices or other nonlinear processing algorithms. After the linear echo cancellation is completed, the nonlinear echo cancellation is followed. Non-Linear echo cancellation (NLP) generally uses a method of ERL and ERLE models or coherence.
The ERL model method is to set ERL and ERLE parameters, which are used to estimate the energy of echo signal after attenuation in normal condition, and also used to judge simplex and duplex: if the echo is smaller than the threshold, judging the echo as simplex and inhibiting the residual small echo, otherwise, judging the echo as duplex, and inhibiting the nonlinear echo according to a normal attenuation model.
The harmonic parameters are used to suppress harmonics, which are caused by too large a resonance when playing sound due to a not well structured structure.
The residual echo suppression factor and the residual echo attenuation factor are used to adjust the estimated ERLE.
The duplex threshold is used for judging whether the signal energy after echo cancellation is larger, and if the signal energy exceeds the threshold, the duplex is judged.
The coherence method is to calculate the cross-power spectral density and coherence factor of the reference signal, the input signal and the residual signal, and suppress the residual echo according to the coherence factor.
Exemplarily, S13 further includes:
after the playing signal and the collected signal are processed, inhibiting, missing words and leaking echoes occur, and parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm are adjusted;
and processing the playing signals and the collected signals in the duplex scene through the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm.
The judgment of the duplex debugging effect is added to ensure that most basic parameters of the AEC algorithm can be determined in the first round of debugging, and only parameter fine tuning is carried out in the second round.
Exemplarily, S14 specifically includes:
and manufacturing a simplex scene, and enabling the device to be tested to work in the simplex scene.
And processing the playing signal and the collected signal in a simplex scene by an AEC linear echo cancellation algorithm and an AEC nonlinear echo cancellation algorithm.
Exemplarily, S15 specifically includes:
and if the suppression, word loss and echo leakage do not occur after the playing signal and the collected signal are processed, storing parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm.
And if the played signal and the collected signal are subjected to suppression, word loss and echo leakage after processing, manufacturing a duplex scene again to perform duplex debugging on the equipment to be tested.
Specifically, the adjusting step of the simplex mode includes:
s140, placing the collecting and playing equipment according to the using scene of the product, wherein the distance between the collecting and playing equipment is at a relatively extreme position, namely a relatively close position, and the collecting and playing equipment can be directly placed for the product collected and played on the same equipment.
S141, the device to be tested plays a male voice or female voice test sequence, and the test sequence is generally standard test voice.
And S142, capturing, playing and collecting the signals and the signals after algorithm processing through a tool, and carrying out effect analysis subsequently.
S150, analyzing the processing effect in the simplex scene to determine whether the echo leakage occurs.
And S151, judging whether the duplex breaking effect reaches the expectation, namely, whether the single work effect is normal at the required distance and no echo is leaked, and then storing the algorithm parameters, otherwise, repeating S150 until the effect meets the requirement.
Compared with the prior art, the AEC debugging method provided by the embodiment of the invention has the advantages that after basic parameter debugging is carried out, the duplex effect and the parameters are debugged first, and after the duplex effect reaches the preset value, the simplex debugging effect is confirmed on the basis. The first round of simplex-duplex tuning can determine most basic parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm, and the second round is part of parameters of the fine tuning algorithm. Therefore, the method can complete the AEC debugging of the VOIP equipment by only debugging one round and at most two rounds, avoids the repeated debugging of the AEC algorithm and can ensure the debugging efficiency and the single-round debugging accuracy.
Referring to fig. 3, another embodiment of the present invention correspondingly provides a schematic structural diagram of an AEC debugging apparatus. The debugging device comprises: a basic debugging module 30, a duplex simulation module 31, a signal processing module 32, a duplex judgment module 33, a simplex simulation module 34 and a simplex judgment module 35.
A basic debug module 30 for: debugging basic parameters of the equipment to be tested; the basic parameters comprise echo path loss and harmonic distortion; the device to be tested comprises acquisition equipment and playing equipment.
A duplex simulation module 31 for: manufacturing a duplex scene, and enabling the equipment to be tested to work in the duplex scene;
a signal processing module 32 for: processing a playing signal and a collected signal in a duplex scene through an AEC linear echo cancellation algorithm and an AEC nonlinear echo cancellation algorithm; the playing signal is generated by the playing device, and the collecting signal is generated by the collecting device;
a duplex determination module 33, configured to: after the playing signal and the collected signal are processed, the duplex standard is achieved, and parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm are stored;
a simplex simulation module 34 for: manufacturing a simplex scene, and performing simplex debugging on the equipment to be tested;
a simplex judgment module 35 configured to: and storing parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm when the simplex debugging result reaches the simplex standard.
The AEC debugging apparatus of this embodiment includes: a processor, a memory, and a computer program, such as an AEC linear echo cancellation program, stored in the memory and executable on the processor. The processor, when executing the computer program, implements the steps in the various AEC debugging method embodiments described above, e.g., S12 shown in fig. 1. Alternatively, the processor implements the functions of the modules in the above device embodiments when executing the computer program, such as the signal processing module 32.
Compared with the prior art, the AEC debugging device provided by the embodiment of the invention firstly debugs the duplex effect and the parameters after the basic parameters are debugged, and confirms the simplex debugging effect on the basis after the duplex effect reaches the preset value. The first round of simplex-duplex tuning can determine most basic parameters of the AEC linear echo cancellation algorithm and the AEC nonlinear echo cancellation algorithm, and the second round is part of parameters of the fine tuning algorithm. Therefore, the method can complete the AEC debugging of the VOIP equipment by only debugging one round and at most two rounds, avoids the repeated debugging of the AEC algorithm and can ensure the debugging efficiency and the single-round debugging accuracy.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the AEC debugging means/terminal device.
The AEC debugging device may be a desktop computer, a notebook, a palm top computer, a cloud server, or other computing device. The AEC debugging means may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of an AEC debugging means and does not constitute a limitation of the AEC debugging means and may comprise more or less components than shown, or some components in combination, or different components, e.g. the AEC debugging means may further comprise input output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, said processor being the control center of said AEC debugging means, the various parts of the whole AEC debugging means being connected with various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor implements the various functions of the AEC debugging means by running or executing the computer programs and/or modules stored in the memory, and calling the data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the AEC debugging device integrated module/unit can be stored in a computer readable storage medium if it is realized in the form of software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of the AEC debugging method embodiments described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
Another embodiment of the present invention provides a storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the AEC debugging method described in the above embodiment of the present invention.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.