Echo leakage detection method, terminal and storage medium

By determining whether the filter coefficient converges in the leakage echo detection, the detection instability problem caused by the impact of delay in the prior art is solved, and higher stability and reliability are achieved.

CN119603401APending Publication Date: 2025-03-11ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311137080.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-01
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The prior art in the detection of leakage echoes has caused unstable detection results due to the impact of delay and lacks reliability.

Method used

By acquiring the remote and near-end signals, when the preset conditions are met, it is determined whether the filter coefficient converges. If the filter coefficient converges, it is judged that there is no leakage echo at present; if it does not converge, it is judged that there is a leakage echo and there is no need to perform delay calculations.

Benefits of technology

Improve the stability and reliability of leakage echo detection, and avoid instability caused by delay influence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603401A_ABST
    Figure CN119603401A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an echo leakage detection method, a terminal and a storage medium, and belongs to the technical field of communication. The method comprises the following steps: determining whether the far-end signal and the near-end signal meet a preset condition or not; when the far-end signal and the near-end signal meet the preset condition, determining whether a filter coefficient is converged or not; if the filter coefficient converges, determining that the leakage echo does not exist at present; and if the filter coefficient is not converged, determining that leakage echo exists at present. According to the technical scheme of the embodiment of the invention, the stability and reliability of echo leakage detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a leakage echo detection method, a terminal and a storage medium. Background Art

[0002] Nowadays, audio communication has been widely used in people's daily work and life. Different terminal devices, actual application sound field environment and abnormal communication system will cause excessive delay or non-causal delay, which will lead to leakage echo, thus affecting the quality of audio communication. At present, leakage echo detection is generally based on the correlation between the residual signal after AEC (Acoustic Echo Cancelling) and the far-end signal. Due to the delay between the residual signal and the far-end signal, it is necessary to estimate the delay between the two signals first, and then adjust the delay before further calculating the correlation between the two signals. The result of correlation calculation is greatly affected by the delay and lacks stability.

[0003] Therefore, how to improve the stability and reliability of leak echo detection has become an urgent problem to be solved. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to provide a leakage echo detection method, a terminal and a storage medium, aiming to improve the stability and reliability of leakage echo detection.

[0005] In a first aspect, an embodiment of the present application provides a leakage echo detection method, comprising:

[0006] Acquire far-end and near-end signals;

[0007] Determining whether the far-end signal and the near-end signal meet a preset condition;

[0008] When the far-end signal and the near-end signal meet the preset condition, determining whether the filter coefficients converge;

[0009] If the filter coefficients converge, it is determined that there is no leakage echo currently;

[0010] If the filter coefficients do not converge, it is determined that a leakage echo currently exists.

[0011] In a second aspect, an embodiment of the present application provides a terminal, the terminal comprising:

[0012] A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the above-mentioned leakage echo detection method are realized.

[0013] In a third aspect, an embodiment of the present application provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the leakage echo detection method as described above.

[0014] The embodiments of the present application provide a leakage echo detection method, a terminal, and a storage medium. By acquiring a far-end signal and a near-end signal, when the far-end signal and the near-end signal meet a preset condition, it is determined whether the filter coefficient converges. If the filter coefficient converges, it is determined that there is no leakage echo at present; if the filter coefficient does not converge, it is determined that there is a leakage echo at present. There is no need to perform delay calculation, and the leakage echo detection is not affected by the delay. Therefore, the stability and reliability of the leakage echo detection are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 A schematic diagram of a user communicating via a terminal;

[0017] Figure 2 A schematic flow chart of a method for detecting a leaked echo provided by an embodiment of the invention;

[0018] Figure 3 A schematic diagram of echo cancellation by a filter;

[0019] Figure 4 It is a schematic diagram of the convergence of filter coefficients;

[0020] Figure 5 A schematic diagram of a filter coefficient that does not converge;

[0021] Figure 6 A flowchart of performing a missed echo detection in a call scenario provided by an embodiment of the invention;

[0022] Figure 7 A schematic block diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0025] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0026] In actual application scenarios, when users communicate through terminals, such as Figure 1 As shown, each terminal includes a speaker and a microphone. When one end receives the speech of the user at the other end based on network transmission, it is played through the speaker of the local end. The sound played by the speaker is collected by the microphone of the local end and transmitted to the other end through the network. If the speaker of the other end plays without any processing, the user at the other end will hear what he has just said, that is, leakage echo is generated.

