Leak echo detection method, terminal, and storage medium

By acquiring the remote signal and the near-end signal and judging the filter coefficient convergence, the problem of insufficient stability and reliability of leakage echo detection in the prior art is solved, and high stability and real-time leakage echo detection is achieved.

WO2025044939A1PCT designated stage expired Publication Date: 2025-03-06ZTE CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/114294
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-01
Filing Date
2024-08-23
Publication Date
2025-03-06

Smart Images

  • Figure CN2024114294_06032025_PF_FP_ABST
    Figure CN2024114294_06032025_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a leak echo detection method, a terminal, and a storage medium. The leak echo detection method comprises: acquiring a far-end signal and a near-end signal; determining whether the far-end signal and the near-end signal satisfy a preset condition; when the far-end signal and the near-end signal satisfy the preset condition, determining whether a filter coefficient converges; if the filter coefficient converges, determining that there is no leak echo currently; and if the filter coefficient does not converge, determining that there is a leak echo currently.
Need to check novelty before this filing date? Find Prior Art

Description

Leakage echo detection method, terminal and storage medium

[0001] This disclosure claims priority to Chinese patent application No. 202311137080.0, filed on September 1, 2023, the entire contents of which are incorporated herein by reference. Technical Field

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

[0003] Nowadays, audio communication has been widely used in people's daily work and life. Different terminal devices, the actual application sound field environment, and abnormalities in the communication system can cause excessive or non-causal delays, which will lead to missed echoes and thus affect the quality of audio communication.

[0004] Summary of the Invention

[0005] In a first aspect, an embodiment of the present disclosure provides a method for detecting a leaked echo. The method includes:

[0006] Obtain 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 no leakage echo currently exists;

[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 disclosure provides a terminal. The terminal includes:

[0012] A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for implementing connection and communication between the processor and the memory. When the computer program is executed by the processor, the missed echo detection method as described in the first aspect above is implemented.

[0013] In a third aspect, an embodiment of the present disclosure 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 leakage echo detection method as described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0015] FIG1 is a schematic diagram of a user communicating via a terminal according to some embodiments.

[0016] FIG2 is a schematic flow chart of a method for detecting a missed echo according to some embodiments.

[0017] FIG3 is a schematic diagram of performing echo cancellation through a filter according to some embodiments.

[0018] FIG4 is a schematic diagram illustrating filter coefficient convergence according to some embodiments.

[0019] FIG5 is a schematic diagram illustrating a non-convergence of filter coefficients according to some embodiments.

[0020] FIG6 is a flowchart of performing missed echo detection in a call scenario according to some embodiments.

[0021] FIG7 is a schematic block diagram of the structure of a terminal according to some embodiments. DETAILED DESCRIPTION

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present disclosure.

[0023] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

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

[0025] In actual application scenarios, when users communicate through terminals, as shown in Figure 1, each terminal includes a speaker and a microphone. When one end receives the content spoken by 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. The speaker of the other end plays it. If no processing is performed, the user at the other end will hear what he just said, which will generate leakage echo.

[0026] Echo cancellation uses a filter (such as an adaptive filter) to estimate the echo portion contained in the near-end signal from the received far-end signal, and then eliminates the estimated echo portion. 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. 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. Since there is a time delay between the residual signal and the far-end signal, it is necessary to first estimate the time delay between the two signals and adjust the time delay before further calculating the correlation between the two signals. The result of the correlation calculation is greatly affected by the time delay and lacks stability.

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

[0028] The following embodiments of the present disclosure are described in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0029] Please refer to Figure 2, which is a flow chart of a leak echo detection method provided by an embodiment of the present disclosure. The leak echo detection method can be applied in a terminal or other devices such as a computer device to improve the stability and reliability of leak echo detection.

[0030] As shown in FIG2 , the missed echo detection method includes S101 to S103 .

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

[0032] Near-end signals and far-end signals are specific to different communication endpoints. The signal from the local endpoint is the near-end signal, while the signal from the remote endpoint is the far-end signal. For example, in two-end communication, a user communicates with terminal 2 via terminal 1. For terminal 1, the corresponding communication signal is the near-end signal, while the corresponding communication signal from terminal 2 is the far-end signal. For terminal 2, the corresponding communication signal from terminal 1 is the far-end signal, while the corresponding communication signal from terminal 2 is the near-end signal.

