Echo cancellation method and device for double-talk performance and storage medium
By using dual filters and dual-talk detection technology in the WebRtc framework, the problem of poor echo cancellation in dual-talk state is solved, achieving more efficient echo suppression and voice quality improvement.
Patent Information
- Application Number
- CN202310298504.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2024-09-24
AI Technical Summary
The existing WebRtc echo cancellation solution has problems with the near-end voice being louder, softer, or intermittent when dealing with dual-talk status, making it difficult to effectively eliminate echo and affecting voice quality.
Based on the original framework of WebRtc, a dual-filter structure is used for echo cancellation, and double-talk detection is added to the non-linear echo cancellation. The echo in the double-talk state is processed through voice frame state judgment and echo suppression methods.
It improves the echo cancellation effect in dual-talk mode, reduces echo leakage and near-end voice misjudgment, and improves the quality and user experience of voice calls.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to an echo cancellation method, device and storage medium with double-talk performance. Background Art
[0002] After years of development, the basic technical route of the existing acoustic echo cancellation (AEC) algorithm has become fixed: first, use adaptive filtering technology to remove most linear echoes; then perform double talk detection through signal processing or artificial intelligence (AI) models; and finally perform nonlinear echo suppression.
[0003] Currently, the echo cancellation solution based on the WebRtc open source framework is the most widely used, because the algorithm has a good effect on suppressing nonlinear echoes; however, WebRtc has obvious deficiencies in handling the double-talk state, and it is easy for the near-end voice to fluctuate or be intermittent. As people's requirements for voice quality are getting higher and higher, the double-talk problem needs to be urgently optimized. Summary of the invention
[0004] The embodiments of the present application provide an echo cancellation method, device and storage medium with double-talk performance, which are used to improve the linear echo cancellation scheme based on the original Webrtc framework, add a dual filter for echo cancellation, add double-talk detection in non-linear echo cancellation, and use an echo suppression method for the double-talk state to eliminate the echo in the double-talk state.
[0005] The first aspect of the present application provides an echo cancellation method with double-talk performance, which may include: obtaining an echo signal to be eliminated; performing echo cancellation on the echo signal to be eliminated through a dual filter to obtain a first signal after echo cancellation; performing voice frame status judgment based on a pre-acquired near-end signal, a far-end signal and the first signal after echo cancellation to obtain a first voice frame status result; performing echo suppression on the first signal after echo cancellation according to the first voice frame status result to obtain a second signal after echo cancellation.
[0006] Optionally, the dual filter includes a foreground filter and a post filter, and the foreground filter and the post filter are connected in parallel; and performing echo cancellation on the echo signal to be cancelled by the dual filter to obtain a first signal after echo cancellation may include:
[0007] When it is detected that the filter coefficients are iteratively updated normally, the weight of the post filter is updated to the foreground filter; the error signal of the foreground filter is superimposed with the error signal of the post filter to obtain the first signal after the echo is eliminated;
[0008] When it is detected that the filter coefficients are not iteratively updated normally, the error signal of the foreground filter is used as the first signal after the echo is eliminated.
[0009] Optionally, the voice frame status judgment based on the pre-acquired near-end signal, the far-end signal and the first signal after echo elimination to obtain a first voice frame status result may include: determining the correlation between the first signal after echo elimination and the near-end signal, and the non-correlation between the near-end signal and the far-end signal; when the correlation and the non-correlation do not meet the echo strength condition and the near-end voice strength condition, the voice frame status judgment is performed based on the pre-acquired leakage coefficient, the filter update flag, the near-end signal, the far-end signal and the first signal after echo elimination to obtain the first voice frame status result.
[0010] Optionally, the root performs voice frame status judgment according to a pre-acquired leakage coefficient, a filter update flag, the near-end signal, the far-end signal, and the first signal after echo cancellation to obtain a first voice frame status result, including:
[0011] Determine whether the leakage coefficient is greater than 2 times the second coefficient threshold, or whether the leakage coefficient is greater than 3 times the previous leakage coefficient;
[0012] If so, end;
[0013] If not, determining whether the correlation is less than a first correlation threshold, or whether the non-correlation is less than a first non-correlation threshold;
[0014] If so, end;
[0015] If not, determine whether the correlation is greater than a second correlation threshold, and whether the non-correlation is greater than a second non-correlation threshold, the second correlation threshold is greater than the first correlation threshold, and the second non-correlation threshold is greater than the first non-correlation threshold;
[0016] If yes, the current voice frame state value is equal to 4, and the process ends;
[0017] If not, determine whether the correlation is greater than a third correlation threshold, or whether the non-correlation is greater than a third non-correlation threshold, the third correlation threshold is greater than the first correlation threshold and less than the second correlation threshold, and the third non-correlation threshold is greater than the first non-correlation threshold and less than the second non-correlation threshold;
[0018] If so, the current voice frame state value is equal to the initial voice frame state value plus 1, and the initial voice state value is 0;
[0019] If not, determining whether the filter update flag is equal to 1;
[0020] If yes, the current voice frame state value is equal to the previous current voice frame state value plus 1, determine whether the leakage coefficient is less than the previous leakage coefficient, or whether the leakage coefficient is less than the second threshold; if yes, the current voice frame state value is equal to the previous current voice frame state value plus 1, end; if no, end;
[0021] If not, determine whether the leakage coefficient is less than the last leakage coefficient, or whether the leakage coefficient is less than the second threshold; if so, the current voice frame state value is equal to the last current voice frame state value plus 1, and end; if not, end;
[0022] Obtain a first voice frame state result according to the current voice frame state value;
[0023] Among them, the voice frame state includes an echo state, a near-end voice state and a double-talk state. When the voice frame state value is 0, it indicates that the voice frame state is the echo state. When the voice frame state value is 4, it indicates that the voice frame state is the near-end voice state. When the voice frame state value is 1-3, it indicates that the voice frame state is the double-talk state.
[0024] Optionally, performing echo suppression on the first signal after echo cancellation according to the first voice frame state result to obtain a second signal after echo cancellation includes:
[0025] Determine whether the current voice frame state value corresponding to the first voice frame state result is equal to 4;
[0026] If so, end;
[0027] If not, determining whether the current voice frame state value corresponding to the first voice frame state result is equal to 0;
[0028] If yes, the suppression coefficient is updated normally to represent the echo cancellation;
[0029] If not, reduce the suppression coefficient, and perform echo suppression on the first signal after echo elimination according to the reduced suppression coefficient to obtain a second signal after echo elimination. The second signal after echo elimination is used to perform voice state judgment to obtain a second voice frame state result. The second voice frame state result is used to perform echo suppression.
[0030] Optionally, the magnitude of reducing the suppression coefficient is proportional to the value of the speech frame state.
[0031] Optionally, the method may further include:
[0032] Get the new filter update flag and leakage coefficient, and add 1 to the counter;
[0033] In the case where the new filter update flag is equal to the filter update flag, the last filter update flag is equal to the new filter update flag;
[0034] In the case where the new filter update flag is not equal to the filter update flag, judging whether the new filter update flag is equal to the last filter update flag; in the case where the new filter update flag is equal to the last filter update flag, the filter update flag is equal to the new filter update flag, and the last filter update flag is equal to the new filter update flag; in the case where the new filter update flag is not equal to the last filter update flag, the last filter update flag is equal to the new filter update flag;
[0035] When the leakage coefficient is greater than the first coefficient threshold and less than the second coefficient threshold, the leakage coefficient sum=historical leakage coefficient mean*(counter-1)+the leakage coefficient, and the current leakage coefficient mean=leakage coefficient sum / counter.
[0036] Optionally, the method may further include:
[0037] When the dual filter system starts to run, the learning rate adopts the learning rate of the normalized least mean square adaptive filter NLMS algorithm;
[0038] When the parameters of the dual filter enter adjustment, the learning rate is adjusted based on the leakage coefficient, and the leakage coefficient is positively correlated with the learning rate; and the dual filter is updated according to the adjusted learning rate.
[0039] A second aspect of the present application provides an echo cancellation device with double-talk performance, which may include:
[0040] An acquisition module, used for acquiring an echo signal to be eliminated;
[0041] An echo cancellation module, used for performing echo cancellation on the echo signal to be cancelled through a dual filter to obtain a first signal after echo cancellation;
[0042] A judgment module is configured to judge the state of a voice frame based on the pre-acquired near-end signal, the far-end signal and the first signal after echo cancellation to obtain a first voice frame state result;
[0043] The echo suppression module performs echo suppression on the first signal after echo cancellation according to the first voice frame state result to obtain a second signal after echo cancellation.
[0044] The fifth aspect of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a processor, enables the processor to execute the method described in the first aspect of the present application.
[0045] Yet another aspect of an embodiment of the present application discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method described in the first aspect of the present application.
[0046] Another aspect of an embodiment of the present application discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes the method described in the first aspect of the present application.
[0047] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0048] In an embodiment of the present application, an echo signal to be eliminated is obtained; echo elimination is performed on the echo signal to be eliminated through a dual filter to obtain a first signal after echo elimination; a speech frame state is determined based on a pre-acquired near-end signal, a far-end signal and the first signal after echo elimination to obtain a first speech frame state result; echo suppression is performed on the first signal after echo elimination according to the first speech frame state result to obtain a second signal after echo elimination. Based on the original Webrtc framework, the linear echo elimination scheme is improved, a dual filter is added for echo elimination, double talk detection is added in nonlinear echo elimination, and an echo suppression method is used for double talk state to eliminate echoes in the double talk state. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments and the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained based on these drawings.
[0050] Figure 1 Schematic diagram of the echo generation principle;
[0051] Figure 2 A schematic diagram of an embodiment of an echo cancellation method with double-talk performance in an embodiment of the present application;
[0052] Figure 3A A schematic diagram of a dual filter structure in an embodiment of the present application;
[0053] Figure 3B A schematic diagram of the learning rate update logic judgment in the embodiment of the present application;
[0054] Figure 3C This is a schematic diagram of performing preliminary processing on two parameters output by the dual filter in an embodiment of the present application;
[0055] Figure 3DA schematic diagram of a process for determining a dual-talk state in an embodiment of the present application;
[0056] Figure 3E A schematic diagram of echo suppression in an embodiment of the present application;
[0057] Figure 4 A schematic diagram of an embodiment of an echo cancellation device with double-talk performance in an embodiment of the present application;
[0058] Figure 5 FIG. 1 is a schematic diagram of another embodiment of an echo cancellation device with double-talk performance in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The embodiments of the present application provide an echo cancellation method, device and storage medium with double-talk performance, which are used to improve the linear echo cancellation scheme based on the original Webrtc framework, add a dual filter for echo cancellation, add double-talk detection in non-linear echo cancellation, and use an echo suppression method for the double-talk state to eliminate the echo in the double-talk state.
[0060] In order to make the technical personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, they should all fall within the scope of protection of the present application.
[0061] Voice signals in communication systems are crucial to call quality and user experience. For any voice communication application, echo processing is a very important part of voice communication, because other environmental factors can be avoided by other methods, but echo cannot be avoided. As long as you want to interact with the other party freely and unimpeded, echoes will be collected into the microphone. Figure 1 The figure below is a schematic diagram of the echo generation principle. Figure 1 As shown in the figure, the microphone at end A receives the voice broadcast from end B by the speaker at end A and transmits it back to end B, causing the user at end B to hear his own voice in the speaker, affecting the call experience.
[0062] The goal of echo cancellation technology is to eliminate the echo at end A and retain only the speaking voice of the user at end A to be sent to end B.
[0063] WebRTC (Web Real-Time Communications) is a real-time communication technology that allows web applications or sites to establish peer-to-peer connections between browsers without the help of an intermediary, and to transmit video streams and / or audio streams or any other data. The standards included in WebRTC make it possible for users to create peer-to-peer data sharing and conference calls without installing any plug-ins or third-party software.
[0064] The difficulty in handling the dual-talk state is that the far-end and near-end audio exist at the same time, which will cause the filter to fail to converge to the correct position, resulting in echo leakage or damage to the near-end voice. The purpose of this application is to improve the echo cancellation effect in the dual-talk scenario based on the original WebRtc mature framework. This application will use the following two methods to improve the echo cancellation in the dual-talk state.
[0065] Adopt dual filter structure: The dual filter structure can make a preliminary judgment on the dual-talk state. In the single-talk state, the filter coefficient is iteratively updated as usual; in the dual-talk state, the step size factor is adjusted or the filter update is slowed down.
[0066] The nonlinear echo cancellation module adds double-talk state judgment: combining the dual filter judgment results and the coherence of far and near signals to further judge the double-talk state.
[0067] The technical solution of the present application is further described below by way of embodiments. Figure 2 As shown, it is a schematic diagram of an embodiment of the echo cancellation method of the double-talk performance in the embodiment of the present application, which may include:
[0068] 201. Obtain an echo signal to be eliminated.
[0069] like Figure 3A FIG. 1 is a schematic diagram of a dual filter structure in an embodiment of the present application. For example, the echo signal to be eliminated is obtained, that is, Figure 3A The echo signal y(k) that is desired to be cancelled is shown.
[0070] 202. Perform echo cancellation on the echo signal to be cancelled by using a dual filter to obtain a first signal after echo cancellation.
[0071] Optionally, the dual filter includes a foreground filter and a post filter, and the foreground filter and the post filter are connected in parallel; and performing echo cancellation on the echo signal to be cancelled by the dual filter to obtain a first signal after echo cancellation may include:
[0072] When it is detected that the filter coefficients are iteratively updated normally, the weights of the post filter are updated to the foreground filter; the error signal of the foreground filter and the error signal of the post filter are superimposed to obtain the first signal after the echo is eliminated; when it is detected that the filter coefficients are iteratively updated abnormally, the error signal of the foreground filter is used as the first signal after the echo is eliminated.
[0073] It should be noted that the linear filtering module of Webrtc uses a fixed-step normalized least mean square adaptive filter (Normalized Least Mean Square, NLMS) algorithm, which is implemented using a frequency domain block method to reduce delays and computational complexity. However, this filter cannot distinguish and process double talk (Double talk, DT) scenarios, which affects the echo cancellation effect. In order to eliminate linear echoes to the greatest extent, this application highlights the difference between the far-end reference signal and the estimated echo signal during nonlinear processing; the technical solution of this application adopts a variable step-size dual filter structure to improve the linear echo cancellation effect.
[0074] like Figure 3A As shown in Figure 1, the dual filter structure takes into account the filter update problem and sets a foreground filter (FF) and a background filter (BF). The update strategy of the two filters is as follows: FF is used as a backup of BF. Figure 3A When the logic judgment module in determines that BF can better track the echo path (i.e., single talk (ST) state), FF is updated with the weight of BF, and the error signals of the two filters are superimposed in a windowed and smoothed manner as the final output. On the contrary, when BF cannot better track the echo path (i.e., DT state), the update of BF is not adopted, and the result of FF is used as the final output.
[0075] Optionally, the method may also include: when the dual filter system starts running, the learning rate adopts the learning rate of the normalized least mean square adaptive filter NLMS algorithm; when the parameters of the dual filter enter adjustment, the learning rate is adjusted based on the leakage coefficient, and the leakage coefficient is positively correlated with the learning rate; and the dual filter is updated according to the adjusted learning rate.
[0076] It is understandable that when the filter just starts to run, the filter parameters are still adjusted significantly, and the learning rate adopts the learning rate of the NLMS algorithm; and when the filter parameters basically enter a small adjustment (this state is determined by a control logic), an improved method is adopted to adjust the learning rate based on the leakage coefficient. Figure 3B As shown, it is a schematic diagram of the learning rate update logic judgment in the embodiment of the present application.
[0077] The control logic is to control switching when the following two conditions are met:
[0078] Condition 1. The cumulative sum of learning rate (t) at each moment since the start of operation > the number of MDF filter blocks M;
[0079] Condition 2. Leakage coefficient leakage_coeff(t)>0.03.
[0080] The calculation formula of leakage coefficient and learning rate is as follows, which shows that the learning rate and leakage coefficient are positively correlated; the leakage coefficient can be used to evaluate the residual echo energy, and nonlinear echo cancellation will refer to this parameter for double-talk state detection. Among them, the leakage coefficient can also be called the echo leakage coefficient.
[0081] 1. Learning rate μ(t) calculation formula
[0082] (1) Initial learning rate: μ(t+1)1 The general update formula is:
[0083] Here, the value of MAX_LEARNINGRATE is 0.25.
[0084] (2) The next fine-tuned learning rate: μ(t+1)2 update formula is:
[0085]
[0086]
[0087] in, y(t) is the far-end signal, x(t) is the near-end signal, e(t) is the first signal after echo cancellation obtained by the double filter, Y(t) is the power spectrum of the far-end signal, and E(t) is the power spectrum of the first signal after echo cancellation.
[0088] 2. The leakage coefficient calculation formula leakage_coeff(t) is:
[0089]
[0090]
[0091] R yy (t) = (1 - α (t)) R yy (t-1)+α(t)(POWER y (t)-POWER y (t-1))
[0092]
[0093] POWER e (t) = (1-σ 频域能量平滑因子 )POWER e (t-1)+σ 频域能量平滑因子 |E(t)| 2
[0094] POWER y (t)=(1-σ 频域能量平滑因子 )POWER y (t-1)+σ 频域能量平滑因子 |Y(t)| 2
[0095] Among them, β0 and β max Is a constant.
[0096] 203. Perform voice frame status judgment according to the pre-acquired near-end signal, the far-end signal and the first signal after echo cancellation to obtain a first voice frame status result.
[0097] In the prior art, Webrtc first calculates the correlation DE_corr between the first echo cancellation signal and the near-end signal, as well as the irrelevance DX_corr between the near-end signal and the far-end signal according to the linear filtering output of the echo cancellation first signal e, the near-end signal d and the far-end signal x, in this part, to distinguish between the echo and the near-end speech; then adjusts the suppression coefficient and calculates the nonlinear filtering parameters.
[0098] From the perspective of Webrtc's processing flow, the reasons for the poor dual-talk effect are as follows: 1) Webrtc only distinguishes voice frames into two states: echo and near-end voice, ignoring the dual-talk state; 2) Webrtc uses a very strict coherence value threshold (>=0.98) to judge near-end voice, and would rather sacrifice the dual-talk effect than accept echo residual; 3) In the dual-talk state, the coherence value of the far-end and near-end voices fluctuates significantly. WebRTC sets a threshold to distinguish between far-end and near-end frames, which will result in different degrees of misjudgment, which is reflected in the sense of hearing as echo residual (echo misjudged as near-end voice), fluctuating sound or missing words (near-end voice misjudged as echo).
[0099] In view of the above problems, the technical solution of the present application uses the leakage coefficient (leakage_coeff) output by the dual filter structure and the filter update flag (update_flag) combined with the above coherence coefficients (correlation DE_corr and irrelevance DX_corr) to determine the double talk state. In order to accurately evaluate the echo leakage and avoid double talk misjudgment, the two parameters output by the dual filter can be preliminarily processed. Figure 3C As shown, it is a schematic diagram of preliminarily processing two parameters output by a dual filter in an embodiment of the present application.
[0100] Optionally, the method may further include:
[0101] Obtain a new filter update flag new_update and a leakage coefficient leakage_coeff, and increment the counter by 1 (count++);
[0102] When the new filter update flag is equal to the filter update flag (new_update = update_flag), the previous filter update flag his_update is equal to the new filter update flag (his_update = new_update);
[0103] When the new filter update flag is not equal to the filter update flag (new_update!= update_flag), determine whether the new filter update flag is equal to the previous filter update flag; when the new filter update flag is equal to the previous filter update flag (new_update = his_update), the filter update flag is equal to the new filter update flag (update_flag = new_update), and the previous filter update flag is equal to the new filter update flag (his_update = new_update); when the new filter update flag is not equal to the previous filter update flag, the previous filter update flag is equal to the new filter update flag (his_update = new_update);
[0104] When the leakage coefficient is greater than a first coefficient threshold (leakage_coeff > T1) and less than a second coefficient threshold (leakage_coeff < T2), the sum of leakage coefficients = historical leakage coefficient mean * (counter - 1) + the leakage coefficient (i.e., total his_leakage = historical mean his_leakage * (count - 1) + leakage_coeff), and the current leakage coefficient mean = sum of leakage coefficients / counter (i.e., current mean his_leakage = total his_leakage / count).
[0105] It is understandable that the technical solution of the present application divides the voice frame discrimination into three states: echo, near-end speech, and double talk, which are distinguished by the voice frame state (Voice Frame State, VF_state), and the three states have values of: 0, 4, 1~3. The echo and near-end speech characteristics are very obvious. According to the coherence coefficients DE_corr and DX_corr, a more conservative threshold can be set to judge. For example, DE_corr>0.98 and DX_corr>0.9 are considered to be near-end speech, and DE_corr<0.95 and DX_corr<0.8 are considered to be echo. When the residual echo amplitude is too large, in order to avoid echo leakage, it is also judged as an echo. However, when DE_corr and DX_corr do not meet the strong conditions of echo and near-end speech, it is necessary to combine leakage_coeff and update_flag to further distinguish the double talk state. The technical solution of the present application designs three weak conditions for double talk. Every time a weak condition is met, the possibility of a double talk state is greater, and the possibility of near-end speech existing in the echo is also greater.
[0106] like Figure 3D , which is a schematic diagram of the process of determining the dual-talk state in an embodiment of the present application.
[0107] Optionally, the voice frame status judgment based on the pre-acquired near-end signal, the far-end signal and the first signal after echo elimination to obtain a first voice frame status result may include: determining the correlation between the first signal after echo elimination and the near-end signal, and the non-correlation between the near-end signal and the far-end signal; when the correlation and the non-correlation do not meet the echo strength condition and the near-end voice strength condition, the voice frame status judgment is performed based on the pre-acquired leakage coefficient, the filter update flag, the near-end signal, the far-end signal and the first signal after echo elimination to obtain the first voice frame status result.
[0108] Optionally, the root performs voice frame status judgment according to the pre-acquired leakage coefficient, the filter update flag, the near-end signal, the far-end signal and the first signal after echo cancellation to obtain a first voice frame status result, which may include:
[0109] Determine whether the leakage coefficient is greater than 2 times the second coefficient threshold (whether leakage_coeff>2T2), or whether the leakage coefficient is greater than 3 times the last leakage coefficient (whether leakage_coeff>3his_leakage); this condition is an echo strong condition, indicating that the residual echo is too large;
[0110] If yes, end (break);
[0111] If not, determine whether the correlation is less than a first correlation threshold (e.g., whether DE_corr < 0.6), or whether the non - correlation is less than a first non - correlation threshold (e.g., whether DX_corr < 0.5); this condition is the strong echo condition, indicating very poor correlation;
[0112] If so, end;
[0113] If not, determine whether the correlation is greater than a second correlation threshold (e.g., whether DE_corr > 0.98), and whether the non - correlation is greater than a second non - correlation threshold (e.g., whether DX_corr > 0.9). The second correlation threshold is greater than the first correlation threshold, and the second non - correlation threshold is greater than the first non - correlation threshold; this condition is the strong near - end speech condition;
[0114] If so, the value of the current speech frame state is equal to 4 (VF_state0 = 4), and end;
[0115] If not, determine whether the correlation is greater than a third correlation threshold (e.g., whether DE_corr > 0.9), or whether the non - correlation is greater than a third non - correlation threshold (e.g., whether DX_corr > 0.8). The third correlation threshold is greater than the first correlation threshold and less than the second correlation threshold, and the third non - correlation threshold is greater than the first non - correlation threshold and less than the second non - correlation threshold; this condition is the weak double - talk condition;
[0116] If so, the value of the current speech frame state is equal to the value of the initial speech frame state plus 1 (VF_state1 = VF_state + 1), and the initial speech state (VF_state) has a value of 0;
[0117] If not, determine whether the filter update flag is equal to 1 (update_flag == 1); this condition is the weak double - talk condition;
[0118] If so, the value of the current speech frame state is equal to the value of the previous current speech frame state plus 1 (VF_state2 = VF_state1 + 1). Determine whether the leakage coefficient is less than the previous leakage coefficient (leakage_coeff < his_leakage), or whether the leakage coefficient is less than the second threshold (leakage_coeff < T2); this condition is the weak double - talk condition. If so, the value of the current speech frame state is equal to the value of the previous current speech frame state plus 1 (VF_state3 = VF_state2 + 1), and end; if not, end;
[0119] If not, determine whether the leakage coefficient is less than the previous leakage coefficient (whether leakage_coeff < his_leakage), or whether the leakage coefficient is less than the second threshold (whether leakage_coeff < T2); this condition is a double-talk weak condition; if so, the value of the current speech frame state is equal to the value of the previous current speech frame state plus 1 (VF_state3 = VF_state2 + 1), and end; if not, end;
[0120] Obtain a first speech frame state result according to the value of the current speech frame state;
[0121] Among them, the speech frame state includes an echo state, a near-end speech state, and a double-talk state. When the value of the speech frame state is 0, it indicates that the speech frame state is the echo state. When the value of the speech frame state is 4, it indicates that the speech frame state is the near-end speech state. When the value of the speech frame state is 1-3, it indicates that the speech frame state is the double-talk state.
[0122] 204. Perform echo suppression on the first signal after echo cancellation according to the first speech frame state result to obtain a second signal after echo cancellation.
[0123] Optionally, the performing echo suppression on the first signal after echo cancellation according to the first speech frame state result to obtain a second signal after echo cancellation may include:
[0124] Determine whether the value of the current speech frame state corresponding to the first speech frame state result is equal to 4;
[0125] If so, end;
[0126] If not, determine whether the value of the current speech frame state corresponding to the first speech frame state result is equal to 0;
[0127] If so, normally update the suppression coefficient to represent echo cancellation;
[0128] If not, reduce the suppression coefficient, perform echo suppression on the first signal after echo cancellation according to the reduced suppression coefficient to obtain a second signal after echo cancellation. The second signal after echo cancellation is used for speech state judgment to obtain a second speech frame state result, and the second speech frame state result is used for echo suppression.
[0129] Optionally, the amplitude of reducing the suppression coefficient is positively correlated with the value of the speech frame state.
[0130] Optionally, the method may further include:
[0131] Performing voice frame status judgment according to the pre-acquired near-end signal, the far-end signal and the second signal after echo cancellation to obtain a second voice frame status result;
[0132] Determine whether the current voice frame state value corresponding to the second voice frame state result is equal to 4;
[0133] If so, end;
[0134] If not, determining whether the current voice frame state value corresponding to the second voice frame state result is equal to 0;
[0135] If yes, the suppression coefficient is updated normally to represent the echo cancellation;
[0136] If not, the suppression coefficient is reduced again, and echo suppression is performed on the second signal after echo cancellation according to the suppression coefficient after the reduction again, so as to obtain a third signal after echo cancellation.
[0137] It is understandable that, based on the result of the first speech frame state judgment, special processing is performed on the double-talk speech frame when echo suppression is performed. In order to avoid near-end speech loss, the technical solution of the present application adjusts the echo suppression coefficient (overDrive) according to VF_state, and the reduction range of overDrive is proportional to VF_state. Figure 3E As shown, it is a schematic diagram of echo suppression in the embodiment of the present application. Input the first voice frame state result VF_state; determine whether VF_state is ==4, if so, end (break); if not, determine whether VF_state is ==0, if so, update the suppression coefficient overDrive normally; if not, it is considered to be a double-talk state, reduce the suppression coefficient to perform the first echo elimination, and obtain a new residual signal e_new; calculate DE_corr' and DX_corr' again according to e_new, if the values of DE_corr' and DX_corr' are small, e_new still has residual echo, and the suppression coefficient can be reduced again to perform the second echo elimination. After the second echo elimination, it can be considered that the echo has been eliminated, or the echo elimination step can be continued. The specific situation depends on the actual situation and is not limited here.
[0138] That is, to avoid echo leakage, the technical solution of the present application can perform multiple echo cancellation operations; after the first echo cancellation, a new residual echo signal e_new is obtained, and the coherence coefficient can be calculated again based on e_new to evaluate the size of the residual echo (the evaluation method refers to the original process of Webrtc and will not be repeated here); when there is still residual echo in e_new, overDrive is adjusted again to perform the second echo cancellation, otherwise no processing is performed.
[0139] In an embodiment of the present application, an echo signal to be eliminated is obtained; echo elimination is performed on the echo signal to be eliminated through a dual filter to obtain a first signal after echo elimination; a speech frame state is determined based on a pre-acquired near-end signal, a far-end signal and the first signal after echo elimination to obtain a first speech frame state result; echo suppression is performed on the first signal after echo elimination according to the first speech frame state result to obtain a second signal after echo elimination. Based on the original Webrtc framework, the linear echo elimination scheme is improved, a dual filter is added for echo elimination, double talk detection is added in nonlinear echo elimination, and an echo suppression method is used for double talk state to eliminate echoes in the double talk state.
[0140] like Figure 4 As shown, it is a schematic diagram of an embodiment of an echo cancellation device with double-talk performance in an embodiment of the present application, which may include:
[0141] An acquisition module 401 is used to acquire an echo signal to be eliminated;
[0142] The echo cancellation module 402 is used to perform echo cancellation on the echo signal to be cancelled by using a dual filter to obtain a first signal after echo cancellation;
[0143] The judgment module 403 is used to judge the state of the voice frame according to the pre-acquired near-end signal, the far-end signal and the first signal after the echo cancellation, and obtain a first voice frame state result;
[0144] The echo suppression module 404 is configured to perform echo suppression on the first signal after echo cancellation according to the first voice frame state result to obtain a second signal after echo cancellation.
[0145] Optionally, the dual filter includes a foreground filter and a post filter, and the foreground filter and the post filter are connected in parallel;
[0146] The echo cancellation module 402 is specifically used to update the weight of the post filter to the foreground filter when it is detected that the filter coefficient is iteratively updated normally; superimpose the error signal of the foreground filter and the error signal of the post filter to obtain the first signal after the echo is eliminated; and when it is detected that the filter coefficient is not iteratively updated normally, use the error signal of the foreground filter as the first signal after the echo is eliminated.
[0147] Optionally, the judgment module 403 is specifically used to determine the correlation between the first signal after echo elimination and the near-end signal, and the non-correlation between the near-end signal and the far-end signal; when the correlation and the non-correlation do not meet the echo strength condition and the near-end speech strength condition, a voice frame status judgment is performed according to the pre-acquired leakage coefficient, the filter update flag, the near-end signal, the far-end signal and the first signal after echo elimination to obtain a first voice frame status result.
[0148] Optionally, the determination module 403 is specifically configured to:
[0149] Determine whether the leakage coefficient is greater than 2 times the second coefficient threshold, or whether the leakage coefficient is greater than 3 times the previous leakage coefficient;
[0150] If so, end;
[0151] If not, determining whether the correlation is less than a first correlation threshold, or whether the non-correlation is less than a first non-correlation threshold;
[0152] If so, end;
[0153] If not, determine whether the correlation is greater than a second correlation threshold, and whether the non-correlation is greater than a second non-correlation threshold, the second correlation threshold is greater than the first correlation threshold, and the second non-correlation threshold is greater than the first non-correlation threshold;
[0154] If yes, the current voice frame state value is equal to 4, and the process ends;
[0155] If not, determine whether the correlation is greater than a third correlation threshold, or whether the non-correlation is greater than a third non-correlation threshold, the third correlation threshold is greater than the first correlation threshold and less than the second correlation threshold, and the third non-correlation threshold is greater than the first non-correlation threshold and less than the second non-correlation threshold;
[0156] If so, the current voice frame state value is equal to the initial voice frame state value plus 1, and the initial voice state value is 0;
[0157] If not, determining whether the filter update flag is equal to 1;
[0158] If yes, the current voice frame state value is equal to the previous current voice frame state value plus 1, determine whether the leakage coefficient is less than the previous leakage coefficient, or whether the leakage coefficient is less than the second threshold; if yes, the current voice frame state value is equal to the previous current voice frame state value plus 1, end; if no, end;
[0159] If not, determine whether the leakage coefficient is less than the last leakage coefficient, or whether the leakage coefficient is less than the second threshold; if so, the current voice frame state value is equal to the last current voice frame state value plus 1, and end; if not, end;
[0160] Obtain a first voice frame state result according to the current voice frame state value;
[0161] Among them, the voice frame state includes an echo state, a near-end voice state and a double-talk state. When the voice frame state value is 0, it indicates that the voice frame state is the echo state. When the voice frame state value is 4, it indicates that the voice frame state is the near-end voice state. When the voice frame state value is 1-3, it indicates that the voice frame state is the double-talk state.
[0162] Optionally, the echo suppression module 404 is specifically configured to:
[0163] Determine whether the current voice frame state value corresponding to the first voice frame state result is equal to 4;
[0164] If so, end;
[0165] If not, determining whether the current voice frame state value corresponding to the first voice frame state result is equal to 0;
[0166] If yes, the suppression coefficient is updated normally to represent the echo cancellation;
[0167] If not, reduce the suppression coefficient, and perform echo suppression on the first signal after echo elimination according to the reduced suppression coefficient to obtain a second signal after echo elimination. The second signal after echo elimination is used to perform voice state judgment to obtain a second voice frame state result. The second voice frame state result is used to perform echo suppression.
[0168] Optionally, the magnitude of reducing the suppression coefficient is positively correlated with the value of the speech frame state.
[0169] Optionally, the acquisition module 401 is further used to acquire a new filter update flag and a leakage coefficient, and the counter is incremented by 1;
[0170] The judging module 403 is further configured to: when the new filter update flag is equal to the filter update flag, the last filter update flag is equal to the new filter update flag;
[0171] In the case where the new filter update flag is not equal to the filter update flag, judging whether the new filter update flag is equal to the last filter update flag; in the case where the new filter update flag is equal to the last filter update flag, the filter update flag is equal to the new filter update flag, and the last filter update flag is equal to the new filter update flag; in the case where the new filter update flag is not equal to the last filter update flag, the last filter update flag is equal to the new filter update flag;
[0172] When the leakage coefficient is greater than the first coefficient threshold and less than the second coefficient threshold, the leakage coefficient sum=historical leakage coefficient mean*(counter-1)+the leakage coefficient, and the current leakage coefficient mean=leakage coefficient sum / counter.
[0173] Optionally, the echo elimination device with dual-talk performance also includes: a processing module, which is used to use the learning rate of the normalized least mean square adaptive filter NLMS algorithm when the dual filter system starts to run; when the parameters of the dual filter enter adjustment, adjust the learning rate based on the leakage coefficient, and the leakage coefficient is positively correlated with the learning rate; and guide the update of the dual filter according to the adjusted learning rate.
[0174] like Figure 5 FIG. 1 is a schematic diagram of another embodiment of an echo cancellation device with double-talk performance in an embodiment of the present application, which may include:
[0175] A memory 501 storing executable program codes;
[0176] a processor 502 coupled to the memory 501;
[0177] The processor 502 is used to obtain an echo signal to be eliminated; perform echo elimination on the echo signal to be eliminated through a dual filter to obtain a first signal after echo elimination; perform voice frame status judgment based on a pre-acquired near-end signal, a far-end signal and the first signal after echo elimination to obtain a first voice frame status result; perform echo suppression on the first signal after echo elimination according to the first voice frame status result to obtain a second signal after echo elimination.
[0178] Optionally, the dual filter includes a foreground filter and a post filter, and the foreground filter and the post filter are connected in parallel;
[0179] Processor 502 is specifically used to update the weight of the post filter to the foreground filter when it is detected that the filter coefficient is iteratively updated normally; superimpose the error signal of the foreground filter and the error signal of the post filter to obtain the first signal after echo elimination; and when it is detected that the filter coefficient is not iteratively updated normally, use the error signal of the foreground filter as the first signal after echo elimination.
[0180] Optionally, the processor 502 is specifically used to determine the correlation between the first signal after echo elimination and the near-end signal, and the non-correlation between the near-end signal and the far-end signal; when the correlation and the non-correlation do not meet the echo strength condition and the near-end speech strength condition, a voice frame status judgment is performed according to the pre-acquired leakage coefficient, the filter update flag, the near-end signal, the far-end signal and the first signal after echo elimination to obtain a first voice frame status result.
[0181] Optionally, the processor 502 is specifically configured to:
[0182] Determine whether the leakage coefficient is greater than 2 times the second coefficient threshold, or whether the leakage coefficient is greater than 3 times the previous leakage coefficient;
[0183] If so, end;
[0184] If not, determining whether the correlation is less than a first correlation threshold, or whether the non-correlation is less than a first non-correlation threshold;
[0185] If so, end;
[0186] If not, determine whether the correlation is greater than a second correlation threshold, and whether the non-correlation is greater than a second non-correlation threshold, the second correlation threshold is greater than the first correlation threshold, and the second non-correlation threshold is greater than the first non-correlation threshold;
[0187] If yes, the current voice frame state value is equal to 4, and the process ends;
[0188] If not, determine whether the correlation is greater than a third correlation threshold, or whether the non-correlation is greater than a third non-correlation threshold, the third correlation threshold is greater than the first correlation threshold and less than the second correlation threshold, and the third non-correlation threshold is greater than the first non-correlation threshold and less than the second non-correlation threshold;
[0189] If so, the current voice frame state value is equal to the initial voice frame state value plus 1, and the initial voice state value is 0;
[0190] If not, determining whether the filter update flag is equal to 1;
[0191] If yes, the current voice frame state value is equal to the previous current voice frame state value plus 1, determine whether the leakage coefficient is less than the previous leakage coefficient, or whether the leakage coefficient is less than the second threshold; if yes, the current voice frame state value is equal to the previous current voice frame state value plus 1, end; if no, end;
[0192] If not, determine whether the leakage coefficient is less than the last leakage coefficient, or whether the leakage coefficient is less than the second threshold; if so, the current voice frame state value is equal to the last current voice frame state value plus 1, and end; if not, end;
[0193] Obtain a first voice frame state result according to the current voice frame state value;
[0194] Among them, the voice frame state includes an echo state, a near-end voice state and a double-talk state. When the voice frame state value is 0, it indicates that the voice frame state is the echo state. When the voice frame state value is 4, it indicates that the voice frame state is the near-end voice state. When the voice frame state value is 1-3, it indicates that the voice frame state is the double-talk state.
[0195] Optionally, the processor 502 is specifically configured to:
[0196] Determine whether the current voice frame state value corresponding to the first voice frame state result is equal to 4;
[0197] If so, end;
[0198] If not, determining whether the current voice frame state value corresponding to the first voice frame state result is equal to 0;
[0199] If yes, the suppression coefficient is updated normally to represent the echo cancellation;
[0200] If not, reduce the suppression coefficient, and perform echo suppression on the first signal after echo elimination according to the reduced suppression coefficient to obtain a second signal after echo elimination. The second signal after echo elimination is used to perform voice state judgment to obtain a second voice frame state result. The second voice frame state result is used to perform echo suppression.
[0201] Optionally, the magnitude of reducing the suppression coefficient is positively correlated with the value of the speech frame state.
[0202] Optionally, the processor 502 is specifically configured to obtain a new filter update flag and a leakage coefficient, and to increase a counter by 1;
[0203] In the case where the new filter update flag is equal to the filter update flag, the last filter update flag is equal to the new filter update flag;
[0204] In the case where the new filter update flag is not equal to the filter update flag, judging whether the new filter update flag is equal to the last filter update flag; in the case where the new filter update flag is equal to the last filter update flag, the filter update flag is equal to the new filter update flag, and the last filter update flag is equal to the new filter update flag; in the case where the new filter update flag is not equal to the last filter update flag, the last filter update flag is equal to the new filter update flag;
[0205] When the leakage coefficient is greater than the first coefficient threshold and less than the second coefficient threshold, the leakage coefficient sum=historical leakage coefficient mean*(counter-1)+the leakage coefficient, and the current leakage coefficient mean=leakage coefficient sum / counter.
[0206] Optionally, the processor 502 is also used to, when the dual filter system starts running, use the learning rate of the normalized least mean square adaptive filter NLMS algorithm as the learning rate; when the parameters of the dual filter enter adjustment, adjust the learning rate based on the leakage coefficient, and the leakage coefficient is positively correlated with the learning rate; and guide the update of the dual filter according to the adjusted learning rate.
[0207] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0208] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0209] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0210] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0211] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0212] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0213] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for echo cancellation with double-talk performance, characterized in that: include: Acquire the echo signal to be eliminated; Performing echo cancellation on the echo signal to be cancelled by using a dual filter to obtain a first signal after echo cancellation; Performing voice frame status judgment according to the pre-acquired near-end signal, the far-end signal and the first signal after echo cancellation to obtain a first voice frame status result; Perform echo suppression on the first signal after echo cancellation according to the first voice frame state result to obtain a second signal after echo cancellation.
2. The method according to claim 1, characterized in that The dual filter comprises a foreground filter and a post filter, wherein the foreground filter and the post filter are connected in parallel; The step of performing echo cancellation on the echo signal to be cancelled by using the dual filter to obtain a first signal after echo cancellation includes: When it is detected that the filter coefficients are iteratively updated normally, the weight of the post filter is updated to the foreground filter; the error signal of the foreground filter is superimposed with the error signal of the post filter to obtain the first signal after the echo is eliminated; When it is detected that the filter coefficients are not iteratively updated normally, the error signal of the foreground filter is used as the first signal after the echo is eliminated.
3. The method according to claim 1 or 2, characterized in that: The step of determining the state of a voice frame according to the pre-acquired near-end signal, the far-end signal and the first signal after echo cancellation to obtain a first voice frame state result includes: Determine the correlation between the first signal after echo cancellation and the near-end signal, and the non-correlation between the near-end signal and the far-end signal; When the correlation and the non-correlation do not satisfy the echo strength condition and the near-end speech strength condition, a speech frame status judgment is performed based on the pre-acquired leakage coefficient, the filter update flag, the near-end signal, the far-end signal and the first signal after echo elimination to obtain a first speech frame status result.
4. The method according to claim 3, characterized in that: The root performs voice frame status judgment according to the pre-acquired leakage coefficient, the filter update flag, the near-end signal, the far-end signal and the first signal after echo cancellation to obtain a first voice frame status result, including: Determine whether the leakage coefficient is greater than 2 times the second coefficient threshold, or whether the leakage coefficient is greater than 3 times the previous leakage coefficient; If so, end; If not, determining whether the correlation is less than a first correlation threshold, or whether the non-correlation is less than a first non-correlation threshold; If so, end; If not, determine whether the correlation is greater than a second correlation threshold, and whether the non-correlation is greater than a second non-correlation threshold, the second correlation threshold is greater than the first correlation threshold, and the second non-correlation threshold is greater than the first non-correlation threshold; If yes, the current voice frame state value is equal to 4, and the process ends; If not, determine whether the correlation is greater than a third correlation threshold, or whether the non-correlation is greater than a third non-correlation threshold, the third correlation threshold is greater than the first correlation threshold and less than the second correlation threshold, and the third non-correlation threshold is greater than the first non-correlation threshold and less than the second non-correlation threshold; If so, the current voice frame state value is equal to the initial voice frame state value plus 1, and the initial voice state value is 0; If not, determining whether the filter update flag is equal to 1; If yes, the current voice frame state value is equal to the previous current voice frame state value plus 1, determine whether the leakage coefficient is less than the previous leakage coefficient, or whether the leakage coefficient is less than the second threshold; if yes, the current voice frame state value is equal to the previous current voice frame state value plus 1, end; if no, end; If not, determine whether the leakage coefficient is less than the last leakage coefficient, or whether the leakage coefficient is less than the second threshold; if so, the current voice frame state value is equal to the last current voice frame state value plus 1, and end; if not, end; Obtain a first voice frame state result according to the current voice frame state value; Among them, the voice frame state includes an echo state, a near-end voice state and a double-talk state. When the voice frame state value is 0, it indicates that the voice frame state is the echo state. When the voice frame state value is 4, it indicates that the voice frame state is the near-end voice state. When the voice frame state value is 1-3, it indicates that the voice frame state is the double-talk state.
5. The method according to claim 1 or 2, characterized in that: The performing echo suppression on the first signal after echo cancellation according to the first voice frame state result to obtain a second signal after echo cancellation includes: Determine whether the current voice frame state value corresponding to the first voice frame state result is equal to 4; If so, end; If not, determining whether the current voice frame state value corresponding to the first voice frame state result is equal to 0; If yes, the suppression coefficient is updated normally to represent the echo cancellation; If not, reduce the suppression coefficient, and perform echo suppression on the first signal after echo elimination according to the reduced suppression coefficient to obtain a second signal after echo elimination. The second signal after echo elimination is used to perform voice state judgment to obtain a second voice frame state result. The second voice frame state result is used to perform echo suppression.
6. The method according to claim 5, characterized in that The magnitude of reducing the suppression coefficient is positively correlated with the value of the speech frame state.
7. The method according to claim 1 or 2, characterized in that: The method further comprises: Get the new filter update flag and leakage coefficient, and add 1 to the counter; In the case where the new filter update flag is equal to the filter update flag, the last filter update flag is equal to the new filter update flag; In the case where the new filter update flag is not equal to the filter update flag, judging whether the new filter update flag is equal to the last filter update flag; in the case where the new filter update flag is equal to the last filter update flag, the filter update flag is equal to the new filter update flag, and the last filter update flag is equal to the new filter update flag; in the case where the new filter update flag is not equal to the last filter update flag, the last filter update flag is equal to the new filter update flag; When the leakage coefficient is greater than the first coefficient threshold and less than the second coefficient threshold, the leakage coefficient sum=historical leakage coefficient mean*(counter-1)+the leakage coefficient, and the current leakage coefficient mean=leakage coefficient sum / counter.
8. The method according to claim 1 or 2, characterized in that: The method further comprises: When the dual filter system starts to run, the learning rate adopts the learning rate of the normalized least mean square adaptive filter NLMS algorithm; When the parameters of the dual filter enter adjustment, the learning rate is adjusted based on the leakage coefficient, and the leakage coefficient is positively correlated with the learning rate; and the dual filter is updated according to the adjusted learning rate.
9. An echo cancellation device with double-talk performance, characterized in that: include: An acquisition module, used for acquiring an echo signal to be eliminated; An echo cancellation module, used for performing echo cancellation on the echo signal to be cancelled through a dual filter to obtain a first signal after echo cancellation; A judgment module is configured to judge the state of a voice frame based on the pre-acquired near-end signal, the far-end signal and the first signal after echo cancellation to obtain a first voice frame state result; The echo suppression module performs echo suppression on the first signal after echo cancellation according to the first voice frame state result to obtain a second signal after echo cancellation.
10. An echo cancellation device with double-talk performance, characterized in that: include: A memory storing executable program code; a processor coupled to the memory; The processor is configured to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium comprising instructions, which, when executed on a processor, causes the processor to perform the method according to any one of claims 1 to 8.