[0027] Echo cancellation is to use a filter (such as an adaptive filter) to estimate the echo part contained in the near-end signal from the received far-end signal, and then eliminate the estimated echo part. If the delay between the near-end signal and the far-end signal is causal and does not exceed the maximum delay limit that the filter can handle, the filter is in a convergent state, and there is no leakage echo at this time. If the delay between the near-end and far-end signals is non-causal or the delay exceeds the maximum delay limit that the filter can handle, the filter does not converge, and when the far-end signal is re-collected by the microphone, a leakage echo will be generated. At present, leakage echo detection and judgment are generally based on the correlation between the residual signal after AEC (Acoustic Echo Cancelling) and the far-end signal. Due to the delay between the residual signal and the far-end signal, it is necessary to estimate the delay between the two signals first, and the correlation between the two signals can be further calculated after the delay adjustment. The result of the correlation calculation is greatly affected by the delay and lacks stability.

[0028] In order to solve the above problems, embodiments of the present invention provide a leakage echo detection method, a terminal and a storage medium, aiming to improve the stability and reliability of leakage echo detection.

[0029] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0030] Please refer to Figure 2 , Figure 2 A schematic flow chart of a leakage echo detection method provided by an embodiment of the present invention. The leakage echo detection method can be applied in a terminal or in other devices such as a computer device to improve the stability and reliability of leakage echo detection.

[0031] like Figure 2 As shown, the leakage echo detection method includes steps S101 to S103.

[0032] S101: Acquire a far-end signal and a near-end signal.

[0033] Among them, near-end signal and far-end signal are for different communication terminals. The signal of the local terminal is the near-end signal, and the signal of the other terminal is the far-end signal. For example, taking two-terminal communication as an example, the user communicates with terminal 2 through terminal 1. For terminal 1, the communication signal corresponding to terminal 1 is the near-end signal, and the communication signal corresponding to terminal 2 is the far-end signal. For terminal 2, the communication signal corresponding to terminal 1 is the far-end signal, and the communication signal corresponding to terminal 2 is the near-end signal.

[0034] It is understandable that in different application scenarios, the far-end signal and the near-end signal contain corresponding different types of information. For example, in a call scenario, the far-end signal and the near-end signal may contain the user's voice information; in a musical instrument performance scenario, the far-end signal and the near-end signal may contain music information.

[0035] For example, Figure 1 Taking the system shown as an example, for either end of the communication, the speaker and microphone are turned on to collect the far-end signal and the near-end signal.

[0036] Exemplarily, the acquired far-end signal and near-end signal may be causal signals, that is, the time delay between the far-end signal and the near-end signal is causal, and the output far-end signal / near-end signal is only related to the current or previously input near-end signal / far-end signal. The far-end signal and the near-end signal may also be non-causal signals, that is, there is a non-causal time delay between the far-end signal and the near-end signal.

[0037] S102: Determine whether the far-end signal and the near-end signal meet a preset condition.

[0038] The far-end signal and the near-end signal satisfying the preset condition include: the far-end signal and the near-end signal contain preset type information, and the number of signal frames of the far-end signal and the near-end signal containing the preset type information reaches a preset threshold value.

[0039] The preset type information includes but is not limited to voice information, music information, etc. It is understandable that for different application scenarios, corresponding different preset type information can be determined.

[0040] By obtaining multiple frames of far-end signals and near-end signals, when the far-end signals and near-end signals contain preset type information and the number of signal frames of the far-end signals and near-end signals containing the preset type information reaches a preset threshold value, that is, when a certain amount of preset type information is obtained, it is determined that the preset condition is met.

[0041] It should be noted that the specific value of the preset threshold value can be flexibly set according to actual conditions and is not specifically limited in this application.

[0042] For example, Figure 1 Taking the application scenario shown as an example, the preset type information is voice information. When the speaker and microphone are turned on, when the far-end signal has sufficient voice output and the near-end microphone collects enough voice, and the number of signal frames of the far-end signal and the near-end signal containing voice information reaches the preset threshold value, it is determined that the preset conditions are met.

[0043] In some embodiments, the determination of whether the far-end signal and the near-end signal meet a preset condition includes: performing the preset type information detection on the far-end signal of the current frame and the near-end signal of the current frame; if the far-end signal of the current frame and the near-end signal of the current frame contain the preset type information, accumulating the number of signal frames; if the accumulated number of frames does not reach a preset threshold value, performing the preset type information detection on the next frame far-end signal and the next frame near-end signal; if the next frame far-end signal and the next frame near-end signal contain the preset type information, executing the step of accumulating the number of signal frames until the accumulated number of frames reaches the preset threshold value, and determining that the preset condition is met.

[0044] Exemplarily, each time a far-end signal and a near-end signal are obtained, a preset type information detection is performed on the far-end signal and the near-end signal of the current frame. For example, if it is a call scene, voice information detection is performed on the far-end signal and the near-end signal of the current frame. For another example, if it is a scene of a musical instrument playing, music information detection is performed on the far-end signal and the near-end signal of the current frame.