[0033] It is understood 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.

[0034] For example, taking the system shown in FIG1 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.

[0035] For example, 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 previous input near-end signal / remote signal. The far-end signal and 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.

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

[0037] The far-end signal and the near-end signal satisfying the preset condition include: the far-end signal and the near-end signal containing 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.

[0038] 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.

[0039] 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 conditions are met.

[0040] It should be noted that the detailed numerical value of the preset threshold value can be flexibly set according to actual conditions and is not limited in this disclosure.

[0041] For example, taking the application scenario shown in Figure 1 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 near-end signal containing voice information reaches the preset threshold value, it is determined that the preset conditions are met.

[0042] In some embodiments, determining whether the far-end signal and the near-end signal meet the preset conditions 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, accumulating 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 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 conditions are met.

[0043] For example, each time a far-end signal and a near-end signal are obtained, a preset type of information detection is performed on the far-end signal and the near-end signal in the current frame. For example, in a call scenario, voice information detection is performed on the far-end signal and the near-end signal in the current frame. For another example, in a musical instrument performance scenario, music information detection is performed on the far-end signal and the near-end signal in the current frame.

[0044] 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 frame number 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 frame number is increased by 1 and the frame number is updated. If the accumulated frame number does not reach the preset threshold value, when the next far-end signal frame and the next near-end signal frame are obtained, the preset type information detection is performed on the next far-end signal frame and the next near-end signal frame. If the next far-end signal frame and the next near-end signal frame also contain preset type information, the frame number is further increased by 1 and the frame number is updated; if the next far-end signal frame and the next near-end signal frame do not contain preset type information, the frame number is not updated. The signal frame number is accumulated in the above manner until the accumulated frame number reaches the preset threshold value, and it is determined that the preset condition is met. In other words, the number of signal frames of the far-end signal and the near-end signal obtained that contain preset type information reaches the preset threshold value.

[0045] 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: performing noise filtering on the current frame far-end signal and the current frame near-end signal; and performing voice activity detection (VAD) on the current frame far-end signal and the current frame near-end signal after noise filtering.

[0046] 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 the far-end signal and the near-end signal, the current frame of the far-end signal and the current frame of the near-end signal are first noise filtered to remove the interference noise in the current frame of the far-end signal and the current frame of the near-end signal. Then, the voice activity detection (VAD) test is performed, which makes the VAD detection result more accurate.

[0047] S103, when the far-end signal and the near-end signal meet the preset condition, determining whether the filter coefficients converge; if so, executing S104; if not, executing S105;

[0048] S104: Determine that no missing echo currently exists;

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

[0050] For example, 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 value, that is, when a certain amount of voice information is obtained, signal analysis is performed to determine whether the filter coefficients converge.

[0051] 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, the first mean being the maximum value among the means of the preset number of blocks, and the second mean being 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 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 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 adjacent to the right of the signal block a, the signal block a2, and the signal blocks b1 and 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 a2 adjacent to the right of the signal block a.

[0052] Exemplarily, the signal is pre-blocked in the time domain to obtain a corresponding preset number of blocks M. It should be noted that the preset number of blocks M can be flexibly set according to actual conditions and is not limited in this disclosure.

[0053] Based on the preset number of blocks M, the obtained remote signal x(n) is divided into time domain blocks, 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)], i=0, 1, 2...M-1.

[0054] 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 spectrum corresponding to the M signal blocks is spliced ​​as X=[X0X1...X M-1 ] T The corresponding filter tap weight vector is W = [w0w1...w M-1 ] T , 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.

[0055] For example, in a call scenario, as shown in Figure 3, the far-end signal is played by the speaker and propagates through the actual echo path to the microphone as signal r(n). Signal r(n) is collected by the microphone, along with the near-end human voice v(n). Therefore, the near-end signal y(n) contains both signal r(n) and the near-end human voice v(n). The actual echo path is simulated by a filter to estimate the echo portion r′(n): r′(n) = W T X