[0045] If the far-end signal of the current frame and the near-end signal of the current frame contain preset type information, the number of signal frames is accumulated. For example, the initial default value of the number of frames is 0. If the far-end signal of the current frame and the near-end signal of the current frame contain preset type information, the number of frames is increased by 1 and the number of frames is updated. If the accumulated number of frames does not reach the preset threshold value, when the next frame of the far-end signal and the next frame of the near-end signal are obtained, the next frame of the far-end signal and the next frame of the near-end signal are detected for the preset type information. If the next frame of the far-end signal and the next frame of the near-end signal also contain the preset type information, the number of frames is continued to be increased by 1 and the number of frames is updated; if the next frame of the far-end signal and the next frame of the near-end signal do not contain the preset type information, the number of frames is not updated. The number of signal frames is accumulated in the above manner until the accumulated number of frames reaches the preset threshold value, and it is determined that the preset condition is met. That is, the number of signal frames of the far-end signal and the near-end signal containing the preset type information obtained reaches the preset threshold value.

[0046] In some embodiments, for a call scenario, when the preset type information includes voice information, the preset type information detection on the current frame far-end signal and the current frame near-end signal includes: noise filtering on the current frame far-end signal and the current frame near-end signal; and voice activity detection (VAD) on the current frame far-end signal and the current frame near-end signal after noise filtering.

[0047] In a call scenario, in addition to the user's voice information, there may also be some interference noise. Therefore, after obtaining each frame of far-end signal and near-end signal, the far-end signal of the current frame and the near-end signal of the current frame are firstly noise filtered, and after filtering out the interference noise in the far-end signal of the current frame and the near-end signal of the current frame, VAD (voice activity detection) detection is performed, so that the VAD detection result is more accurate.

[0048] S103, when the far-end signal and the near-end signal meet the preset condition, determine whether the filter coefficients converge; if so, execute step S104; if not, execute step S105;

[0049] S104, determining that there is no missing echo currently;

[0050] S105: Determine whether a leakage echo currently exists.

[0051] Exemplarily, taking a call scenario as an example, when the far-end signal and the near-end signal contain voice information, and the number of signal frames of the far-end signal and the near-end signal containing voice information reaches a preset threshold, that is, when a certain amount of voice information is obtained, signal analysis is performed to determine whether the filter coefficients converge.

[0052] In some embodiments, the determining whether the filter coefficients converge comprises: performing time domain blocking on the remote signal based on a preset number of blocks, determining the mean of the absolute values ​​of the block filter coefficients corresponding to each signal block; determining a first mean and a second mean from the means of the preset number of blocks, determining a signal block a corresponding to the first mean and a signal block b corresponding to the second mean, wherein the first mean is the maximum value among the means of the preset number of blocks, and the second mean is the second largest value among the means of the preset number of blocks; if the signal block a is equal to the signal block b, the first mean is equal to the signal block b. If the number of signal blocks between blocks b is greater than a preset number, whether the filter coefficients converge is determined based on the signal block a, the signal block b, the signal block a1 and the signal block a2 adjacent to the right of the signal block a, and the signal blocks b1 and the signal block b2 adjacent to the right of the signal block b; if the number of signal blocks between the signal block a and the signal block b is less than or equal to the preset number, whether the filter coefficients converge is determined based on the signal block a and the signal blocks a1 and the signal block a2 adjacent to the right of the signal block a.

[0053] Exemplarily, a preset number of blocks M corresponding to time-domain blocking of the signal is preset. It should be noted that the preset number of blocks M can be flexibly set according to actual conditions and is not specifically limited in the present application.

[0054] Based on the preset number of blocks M, the obtained remote signal x(n) is divided into blocks in the time domain, and M signal blocks can be obtained. If the length of each signal block is L, then the i-th signal block is x i =[x(ni×L)x(ni×L-1)…x(ni×L-L+1)], where i=0, 1, 2…M-1.

[0055] The i-th signal block performs N-point Fourier transform separately to obtain the corresponding spectrum X i =[l i1 l i2 … l iN ], the spectrum of the i-th signal block at frequency N is l iN The corresponding spectrum of M signal blocks is spliced ​​as X = [X0 X1 … X M-1 ] T The corresponding filter tap weight vector is W = [w0 w1 … w M-1 ] T , where w0, w1 … w M-1 is the block filter coefficient corresponding to the corresponding signal block, w i =[w i1 w i2 … w iN], i=0, 1, 2…M-1.

[0056] For example, taking the call scenario as an example, Figure 3 As shown in the figure, the far-end signal is played by the loudspeaker and propagates to the microphone through the actual echo path as signal r(n). r(n) is collected by the microphone, and the near-end human voice v(n) is also collected at the same time. Therefore, the near-end signal y(n) contains r(n) and v(n). The actual echo path is simulated by the filter to estimate the echo part r′(n):

[0057] r′(n)=W T X

[0058] Therefore, the desired near-end vocal v′(n) is obtained:

[0059] v′(n)=y(n)-r′(n)

[0060] In order to determine whether there is a leakage echo, the block filter coefficients w corresponding to the signal block are calculated respectively. i The mean of the absolute values ​​gives μ0, μ1…μ M-1 . Set μ0, μ1…μ M-1 The M means are compared to determine the maximum and the second largest values. For the sake of distinction and description, the largest mean is referred to as the first mean and the second largest mean is referred to as the second mean. The signal block a corresponding to the first mean and the signal block b corresponding to the second mean are determined.

[0061] For signal block a and signal block b, determine the number of signal blocks between signal block a and signal block b, and judge whether the number of signal blocks between signal block a and signal block b is greater than a preset number. Exemplarily, the specific value of the preset number is set to 2. It should be noted that the preset number can be flexibly set according to actual conditions, and is not specifically limited in this application.

[0062] In one case, the number of signal blocks between signal block a and signal block b is greater than a preset number, for example, greater than 2. In this case, find signal block a1 and signal block a2 that are adjacent to the right of signal block a, and signal block b1 and signal block b2 that are adjacent to the right of signal block b, and determine whether the filter coefficients converge based on signal block a, signal block a1, signal block a2, and signal block b, signal block b1, signal block b2.

[0063] In some embodiments, determining whether the filter coefficients converge according to the signal block a, the signal block b, the signal block a1 and the signal block a2 adjacent to the right of the signal block a, and the signal blocks b1 and the signal block b2 adjacent to the right of the signal block b, comprises: calculating the average value of the means of the preset number of blocks except the means corresponding to the signal block a, the signal block a1, the signal block a2, the signal block b, the signal block b1, and the signal block b2 to obtain an average value Φ1; calculating the absolute value m of the difference between the mean corresponding to the signal block a and the Φ1 a , the absolute value m of the difference between the mean value corresponding to the signal block a1 and Φ1 a1 , the absolute value m of the difference between the mean value corresponding to the signal block a2 and Φ1 a2 , the absolute value m of the difference between the mean value corresponding to the signal block b and Φ1 b , the absolute value m of the difference between the mean value corresponding to the signal block b1 and Φ1 b1 , the absolute value m of the difference between the mean value corresponding to the signal block b2 and Φ1 b2 ; If the m a 、m a1 、m a2 、m b 、m b1 、m b2 and Φ1 meet the first preset condition, it is determined that the filter coefficient does not converge; if the m a 、m a1 、m a2 、m b 、m b1 、m b2 If Φ1 does not satisfy the first preset condition, it is determined that the filter coefficients converge.

[0064] For μ0, μ1…μ M-1 Among these M means, excluding the 6 means of block filter coefficients corresponding to signal block a, signal block a1, signal block a2, signal block b, signal block b1, and signal block b2, the remaining M-6 means are averaged to obtain the average value Φ1.

[0065] Then, the difference m between the mean value corresponding to signal block a and Φ1 is calculated respectively. a , the difference m between the mean value corresponding to signal block a1 and Φ1 a1 , the difference m between the mean value corresponding to signal block a2 and Φ1 a2 , the difference m between the mean value corresponding to signal block b and Φ1 b , the difference m between the mean value corresponding to the signal block b1 and Φ1 b1, the difference m between the mean value corresponding to the signal block b2 and Φ1 b2 .

[0066] According to m a , m a1 , m a2 , m b , m b1 , m b2 and Φ1, if m a , m a1 , m a2 , m b , m b1 , m b2 and Φ1 satisfy the first preset condition, it is determined that the filter coefficients do not converge; on the contrary, if m a , m a1 , m a2 , m b , m b1 , m b2 and Φ1 do not satisfy the first preset condition, it is determined that the filter coefficients converge.

[0067] Exemplarily, m a , m a1 , m a2 , m b , m b1 , m b2 and Φ1 satisfy the first preset condition including: m a < k1*Φ1, and m a1 < k2*Φ1, and m a2 < k3*Φ1, and m b < k1*Φ1, and m b1 < k2*

[0068] Φ1, and m b2 < k3*Φ1; where, the k1, k2, k3 are preset coefficients.

[0069] For example, it is pre-set that k1 = 2, k2 = 1.9, k3 = 1.8. It should be noted that k1, k2, k3 can be flexibly set according to the actual situation and are not specifically limited in this application.

[0070] Assume that it is pre-set that k1 = 2, k2 = 1.9, k3 = 1.8, that is, if m a < 2*Φ1, and m a1 < 1.9*Φ1, and m a2 < 1.8*Φ1, and m b < 2*Φ1, and m b1 < 1.9*Φ1, and m b2<1.8*Φ1, it is determined that the filter coefficients do not converge; otherwise, it is determined that the filter coefficients converge.