[0056] Therefore, the desired near-end human voice v′(n) is obtained: v′(n)=y(n)-r′(n)

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

[0058] For signal block a and signal block b, the number of signal blocks between signal block a and signal block b is determined, and it is determined whether the number of signal blocks between signal block a and signal block b is greater than a preset number. Exemplarily, the preset number is set to 2. It should be noted that the preset number can be flexibly set based on actual circumstances and is not limited in this disclosure.

[0059] 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. At this time, the signal blocks a1 and a2 adjacent to the right of signal block a, and the signal blocks b1 and b2 adjacent to the right of signal block b are found. Based on signal block a, signal block a1, signal block a2, and signal block b, signal block b1, and signal block b2, it is determined whether the filter coefficients converge.

[0060] In some embodiments, determining whether the filter coefficients converge 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 block b1 and the signal block b2 adjacent to the right of the signal block b includes: 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; and calculating the absolute value m of the difference between the mean 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 the Φ1 a1 , the absolute value m of the difference between the mean value corresponding to the signal block a2 and the Φ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 the Φ1 b2 If the m a 、m a1 、m a2 、m b 、m b1 、m b2 and the Φ1 meet the first preset condition, then 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.

[0061] For μ0, μ1…μ M-1 Among these M means, excluding the 6 means of the 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.

[0062] Then, calculate the difference m between the mean value and Φ1 corresponding to the signal block a 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 of signal block b1 and Φ1 b1, the difference m between the mean value corresponding to the signal block b2 and Φ1 b2 .

[0063] 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; otherwise, 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.

[0064] 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 * Φ1, and m b2 < k3 * Φ1; the k1, k2, k3 are preset coefficients.

[0065] For example, k1 = 2, k2 = 1.9, k3 = 1.8 are preset in advance. It should be noted that k1, k2, k3 can be flexibly set according to the actual situation and are not limited in this disclosure.

[0066] Assume that k1 = 2, k2 = 1.9, k3 = 1.8 are preset in advance, 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.

[0067] When the filter coefficients converge, for example, as shown in FIG4 , the filter coefficients exhibit a clear peak, and the filter can effectively eliminate leakage echoes. 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.

[0068] When the filter coefficients do not converge, for example, as shown in FIG5 , the filter coefficients have no obvious peaks and the filter cannot effectively eliminate the leakage echo. Therefore, if the filter coefficients do not converge, it can be determined that leakage echo currently exists.

[0069] 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 are not converged and a leakage echo currently exists; otherwise, it is determined that the filter coefficients are converged and no leakage echo currently exists.

[0070] 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. At this time, 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.

[0071] In some embodiments, determining whether the filter coefficients converge based on the signal block a and the signal blocks a1 and a2 adjacent to the right of the signal block a includes: 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 an 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 、n a1 、n a2 If Φ2 does not satisfy the second preset condition, it is determined that the filter coefficients converge.

[0072] Similarly, for μ0, μ1... μ 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, calculate the average of the remaining M - 3 means to obtain the average value Φ2.

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

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

[0075] Exemplarily, that n a , n a1 , n a2 and Φ2 satisfy the second preset condition includes: n a < k1 * Φ2, and n a1 < k2 * Φ2, and n a2 < k3 * Φ2; the k1, k2, and k3 are preset coefficients.

[0076] 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, it is determined that there is a current echo leakage; otherwise, it is determined that there is no current echo leakage.

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

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

[0079] The second step is to detect the status of the microphone and speaker, and whether both are turned on; if both are 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;

[0080] The third step is to perform vad judgment on the frame ref signal and the frame echo signal. 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.

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

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

[0083] Calculate the filter coefficient 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 so, execute 1); otherwise, execute 2).

[0084] 1) Find signal block a, the first signal block a1 to the right of signal block a, and the second signal block a2. Also find signal block b, the first signal block b1 to the right of signal block b, and the second signal block b2. 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 value of the absolute value 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 . To 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 determined that there is a leakage echo; otherwise, if the above relationship is not met, it is determined that there is no leakage echo;

[0085] 2) Find signal block a, the first signal block a1 to the right of signal block a, and the second signal block a2, 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 determined that there is a leakage echo; otherwise, if the above relationship is not met, it is determined that there is no leakage echo;

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