[0071] The filter coefficients converge, for example, Figure 4 As shown, the filter coefficients present an obvious peak, and the leakage echo can be effectively eliminated by the filter. Therefore, if the filter coefficients converge, it can be determined that there is no leakage echo at present, that is, there is no leakage echo problem.

[0072] In cases where the filter coefficients do not converge, for example, Figure 5 As shown, the filter coefficients have no obvious peaks, and the leakage echo cannot be effectively eliminated through the filter. Therefore, if the filter coefficients do not converge, it can be determined that there is a leakage echo currently.

[0073] For example, still taking the above example, if m a <2*Φ1, and m a1 <1.9*Φ1, and m a2 <1.8*Φ1, and m b <2*Φ1, and m b1 <1.9*Φ1, and m b2 <1.8*Φ1, it is determined that the filter coefficients do not converge and a leakage echo currently exists; otherwise, it is determined that the filter coefficients converge and no leakage echo currently exists.

[0074] In another case, the number of signal blocks between signal block a and signal block b is less than or equal to a preset number, for example, less than 2. In this case, find signal block a1 and signal block a2 that are adjacent to the right of signal block a, and determine whether the filter coefficients converge based on signal block a, signal block a1, and signal block a2.

[0075] In some embodiments, the determining whether the filter coefficients converge according to the signal block a, and the signal blocks a1 and a2 adjacent to the right of the signal block a, comprises: calculating the average value of the means of the preset number of blocks except the means corresponding to the signal block a, the signal block a1, and the signal block a2, to obtain the average value Φ2; calculating the absolute value n of the difference between the mean corresponding to the signal block a and the Φ2 a , the absolute value n of the difference between the mean value corresponding to the signal block a1 and Φ2 a1 , the absolute value n of the difference between the mean value corresponding to the signal block a2 and Φ2 a2 ; If the n a 、n a1 、n a2 and the Φ2 meet the second preset condition, it is determined that the filter coefficient does not converge; if the n a 、na1 , n a2 If Φ2 does not satisfy the second preset condition with respect to the above, then it is determined that the filter coefficients converge.

[0076] Similarly, for μ0, μ1…μm M-1 For these M means, excluding the 3 means of the block filter coefficients corresponding to signal block a, signal block a1, and signal block a2, the average value calculation is performed on the remaining M - 3 means to obtain the average value Φ2.

[0077] Then, calculate respectively. Then, calculate the difference n between the mean value corresponding to signal block a and Φ2 a , the difference n between the mean value corresponding to signal block a1 and Φ2 a1 , the difference n between the mean value corresponding to signal block a2 and Φ2 a2 .

[0078] According to n a , n a1 , n a2 and Φ2, if n a , n a1 , n a2 and Φ2 satisfy the second preset condition, then it is determined that the filter coefficients do not converge and there is a current echo leakage; conversely, if n a , n a1 , n a2 and Φ2 do not satisfy the second preset condition, then it is determined that the filter coefficients converge and there is no current echo leakage.

[0079] Exemplarily, n a , n a1 , n a2 and Φ2 satisfying the second preset condition include: n a < k1 * Φ2, and n a1 < k2 * Φ2, and n a2 < k3 * Φ2; where, the k1, k2, and k3 are preset coefficients.

[0080] For example, assume that k1 = 2, k2 = 1.9, k3 = 1.8 are preset in advance, that is, if n a < 2 * Φ2, and n a1 < 1.9 * Φ2, and n a2 < 1.8 * Φ2, then it is determined that there is a current echo leakage; otherwise, it is determined that there is no current echo leakage.

[0081] Next, taking the call scenario as an example, as Figure 6 shown, the process of echo leakage detection is as follows:

[0082] The first step is to receive the nth frame ref remote signal and echo near-end signal, the signal frame length is L;

[0083] The second step is to detect the status of the microphone and the speaker, whether the microphone and the speaker are both turned on; if the microphone and the speaker are both turned on, jump to the third step; otherwise, jump to the sixth step and set the first frame number rd=0 and the second frame number ed=0;

[0084] The third step is to perform vad judgment on the frame ref and echo signals. If the frame ref signal has voice information, the rd count is increased by 1; if the frame echo signal has voice information, the ed count is increased by 1;

[0085] Step 4: If rd ≥ h and ed ≥ h, go to step 5, otherwise go to step 6;

[0086] Step 5: Determine whether there is a missing echo:

[0087] Calculate the filter coefficients w for each block i =[w i1 w i2 …w iN ],i=0,1…M-1, the mean of the absolute values ​​μ0,μ1…μ M-1 , find the maximum mean and the second largest mean, the maximum mean corresponds to signal block a, and the second largest mean corresponds to signal block b. Determine whether the distance between signal block a and signal block b is greater than two signal blocks. If it is greater than two signal blocks, execute 1); otherwise, execute 2);

[0088] 1) Find the first signal block a1 and the second signal block a2 to the right of signal block a, and find the first signal block b1 and the second signal block b2 to the right of signal block b, and calculate the average value Φ1 of the absolute values ​​of the block filter coefficients corresponding to all signal blocks except the above 6 signal blocks. Calculate the absolute value m of the difference between the average of the absolute values ​​of the block filter coefficients corresponding to signal blocks a, a1, a2 and signal blocks b, b1, b2 and Φ1 a 、m a1 、m a2 、m b 、m b1 、m b2 . Judge the above difference, if m a <2*Φ1, and m a1 <1.9*Φ1, and m a2 <1.8*Φ1, and m b <2*Φ1, and m b1 <1.9*Φ1, and m b2<1.8*Φ1, it is judged that there is a leakage echo at present; otherwise, if it does not meet the above relationship, it is judged that there is no leakage echo at present;

[0089] 2) Find the first signal block a1 and the second signal block a2 to the right of signal block a, and calculate the average value Φ2 of the absolute values ​​of the block filter coefficients corresponding to all signal blocks except the above three signal blocks. Calculate the absolute value n of the difference between the average of the absolute values ​​of the block filter coefficients corresponding to signal blocks a, a1, and a2 and Φ2 a , n a1 , n a2 . To judge the above difference, if n a <2*Φ2, and n a1 <1.9*Φ2, and n a2 <1.8*Φ2, it is judged that there is a leakage echo at present; otherwise, if it does not meet the above relationship, it is judged that there is no leakage echo at present;

[0090] Step 6. Set n=n+1, jump to step 1, and repeat the above process.

[0091] The leakage echo detection performed in the above manner has a small amount of calculation and can be performed in real time; and, compared with the existing method of detecting leakage echo by calculating the correlation between the signal and the far-end signal, there is no need to perform delay calculation, leakage echo detection is not affected by delay and is more stable.

[0092] In the above embodiment, by acquiring the far-end signal and the near-end signal, when the far-end signal and the near-end signal meet the preset conditions, it is determined whether the filter coefficients converge. If the filter coefficients converge, it is determined that there is no leakage echo at present; if the filter coefficients do not converge, it is determined that there is a leakage echo at present, and there is no need to perform delay calculation. The leakage echo detection is not affected by the delay, thereby improving the stability and reliability of the leakage echo detection.

[0093] The present invention also provides a terminal. Figure 7 , Figure 7 It is a schematic block diagram of a terminal provided in one embodiment of the present application.

[0094] like Figure 7 As shown, the terminal 200 may include a processor 210 and a memory 220, wherein the processor 210 and the memory 220 are connected via a bus, such as an I2C (Inter-integrated Circuit) bus.

[0095] Specifically, the processor 210 may be a micro-controller unit (MCU), a central processing unit (CPU), or a digital signal processor (DSP).

[0096] Specifically, the memory 220 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB disk, or a mobile hard disk, etc. The memory 220 stores various computer programs for the processor 210 to execute.

[0097] The processor 210 is used to run a computer program stored in the memory, and implements the following steps when executing the computer program:

[0098] Acquire far-end and near-end signals;

[0099] Determining whether the far-end signal and the near-end signal meet a preset condition;

[0100] When the far-end signal and the near-end signal meet the preset condition, determining whether the filter coefficients converge;

[0101] If the filter coefficients converge, it is determined that there is no leakage echo currently;

[0102] If the filter coefficients do not converge, it is determined that a leakage echo currently exists.

[0103] In some embodiments, the far-end signal and the near-end signal satisfying the preset condition include: the far-end signal and the near-end signal contain preset type information, and the number of signal frames of the far-end signal and the near-end signal containing the preset type information reaches a preset threshold value.

[0104] In some embodiments, when implementing the determining whether the far-end signal and the near-end signal meet a preset condition, the processor 210 is configured to implement:

[0105] Performing the preset type information detection on the current frame far-end signal and the current frame near-end signal;

[0106] If the current frame far-end signal and the current frame near-end signal contain the preset type information, then accumulate the number of signal frames;

[0107] If the accumulated number of frames does not reach the preset threshold value, performing the preset type information detection on the next frame of far-end signal and the next frame of near-end signal;

[0108] If the next frame of far-end signal and the next frame of near-end signal include the preset type information, the step of accumulating the number of signal frames is performed until the accumulated number of frames reaches the preset threshold value, and it is determined that the preset condition is met.

[0109] In some embodiments, the preset type information includes voice information; when the processor 210 detects the preset type information on the current frame far-end signal and the current frame near-end signal, it is used to implement:

[0110] Performing noise filtering on the current frame far-end signal and the current frame near-end signal;

[0111] The voice activity detection (VAD) is performed on the far-end signal of the current frame and the near-end signal of the current frame after noise filtering.

[0112] In some embodiments, the processor 210, when implementing the determining whether the filter coefficients converge, is configured to implement:

[0113] Divide the remote signal into blocks in the time domain based on a preset number of blocks, and determine the average of the absolute values ​​of the block filter coefficients corresponding to each signal block;

[0114] Determine a first mean and a second mean from the means of the preset number of blocks, and determine a signal block a corresponding to the first mean and a signal block b corresponding to the second mean, wherein the first mean is the maximum value among the means of the preset number of blocks, and the second mean is the second largest value among the means of the preset number of blocks;

[0115] If the number of signal blocks between the signal block a and the signal block b is greater than a preset number, determining whether the filter coefficients converge according to the signal block a, the signal block b, the signal block a1 and the signal block a2 adjacent to the right of the signal block a, and the signal blocks b1 and the signal block b2 adjacent to the right of the signal block b;

[0116] If the number of signal blocks between the signal block a and the signal block b is less than or equal to the preset number, whether the filter coefficients are converged is determined based on the signal block a and the signal blocks a1 and a2 adjacent to the right of the signal block a.

[0117] In some embodiments, when the processor 210 implements the step of determining whether the filter coefficients converge according to the signal block a, the signal block b, the signal block a1 and the signal block a2 adjacent to the right of the signal block a, and the signal blocks b1 and the signal block b2 adjacent to the right of the signal block b, the processor 210 is configured to implement:

[0118] Calculate the average value of the other average values in the average value of the preset number of blocks except for the average values corresponding to the signal block a, the signal block a1, the signal block a2, the signal block b, the signal block b1, and the signal block b2 to obtain an average value Φ1;

[0119] Calculate the absolute value m of the difference between the average value corresponding to the signal block a and Φ1 a , the absolute value m of the difference between the average value corresponding to the signal block a1 and Φ1 a1 , the absolute value m of the difference between the average value corresponding to the signal block a2 and Φ1 a2 , the absolute value m of the difference between the average value corresponding to the signal block b and Φ1 b , the absolute value m of the difference between the average value corresponding to the signal block b1 and Φ1 b1 , the absolute value m of the difference between the average value corresponding to the signal block b2 and Φ1 b2 ;

[0120] If the m a , m a1 , m a2 , m b , m b1 , m b2 and Φ1 satisfy the first preset condition, it is determined that the filter coefficients do not converge;

[0121] If the m a , m a1 , m a2 , m b , m b1 , m b2 and Φ1 do not satisfy the first preset condition, it is determined that the filter coefficients converge.

[0122] In some embodiments, the satisfaction of the first preset condition includes: m a < k1*Φ1, and m a1 < k2*Φ1, and m a2 < k3*Φ1, and m b < k1*Φ1, and m b1 < k2*Φ1, and m b2 < k3*Φ1; where the k1, k2, and k3 are preset coefficients.

[0123] In some embodiments, when the processor 210 implements determining whether the filter coefficients converge according to the signal block a and the signal blocks a1 and a2 adjacent to the right of the signal block a, it is used to implement:

[0124] Calculate the average value of the other means among the means of the preset number of blocks except the means corresponding to the signal block a, the signal block a1, and the signal block a2 to obtain an average value Φ2;

[0125] Calculate the absolute value n of the difference between the mean value corresponding to the signal block a and Φ2 a , the absolute value n of the difference between the mean value corresponding to the signal block a1 and Φ2 a1 , the absolute value n of the difference between the mean value corresponding to the signal block a2 and Φ2 a2 ;

[0126] If the n a 、n a1 、n a2 If Φ2 satisfies a second preset condition, it is determined that the filter coefficients do not converge;

[0127] If the n a 、n a1 、n a2 If Φ2 does not satisfy the second preset condition, it is determined that the filter coefficients converge.

[0128] The terminal 200 can execute the leak echo detection method provided in the embodiment of the present application, and therefore can achieve the beneficial effects that can be achieved by the leak echo detection method provided in the embodiment of the present application. For details, please refer to the previous embodiment and will not be repeated here.

[0129] The embodiment of the present application also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any one of the leakage echo detection methods provided in the description of the embodiment of the present application.

[0130] The storage medium may be an internal storage unit of the terminal described in the foregoing embodiment, such as a hard disk or memory of the terminal. The storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal.

[0131] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0132] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0133] The serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for detecting a leaked echo, the method comprising: Obtain far-end signals and near-end signals; Determining whether the far-end signal and the near-end signal meet a preset condition; When the far-end signal and the near-end signal meet the preset condition, determining whether the filter coefficients converge; If the filter coefficients converge, it is determined that there is no leakage echo currently; If the filter coefficients do not converge, it is determined that a leakage echo currently exists.

2. The method according to claim 1, characterized in that The far-end signal and the near-end signal satisfying the preset condition include: the far-end signal and the near-end signal contain preset type information, and the number of signal frames of the far-end signal and the near-end signal containing the preset type information reaches a preset threshold value.