[0087] The above-mentioned method for detecting leaked echo requires little computation and can be used in real time. Furthermore, compared with the existing method of detecting leaked echo by calculating the correlation between the signal and the far-end signal, there is no need for delay calculation, and leaked echo detection is not affected by delay and is more stable.

[0088] 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 preset conditions, it is determined whether the filter coefficients have converged. If the filter coefficients have converged, it is determined that no leakage echo is currently present. If the filter coefficients have not converged, it is determined that a leakage echo is currently present. There is no need to perform delay calculation, and leakage echo detection is not affected by the delay. Therefore, the stability and reliability of leakage echo detection are improved.

[0089] An embodiment of the present disclosure further provides a terminal. Please refer to FIG7 , which is a schematic block diagram of the terminal provided by an embodiment of the present disclosure.

[0090] As shown in FIG7 , the terminal 200 may include a processor 210 and a memory 220 . The processor 210 and the memory 220 are connected via a bus, such as an I2C (Inter-integrated Circuit) bus.

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

[0092] For example, the memory 220 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk, etc. The memory 220 stores various computer programs for execution by the processor 210 .

[0093] The processor 210 is configured to run a computer program stored in the memory and implement the following steps when executing the computer program:

[0094] Obtain far-end and near-end signals;

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

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

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

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

[0099] 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 containing 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.

[0100] 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:

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

[0102] If the current frame far-end signal and the current frame near-end signal include the preset type information, accumulating the number of signal frames;

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

[0104] 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.

[0105] 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 configured to:

[0106] performing noise filtering on the current frame far-end signal and the current frame near-end signal;

[0107] Perform voice activity detection (VAD) on the current frame far-end signal and the current frame near-end signal after noise filtering.

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

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

[0110] 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 a maximum value among the means of the preset number of blocks, and the second mean is a second maximum value among the means of the preset number of blocks;

[0111] 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 are converged 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;

[0112] 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 to the right of the signal block a.

[0113] In some embodiments, when the processor 210 implements the determining of whether the filter coefficients converge 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, the processor 210 is configured to implement:

[0114] Calculating an average value of the other means of the predetermined 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;

[0115] 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 the Φ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 ;

[0116] 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;

[0117] 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.

[0118] 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; the k1, k2, and k3 are preset coefficients.

[0119] 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:

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

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

[0122] 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;

[0123] 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.

[0124] The terminal 200 can execute the leaked echo detection method provided in the embodiment of the present disclosure, and thus can achieve the beneficial effects that can be achieved by the leaked echo detection method provided in the embodiment of the present disclosure. Please refer to the previous embodiment for details, which will not be repeated here.

[0125] The embodiments of the present disclosure further provide 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 missed echo detection methods provided in the description of the embodiments of the present disclosure.

[0126] The storage medium may be an internal storage unit of the terminal described in the aforementioned 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 media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal.

[0127] 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 is well 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 tape, 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 skilled in the art that communication media generally embodies 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.

[0128] It should be understood that the term "and / or" as used in this disclosure 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 variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system that includes a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements that are 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 that includes the element.

[0129] The serial numbers of the embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments. The above are only embodiments of the present disclosure, but the scope of protection of the present disclosure 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 disclosure, and these modifications or replacements should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. A method for detecting a leaked echo, 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, wherein: 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, wherein: 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, wherein: 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, wherein: 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, wherein: 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 mean value corresponding to the signal block a1 and the Φ1 The absolute value of the difference m 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, wherein: 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; wherein, the k1, k2, and k3 are preset coefficients.

8. The method according to claim 5, wherein: 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, comprising: 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 leak echo detection method according to any one of claims 1 to 8 is realized.

10. 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 leakage echo detection method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Echo cancellation method, system and device

    CN102185991A

  • Echo elimination system, echo elimination method, readable computer storage medium and terminal

    CN109961798A

  • Echo cancellation method and device and computer storage medium

    CN111445917A

  • Echo cancellation method and device, storage medium and electronic equipment

    CN113936682A

  • Echo canceler and echo canceling method

    US20080175375A1