3. The method according to claim 2, characterized in that The determining whether the far-end signal and the near-end signal meet a preset condition includes: Performing the preset type information detection on the current frame far-end signal and the current frame near-end signal; If the current frame far-end signal and the current frame near-end signal contain the preset type information, then accumulate the number of signal frames; If the accumulated number of frames does not reach the preset threshold value, performing the preset type information detection on the next frame of far-end signal and the next frame of near-end signal; If the next frame of far-end signal and the next frame of near-end signal include the preset type information, the step of accumulating the number of signal frames is performed until the accumulated number of frames reaches the preset threshold value, and it is determined that the preset condition is met.

4. The method according to claim 3, characterized in that The preset type information includes voice information; the detecting of the preset type information on the far-end signal of the current frame and the near-end signal of the current frame includes: Performing noise filtering on the current frame far-end signal and the current frame near-end signal; The voice activity detection (VAD) is performed on the far-end signal of the current frame and the near-end signal of the current frame after noise filtering.

5. The method according to any one of claims 1 to 4, characterized in that: The step of determining whether the filter coefficients have converged comprises: Divide the remote signal into blocks in the time domain based on a preset number of blocks, and determine the average of the absolute values ​​of the block filter coefficients corresponding to each signal block; Determine a first mean and a second mean from the means of the preset number of blocks, and determine a signal block a corresponding to the first mean and a signal block b corresponding to the second mean, wherein the first mean is the maximum value among the means of the preset number of blocks, and the second mean is the second largest value among the means of the preset number of blocks; If the number of signal blocks between the signal block a and the signal block b is greater than a preset number, determining whether the filter coefficients converge according to the signal block a, the signal block b, the signal block a1 and the signal block a2 adjacent to the right of the signal block a, and the signal blocks b1 and the signal block b2 adjacent to the right of the signal block b; If the number of signal blocks between the signal block a and the signal block b is less than or equal to the preset number, whether the filter coefficients are converged is determined based on the signal block a and the signal blocks a1 and a2 adjacent to the right of the signal block a.

6. The method according to claim 5, characterized in that The determining whether the filter coefficients are converged according to the signal block a, the signal block b, the signal block a1 and the signal block a2 adjacent to the right of the signal block a, and the signal block b1 and the signal block b2 adjacent to the right of the signal block b comprises: Calculate the average value of the other means among the means of the preset number of blocks except the means corresponding to the signal block a, the signal block a1, the signal block a2, the signal block b, the signal block b1, and the signal block b2 to obtain an average value Φ1; Calculate the absolute value m of the difference between the mean value corresponding to the signal block a and Φ1 a , the absolute value m of the difference between the mean value corresponding to the signal block a1 and Φ1 a1 , the absolute value m of the difference between the mean value corresponding to the signal block a2 and Φ1 a2 , the absolute value m of the difference between the mean value corresponding to the signal block b and Φ1 b , the absolute value m of the difference between the mean value corresponding to the signal block b1 and Φ1 b1 , the absolute value m of the difference between the mean value corresponding to the signal block b2 and Φ1 b2 ; If the m a 、m a1 、m a2 、m b 、m b1 、m b2 If the first preset condition is satisfied with Φ1, it is determined that the filter coefficients do not converge; If the m a 、m a1 、m a2 、m b 、m b1 、m b2 If Φ1 does not satisfy the first preset condition, it is determined that the filter coefficients converge.

7. The method according to claim 6, characterized in that Said satisfying the first preset condition includes: m a <k1*Φ1, and m a1 <k2*Φ1, and m a2 <k3*Φ1, and m b <k1*Φ1, and m b1 <k2* Φ1, and m b2 <k3 * Φ1; where the k1, k2, and k3 are preset coefficients.

8. The method according to claim 5, characterized in that The step of determining whether the filter coefficients are converged according to the signal block a and the signal blocks a1 and a2 adjacent to the signal block a to the right, comprises: Calculate the average value of the other means among the means of the preset number of blocks except the means corresponding to the signal block a, the signal block a1, and the signal block a2 to obtain an average value Φ2; Calculate the absolute value n of the difference between the mean value corresponding to the signal block a and Φ2 a , the absolute value n of the difference between the mean value corresponding to the signal block a1 and Φ2 a1 , the absolute value n of the difference between the mean value corresponding to the signal block a2 and Φ2 a2 ; If the n a 、n a1 、n a2 If Φ2 satisfies a second preset condition, it is determined that the filter coefficients do not converge; If the n a 、n a1 、n a2 If Φ2 does not satisfy the second preset condition, it is determined that the filter coefficients converge.

9. A terminal, characterized in that: The terminal comprises: A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the leak echo detection method according to any one of claims 1 to 8 are realized.

10. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the leakage echo detection method according to any one of claims 1 to 8.