Nonlinear echo cancellation method and apparatus, and electronic device
By converting the signal from the frequency domain to the measurement domain and calculating the mutual coherence coefficient, combined with smoothing parameters and post-processing techniques, the influence of Gaussian white noise on the echo cancellation algorithm is resolved, achieving more accurate nonlinear echo suppression, reducing computational load and improving signal quality.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- ZHEJIANG XINMAI SILICON CO LTD
- Filing Date
- 2025-06-03
- Publication Date
- 2026-06-04
AI Technical Summary
Existing echo cancellation algorithms, in the presence of Gaussian white noise, introduce additional phase differences and amplitude fluctuations due to the randomness of the noise, resulting in a decrease in the coherence coefficient. This is especially true in low signal-to-noise ratio situations, affecting the coherence of the speech signal and leading to an increase in the misjudgment rate.
Compressed sensing theory is used to convert far-end signals, near-end signals and error signals from the frequency domain to the measurement domain. The mutual interference coefficient is calculated and nonlinear suppression is performed. The smoothing parameter is adjusted according to the speech state to reduce the influence of Gaussian white noise. Post-processing is performed through the orthogonal matching pursuit algorithm.
It effectively reduces the misjudgment rate of Gaussian white noise on coherence, reduces the amount of computation, improves the accuracy and efficiency of echo cancellation, and avoids speech loss caused by nonlinear suppression.
Smart Images

Figure CN2025098798_04062026_PF_FP_ABST
Abstract
Description
A nonlinear echo cancellation method, apparatus and electronic device Technical Field
[0001] This invention relates to the field of echo cancellation technology, and more particularly to a nonlinear echo cancellation method, apparatus, and electronic device. Background Technology
[0002] In recent years, the development of the internet has driven the widespread application of real-time communication technologies such as VoIP and video conferencing. At the same time, voice quality has received increasing attention, with acoustic echo being one of the most critical factors. In actual communication devices, the audio signal, after being played through a speaker and propagating through the air, may experience nonlinear distortions such as harmonic distortion and dynamic compression due to device characteristics or environmental changes. This nonlinearity results in nonlinear characteristics in the echo path, which severely affects call quality.
[0003] Currently, the most mature and widely used echo cancellation algorithm is the one from Google's open-source WebRTC. To reduce these nonlinear distortions, an adaptive filter is used to adjust the echo cancellation effect, and a nonlinear processing module is introduced to handle nonlinear problems. Its principle is to convert the time-domain signal to the Fourier transform domain, calculate the coherence of each frequency band, and determine whether there is an echo in the near-end signal.
[0004] However, the existing echo cancellation algorithms have some drawbacks. For example, the randomness of adding Gaussian white noise introduces additional phase differences and amplitude fluctuations, leading to a decrease in the calculated coherence coefficient. This effect is particularly pronounced at low signal-to-noise ratios (SNR), potentially causing a significant decrease in signal coherence. Since Gaussian white noise has a uniform effect on all frequency components, it may mask the phase consistency of certain frequency components in the speech signal when calculating coherence, making the coherence unreliable in these frequency ranges. Summary of the Invention
[0005] The purpose of this invention is to reduce the misjudgment rate of coherence caused by Gaussian white noise in far-end signals, near-end signals, and error signals, and to provide a nonlinear echo cancellation method, apparatus, and electronic device.
[0006] Technical solution:
[0007] According to one aspect of this disclosure, a nonlinear echo cancellation method is provided, comprising:
[0008] The echo cancellation signal is acquired and converted from a time-domain signal to a frequency-domain signal; the echo cancellation signal includes the far-end signal, near-end signal, and error signal of the current frame;
[0009] The frequency domain signal is converted into a measurement domain signal. Smoothing parameters are preset based on whether the speech state of the near-end signal in the measurement domain changes. A power spectrum parameter set is calculated based on each frequency point in the measurement domain, the measurement domain signal, and the smoothing parameters. The mutual interference coefficient is calculated based on the power spectrum parameter set. The mutual interference coefficient includes: the mutual interference coefficient between the far-end signal and the near-end signal, denoted as the far-end and near-end mutual interference coefficient, and the error mutual interference coefficient between the near-end signal and the error signal, denoted as the near-end error mutual interference coefficient.
[0010] The presence of echo in the current frame is determined by the far-end and near-end cross-interference coefficients and the near-end error cross-interference coefficient at each frequency point in the measurement domain. Based on the determination results, nonlinear suppression is performed to obtain a nonlinear echo suppression signal based on the measurement domain.
[0011] The nonlinear echo suppression signal in the measurement domain is converted into a nonlinear echo suppression signal based on the frequency domain, and the nonlinear echo suppression signal based on the frequency domain is post-processed to obtain a frequency-domain output signal. The frequency-domain output signal is then converted into a time-domain signal.
[0012] According to another aspect of this disclosure, a nonlinear echo cancellation device is provided, applied to a terminal device, comprising:
[0013] The acquisition module is used to acquire the echo cancellation signal and convert it from a time-domain signal to a frequency-domain signal; wherein, the echo cancellation signal includes the far-end signal, the near-end signal, and the error signal of the current frame;
[0014] The measurement domain module is used to convert the frequency domain signal into the measurement domain signal. It pre-sets smoothing parameters based on whether the speech state of the near-end signal in the measurement domain changes. It calculates a power spectrum parameter set based on each frequency point in the measurement domain, the measurement domain signal, and the smoothing parameters. It then calculates the cross-coherence coefficient based on the power spectrum parameter set. The cross-coherence coefficient includes the cross-coherence coefficient between the far-end signal and the near-end signal, denoted as the far-end-near-end cross-coherence coefficient, and the error cross-coherence coefficient between the near-end signal and the error signal, denoted as the near-end error cross-coherence coefficient.
[0015] The cancellation module is used to determine whether there is an echo in the current frame based on the far-end and near-end cross-interference coefficients and the near-end error cross-interference coefficients at each frequency point in the measurement domain, and to obtain a nonlinear echo suppression signal based on the measurement domain by performing nonlinear suppression based on the judgment result.
[0016] The conversion module is used to convert the nonlinear echo suppression signal in the measurement domain into a nonlinear echo suppression signal based on the frequency domain, and to perform post-processing on the nonlinear echo suppression signal based on the frequency domain to obtain a frequency-domain output signal, and then convert the frequency-domain output signal into a time-domain signal.
[0017] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by at least one processor, which enables the at least one processor to perform any of the above-described nonlinear echo cancellation methods.
[0019] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to perform any of the above-described nonlinear echo cancellation methods.
[0020] Beneficial effects: Using compressed sensing theory to preprocess the far-end signal, near-end signal, and error signal, that is, converting the far-end signal, near-end signal, and error signal in the frequency domain into the far-end signal, near-end signal, and error signal in the compressed sensing measurement domain, and then further calculating one or more coherences between these signals, not only reduces the misjudgment rate of Gaussian white noise in the far-end signal, near-end signal, and error signal that affects coherence;
[0021] By compressing the measurement matrix of the compressed sensing, the length of the signal in the measurement domain is made smaller than the length of the signal in the time domain, which reduces the computational load of the algorithm.
[0022] Depending on whether the speech state of the near-end signal changes, different smoothing parameters are used to smooth the cross-power spectrum between the far-end and near-end signals, the cross-power spectrum between the near-end and error signals, the power spectrum of the far-end signal, the power spectrum of the near-end signal, and the power spectrum of the error signal. This can accelerate convergence and avoid some subtle fluctuations in the extra-spectral density. Attached Figure Description
[0023] Figure 1 is a flowchart of a nonlinear echo cancellation method according to Embodiment 1 of the present invention;
[0024] Figure 2 is a schematic diagram of a nonlinear echo cancellation device according to Embodiment 2 of the present invention. Detailed Implementation
[0025] To make the technical solution of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0026] Example 1: Figure 1 is a flowchart of a nonlinear echo cancellation method provided in Example 1 of this disclosure.
[0027] In the above embodiments, the nonlinear echo cancellation method is applied to a terminal device with communication and / or human-computer interaction functions, wherein the terminal device can be a mobile phone, tablet computer, etc. During communication, the microphone input signal of the terminal device includes a near-end signal, i.e., the user's input voice signal, as well as linear echo signals and nonlinear echo signals. The purpose of this echo cancellation method is to solve the problem of algorithm failure caused by Gaussian white noise when using coherence for nonlinear suppression in existing technologies. It proposes a coherence coefficient based on the compressed sensing measurement domain (hereinafter referred to as the "measurement domain") to determine whether there is an echo in the near-end signal of the current frame and to perform nonlinear suppression, thereby solving the problem of algorithm failure caused by Gaussian white noise in existing technologies and obtaining a relatively clean near-end signal.
[0028] As shown in Figure 1, it includes:
[0029] Step S101: Obtain the echo cancellation signal and convert the echo cancellation signal from the time domain signal to the frequency domain signal; wherein, the echo cancellation signal includes the far end signal, the near end signal and the error signal of the current frame;
[0030] Preferably, Fourier transform can be used to convert the signal to be echo-cancelled from a time-domain signal to a frequency-domain signal;
[0031] In a preferred embodiment, in the echo cancellation algorithm, the echo cancellation signal to be canceled in the current frame includes: a far-end signal. Near-end signal Error signal obtained after linear echo cancellation The signal length is Fourier transforms were performed on each signal to obtain the far-end signal based on the frequency domain. Near-end signal Error signal obtained after linear echo cancellation The signal length is .
[0032] Step S102: Convert the frequency domain signal into a measurement domain signal. Pre-set smoothing parameters based on whether the speech state of the near-end signal in the measurement domain changes. Calculate a power spectrum parameter set based on each frequency point in the measurement domain, the measurement domain signal, and the smoothing parameters. Calculate the cross-coherence coefficient based on the power spectrum parameter set. The cross-coherence coefficient includes: the cross-coherence coefficient between the far-end signal and the near-end signal, denoted as the far-end-near-end cross-coherence coefficient; and the error cross-coherence coefficient between the near-end signal and the error signal, denoted as the near-end error cross-coherence coefficient.
[0033] In the above embodiments, compressed sensing theory is used to convert the error signal, far-end signal and near-end signal obtained after linear filtering in the echo cancellation algorithm from the frequency domain to the measurement domain. Then, the mutual coherence between the error signal, far-end signal and near-end signal based on the measurement domain is calculated, avoiding the influence of Gaussian white noise.
[0034] Specifically, compressed sensing theory is used to preprocess the far-end signal, near-end signal, and error signal, that is, to convert the far-end signal, near-end signal, and error signal in the frequency domain into the far-end signal, near-end signal, and error signal in the compressed sensing measurement domain. Then, one or more coherences between these signals are further calculated, which not only reduces the false judgment rate of coherence affected by Gaussian white noise in the far-end signal, near-end signal, and error signal.
[0035] It should be noted that the basic principle of compressed sensing theory is that for compressible signals or signals that are sparse in a certain transform domain, a low-dimensional projection can be performed, and then a compressed sensing reconstruction algorithm can be applied to recover the signal. Its mathematical model is shown in the following formula:
[0036] (1)
[0037] in, Indicates length is The one-dimensional original signal;
[0038] Indicates length is One-dimensional compressed sensing measurement signal;
[0039] Indicates size is The measurement matrix.
[0040] Since compressed sensing theory is based on signals The sparsity of the signal, if called the sparsity of the signal If the data is sparse, then after projection, most of the projection coefficients will be zero, with only a few being non-zero. The mathematical representation is shown in the following formula:
[0041] (2)
[0042] in, Represents an orthogonal basis matrix;
[0043] Indicates length is The one-dimensional projection coefficients are also called sparse signals.
[0044] Combining formulas (1) and (2), we can obtain the following formula:
[0045] (3)
[0046] To restore the original signal The sparse signal needs to be obtained by solving the inverse of formula (3). By transforming the inverse problem of equation (3) into minimization The norm problem yields the following formula:
[0047] (4)
[0048] in This represents the number of non-zero elements in the vector. However, solving formula (4) is an NP (Non-deterministic Polynomial) problem, which needs to be transformed into... The problem of minimizing the norm is approximated to obtain formula (5):
[0049] (5)
[0050] Step S102 specifically includes:
[0051] Step S1021: The frequency domain signal is mapped onto the sensing measurement domain using compressed sensing theory to convert the frequency domain signal into a measurement domain signal, as shown in the following formula:
[0052] (6)
[0053] (7)
[0054] (8)
[0055] in, Used to represent far-end signals based on the measurement domain. Used to represent frequency-domain based far-end signals;
[0056] Used to represent near-end signals based on the measurement domain. Used to represent near-end signals based on the frequency domain;
[0057] Used to represent the error signal obtained after linear echo cancellation based on the measurement domain. Used to represent the error signal obtained after linear echo cancellation based on the frequency domain;
[0058] Indicates size is The measurement matrix, where, Used to represent the signal length of a time-domain signal Used to represent the signal length of the measurement domain signal ;
[0059] In the above embodiments, the compression of the compressed sensing measurement matrix makes the length of the measurement domain signal smaller than the required frequency domain signal length (half the length of the time domain signal plus one), thus reducing the computational load of the algorithm.
[0060] Step S1022, calculated as follows, is based on each frequency point of the sensing measurement domain, the measurement domain signal, and pre-set smoothing parameters:
[0061] The cross-power spectrum between the far-end and near-end signals based on the measurement domain is denoted as the far-end and near-end cross-power spectrum.
[0062] (9)
[0063] in, Indicates the first frame, Used to represent frequency points based on the measurement domain. ;
[0064] Used to represent computational conjugate;
[0065] Used to represent the far-to-near-end cross-power spectrum based on the measurement domain;
[0066] Used to represent smoothing parameters;
[0067] The cross-power spectrum between the near-end signal and the error signal in the measurement domain is denoted as the near-end error cross-power spectrum.
[0068] (10)
[0069] in, Used to represent the cross-power spectrum of near-end error based on the measurement domain;
[0070] And the power spectra of far-end signals, near-end signals, and error signals based on the measurement domain;
[0071] (11)
[0072] (12)
[0073] (13)
[0074] in, Power spectrum used to represent far-end signals based on the measurement domain;
[0075] Power spectrum used to represent near-end signals based on the measurement domain;
[0076] Power spectrum used to represent error signals based on the measurement domain.
[0077] Step S102 also includes:
[0078] Step S1023: The speech endpoint detection algorithm is used to pre-set the corresponding smoothing parameters according to whether the speech state of the near-end signal changes. The smoothing parameters include a first smoothing parameter and a second smoothing parameter, and the first smoothing parameter is smaller than the second smoothing parameter.
[0079] Specifically, it includes the following formula:
[0080] When the speech state of the near-end signal changes, set the first smoothing parameter;
[0081] It should be noted that the change in the speech state of the near-end signal includes the following two situations:
[0082] Case 1: From noise zone to speech zone: The current frame of the near-end signal is a speech frame (there is near-end speech or far-end echo) and the previous frame is a silent frame (does not contain speech information);
[0083] Scenario 2: From speech area to noise area: When the current frame of the near-end signal is a silent frame and the previous frame is a speech frame;
[0084] Set the second smoothing parameter when the speech state of the near-end signal does not change;
[0085] It should be noted that the lack of change in the speech state of the near-end signal includes the following two situations:
[0086] Case 1: Continuous speech area: The current frame of the near-end signal is a speech frame and the previous frame was also a speech frame;
[0087] Scenario 2: Persistent Noise Zone: The current frame of the near-end signal is a silent frame and the previous frame was also a silent frame;
[0088] As shown in the following formula:
[0089] (14)
[0090] in,
[0091] Used to represent smoothing parameters;
[0092] Used to represent the first smoothing parameter;
[0093] Used to represent the second smoothing parameter;
[0094] Speech endpoint detection results used to represent near-end signals.
[0095] In the above embodiments, when the speech state of the near-end signal changes, a smaller smoothing parameter is used to smooth the smooth cross-power spectrum between the far-end and near-end signals, the smooth cross-power spectrum between the near-end and error signals, the power spectrum of the far-end signal, the power spectrum of the near-end signal, and the power spectrum of the error signal to speed up convergence. In the speech region or noise region, a larger smoothing parameter is used to avoid some subtle fluctuations in the spectrum, which could lead to musical noise in the output signal of nonlinear suppression.
[0096] Step S102 includes:
[0097] S1024, the mutual coherence coefficient is calculated based on the power spectral parameter set, specifically including:
[0098] The cross-coherence coefficient between the far-end and near-end signals is calculated based on the cross-power spectra of the far-end and near-end signals, and is denoted as the far-end / near-end cross-coherence coefficient, as shown in the following formula:
[0099] (15)
[0100] in, Used to represent the mutual interference coefficient between the distal and proximal ends;
[0101] The cross-coherence coefficient between the near-end signal and the error signal is calculated based on the cross-power spectrum of the near-end error, the power spectrum of the near-end signal, and the power spectrum of the error signal. This coefficient is denoted as the cross-coherence coefficient of the near-end error.
[0102] (16)
[0103] in, Used to represent the mutual coherence coefficient of near-end errors.
[0104] Step S103: Determine whether there is an echo in the current frame based on the far-end and near-end cross-interference coefficients and near-end error cross-interference coefficients of each frequency point in the sensing measurement domain; and perform nonlinear suppression based on the determination result to obtain a nonlinear echo suppression signal based on the measurement domain.
[0105] Step S103 specifically includes:
[0106] Step S1031: Count the number of far-end and near-end cross-coherence coefficients and near-end error cross-coherence coefficients of the frequency points of the current frame based on the measurement domain that meet the first preset condition. When the number of those meeting the first preset condition is greater than the first preset number, determine that the current frame has no echo. The echo suppression coefficient is the cross-coherence coefficient of the near-end signal and the error signal, as shown in the following formula:
[0107] (17)
[0108] in, Used to represent the echo suppression coefficient;
[0109] As a preferred embodiment, the first preset condition can be: and , It is a positive real number greater than 1;
[0110] Specifically, statistics are based on frequency points in the measurement domain. China satisfies and The number of echoes, num, is used. If num is greater than the first preset number, then the current frame is determined to be echo-free, and the echo suppression coefficient is set. for ( ).
[0111] Step S1032: Count the number of far-end and near-end cross-coherence coefficients and near-end error cross-coherence coefficients of the frequency points of the current frame based on the measurement domain that meet the second preset condition. When the number of those meeting the second preset condition is greater than the second preset number, it is determined that the current frame has an echo. Set the echo suppression coefficient according to the cross-coherence coefficients of the far-end and near-end signals, and the error cross-coherence coefficients of the near-end and error signals, as shown in the following formula:
[0112] (18)
[0113] As a preferred embodiment, the second preset condition can be: or , It is a positive real number greater than 1;
[0114] Specifically, statistics are based on frequency points in the measurement domain. China satisfies or The number of echoes, num, is used. If num is greater than a certain number, the current frame is considered to contain an echo. The echo suppression coefficient is... .
[0115] Step S1033: Perform nonlinear suppression on the current frame based on the echo suppression coefficient to obtain a nonlinear echo suppression signal based on the measurement domain, as shown in the following formula:
[0116] (19)
[0117] in, Used to represent nonlinear echo suppression signals based on the measurement domain.
[0118] In the above embodiments, based on each frequency point in the compressed sensing measurement domain, the coherence of the far-end signal, near-end signal and error signal in the measurement domain is calculated, that is, the mutual coherence coefficient between the far-end signal and the near-end signal and the mutual coherence coefficient between the near-end signal and the error signal are calculated. Based on these coherence coefficients, it is determined whether the current near-end signal contains an echo signal, thereby calculating the corresponding echo suppression coefficient for each frequency band, and further suppressing the residual echo signal in the near-end signal.
[0119] Step S104: Convert the nonlinear echo suppression signal in the measurement domain into a nonlinear echo suppression signal based on the frequency domain, and perform post-processing on the nonlinear echo suppression signal based on the frequency domain to obtain a frequency-domain output signal, and then convert the frequency-domain output signal into a time-domain signal.
[0120] Step S104 specifically includes:
[0121] Step S1041: Use the orthogonal matching pursuit algorithm to convert the nonlinear echo signal based on the measurement domain into a nonlinear echo suppression signal based on the frequency domain.
[0122] Step S1042: Post-process the frequency-domain-based nonlinear echo suppression signal to obtain the frequency-domain-based output signal, as shown in the following formula:
[0123] (20)
[0124] in, This indicates that the error signal E obtained after linear echo cancellation based on the frequency domain is subjected to conjugate transpose.
[0125] Used to represent frequency-domain based output signals;
[0126] Used to represent frequency-domain based nonlinear echo suppression signals.
[0127] In the above embodiments, post-processing is performed by convolving the frequency-domain error signal and the output of nonlinear suppression to avoid excessive suppression by the nonlinear suppression algorithm, which could lead to speech loss.
[0128] Step S1043: Convert the frequency-domain-based output signal into a time-domain signal;
[0129] Preferably, the inverse Fourier transform can be used to convert the frequency-domain-based output signal into a time-domain signal;
[0130] Specifically, the frequency-domain-based output signal of the nonlinear echo suppression is subjected to inverse Fourier transform. The signals are then overlapped and added together to convert them into time-domain signals. .
[0131] Example 2: The nonlinear echo cancellation device provided in this disclosure will be described below with reference to Figure 2.
[0132] Figure 2 is a structural schematic diagram of the nonlinear echo cancellation device provided according to Embodiment 2 of this disclosure. The nonlinear echo cancellation device is applied to a terminal device, as shown in Figure 2, and includes:
[0133] The acquisition module is used to acquire the echo cancellation signal and convert it from a time-domain signal to a frequency-domain signal; wherein, the echo cancellation signal includes the far-end signal, the near-end signal, and the error signal of the current frame;
[0134] The measurement domain module is used to convert the frequency domain signal into the measurement domain signal. It pre-sets smoothing parameters based on whether the speech state of the near-end signal in the measurement domain changes. It calculates a power spectrum parameter set based on each frequency point in the measurement domain, the measurement domain signal, and the smoothing parameters. It then calculates the cross-coherence coefficient based on the power spectrum parameter set. The cross-coherence coefficient includes the cross-coherence coefficient between the far-end signal and the near-end signal, denoted as the far-end-near-end cross-coherence coefficient, and the error cross-coherence coefficient between the near-end signal and the error signal, denoted as the near-end error cross-coherence coefficient.
[0135] The cancellation module is used to determine whether there is an echo in the current frame based on the far-end and near-end cross-interference coefficients and the near-end error cross-interference coefficients at each frequency point in the sensing measurement domain, and to obtain a nonlinear echo suppression signal based on the measurement domain by performing nonlinear suppression based on the judgment result.
[0136] The conversion module is used to convert the nonlinear echo suppression signal in the measurement domain into a nonlinear echo suppression signal based on the frequency domain, and to perform post-processing on the nonlinear echo suppression signal based on the frequency domain to obtain a frequency-domain output signal, and then convert the frequency-domain output signal into a time-domain signal.
[0137] In the above embodiments, compressed sensing theory is used to preprocess the far-end signal, near-end signal and error signal, that is, the far-end signal, near-end signal and error signal in the frequency domain are converted into the far-end signal, near-end signal and error signal in the compressed sensing measurement domain, and then one or more coherences between these signals are further calculated. This not only reduces the false judgment rate of coherence affected by Gaussian white noise in the far-end signal, near-end signal and error signal.
[0138] By compressing the measurement matrix of the compressed sensing, the length of the signal in the measurement domain is made smaller than the length of the signal in the time domain, which reduces the computational load of the algorithm.
[0139] Depending on whether the speech state of the near-end signal changes, different smoothing parameters are used to smooth the cross-power spectrum between the far-end and near-end signals, the cross-power spectrum between the near-end and error signals, the power spectrum of the far-end signal, the power spectrum of the near-end signal, and the power spectrum of the error signal. This can accelerate convergence and avoid some subtle fluctuations in the spectrum.
[0140] The nonlinear echo cancellation device provided in this embodiment is implemented in the same way as the nonlinear echo cancellation method provided in Embodiment 1, and will not be described again here.
[0141] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0142] An electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the nonlinear echo cancellation method described in the preceding aspect.
[0143] One of the methods is a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the nonlinear echo cancellation method described in the preceding aspect.
[0144] One of the computer program products includes a computer program that, when executed by a processor, implements the nonlinear echo cancellation method described in the preceding aspect.
[0145] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0146] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0147] Any process or method described in the flowchart or otherwise herein can be understood as representing a unit, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0148] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.
[0149] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium. When executed, the program includes one or a combination of the steps of the method embodiments.
[0150] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A nonlinear echo cancellation method, characterized in that, include: The echo cancellation signal to be acquired is converted from a time-domain signal to a frequency-domain signal. The echo cancellation signal includes the far-end signal, near-end signal, and error signal of the current frame. The frequency-domain signal is converted to a measurement-domain signal. A smoothing parameter is pre-set based on whether the speech state of the near-end signal in the measurement domain changes. A power spectrum parameter set is calculated based on each frequency point in the measurement domain, the measurement-domain signal, and the smoothing parameter. The cross-coherence coefficient is calculated based on the power spectrum parameter set. The cross-coherence coefficient includes: the cross-coherence coefficient between the far-end signal and the near-end signal, denoted as the far-near-end cross-coherence coefficient; and the error cross-coherence coefficient between the near-end signal and the error signal, denoted as the near-end error cross-coherence coefficient. The measurement domain signal is a compressed sensing measurement domain signal obtained based on compressed sensing theory. The presence of echo in the current frame is determined based on the far-end and near-end cross-coherence coefficients and the near-end error cross-coherence coefficient at each frequency point in the measurement domain. Nonlinear suppression is then applied based on the determination result to obtain a nonlinear echo suppression signal based on the measurement domain. This nonlinear echo suppression signal is then converted into a frequency-domain nonlinear echo suppression signal, and post-processed to obtain a frequency-domain output signal. Finally, the frequency-domain output signal is converted into a time-domain signal. Specifically, the conversion of the frequency-domain signal to the measurement domain signal involves calculating a power spectrum parameter set based on each frequency point in the measurement domain, the measurement domain signal, and smoothing parameters. The frequency domain signal is mapped onto the measurement domain using compressed sensing theory to convert the frequency domain signal into a measurement domain signal, as shown in the following formula: ; ; ; in, Used to represent far-end signals based on the measurement domain. Used to represent frequency-domain based far-end signals; Used to represent near-end signals based on the measurement domain. Used to represent near-end signals based on the frequency domain; Used to represent the error signal obtained after linear echo cancellation based on the measurement domain. Used to represent the error signal obtained after linear echo cancellation based on the frequency domain; Indicates size is The measurement matrix, where, Used to represent the signal length of a time-domain signal Used to represent the signal length of the measurement domain signal ; As shown in the following formula, based on each frequency point of the measurement domain, the measurement domain signal, and the pre-set smoothing parameters, the following is calculated: based on the cross power spectrum between the far-end signal and the near-end signal of the measurement domain, denoted as the far-end near-end cross power spectrum; ; in, Indicates the first frame, Used to represent frequency points based on the measurement domain. ; Used to represent computational conjugate; Used to represent the far-to-near-end cross-power spectrum based on the measurement domain; Used to represent smoothing parameters; based on the cross-power spectrum between the near-end signal and the error signal in the measurement domain, it is denoted as the near-end error cross-power spectrum; ; in, Used to represent the cross power spectrum of near-end error based on the measurement domain; and the power spectra of far-end signal, near-end signal and error signal based on the measurement domain; ; ; ; in, Power spectrum used to represent far-end signals based on the measurement domain; Power spectrum used to represent near-end signals based on the measurement domain; Power spectrum used to represent error signals based on the measurement domain; Specifically, the calculation of the mutual coherence coefficient based on the power spectral parameter set includes: The far-to-near-end cross-power spectrum, the power spectrum of the far-end signal, and the power spectrum of the near-end signal are used to calculate the far-to-near-end cross-coherence coefficient, as shown in the following formula: ;in, Used to represent the near-end mutual interference coefficient; the near-end mutual interference coefficient is calculated based on the near-end error cross power spectrum, the power spectrum of the near-end signal, and the power spectrum of the error signal; ;in, Used to represent the mutual coherence coefficient of near-end errors.
2. The nonlinear echo cancellation method as described in claim 1, characterized in that, The step of pre-setting smoothing parameters based on whether the speech state of the near-end signal in the measurement domain changes includes: using a speech endpoint detection algorithm to pre-set corresponding smoothing parameters based on whether the speech state of the near-end signal changes, wherein the smoothing parameters include a first smoothing parameter and a second smoothing parameter, and the first smoothing parameter is smaller than the second smoothing parameter; specifically, it includes the following formula: When the speech state of the near-end signal changes, the first smoothing parameter is set; when the speech state of the near-end signal does not change, the second smoothing parameter is set. ; in, Used to represent smoothing parameters; Used to represent the first smoothing parameter; Used to represent the second smoothing parameter; Speech endpoint detection results used to represent near-end signals.
3. The nonlinear echo cancellation method as described in claim 1, characterized in that, The step of determining whether the current frame has an echo based on the far-end and near-end cross-coherence coefficients and the near-end error cross-coherence coefficient at each frequency point in the measurement domain, and performing nonlinear suppression based on the determination result to obtain a nonlinear echo suppression signal based on the measurement domain, specifically includes: counting the number of far-end and near-end cross-coherence coefficients and the near-end error cross-coherence coefficients at the frequency points of the current frame based on the measurement domain that meet a first preset condition; when the number of those meeting the first preset condition is greater than the first preset number, it is determined that the current frame has no echo. The echo suppression coefficient is the cross-coherence coefficient of the near-end signal and the error signal, as shown in the following formula: ;in, Used to represent the echo suppression coefficient; count the number of far-end and near-end cross-coherence coefficients and near-end error cross-coherence coefficients of the frequency points of the current frame based on the measurement domain that meet the second preset condition. When the number of those meeting the second preset condition is greater than the second preset number, it is determined that the current frame has an echo. The echo suppression coefficient is set according to the cross-coherence coefficients of the far-end signal and the near-end signal, and the error cross-coherence coefficients of the near-end signal and the error signal, as shown in the following formula: ; The current frame is nonlinearly suppressed based on the echo suppression coefficient to obtain a nonlinear echo-suppressed signal based on the measurement domain, as shown in the following formula: ; in, Used to represent nonlinear echo suppression signals based on the measurement domain.
4. The nonlinear echo cancellation method as described in claim 1, characterized in that, The process of converting the nonlinear echo suppression signal in the measurement domain into a nonlinear echo suppression signal in the frequency domain, and post-processing the nonlinear echo suppression signal in the frequency domain to obtain a frequency-domain output signal, specifically includes: using an orthogonal matched pursuit algorithm to convert the nonlinear echo signal in the measurement domain into a nonlinear echo suppression signal in the frequency domain. The frequency-domain-based nonlinear echo suppression signal is post-processed to obtain the frequency-domain-based output signal, as shown in the following formula: ; in, This indicates that the error signal E obtained after linear echo cancellation based on the frequency domain is subjected to conjugate transpose. Used to represent frequency-domain based output signals; Used to represent frequency-domain based nonlinear echo suppression signals.
5. The nonlinear echo cancellation method as described in claim 1, characterized in that, The echo cancellation signal is converted from a time-domain signal to a frequency-domain signal using Fourier transform; and / or the frequency-domain-based output signal is converted from a time-domain signal using inverse Fourier transform.
6. A nonlinear echo cancellation device, characterized in that, Applied to a terminal device, the system includes: an acquisition module for acquiring the echo-cancellation signal to be acquired and converting the echo-cancellation signal from a time-domain signal to a frequency-domain signal; wherein the echo-cancellation signal to be acquired includes a far-end signal, a near-end signal, and an error signal of the current frame; and a measurement domain module for converting the frequency-domain signal to a measurement domain signal, pre-setting smoothing parameters based on whether the speech state of the near-end signal in the measurement domain has changed, calculating a power spectrum parameter set based on each frequency point in the measurement domain, the measurement domain signal, and the smoothing parameters, and calculating a cross-coherence coefficient based on the power spectrum parameter set, wherein the cross-coherence coefficient includes the cross-coherence coefficient between the far-end signal and the near-end signal, denoted as the far-near-end cross-coherence coefficient. The system includes the near-end signal and the error cross-coherence coefficient, denoted as the near-end error cross-coherence coefficient. The measurement domain signal is a compressed sensing measurement domain signal obtained based on compressed sensing theory. The cancellation module is used to determine whether there is an echo in the current frame based on the far-end and near-end cross-coherence coefficients and the near-end error cross-coherence coefficient at each frequency point in the measurement domain. Based on the determination result, nonlinear suppression is performed to obtain a nonlinear echo suppression signal based on the measurement domain. The conversion module is used to convert the nonlinear echo suppression signal in the measurement domain into a nonlinear echo suppression signal based on the frequency domain, and to perform post-processing on the nonlinear echo suppression signal based on the frequency domain to obtain a frequency domain output signal. The frequency domain output signal is then converted into a time domain signal. The step of converting the frequency domain signal into a measurement domain signal, and calculating a power spectrum parameter set based on each frequency point in the measurement domain, the measurement domain signal, and a smoothing parameter, specifically includes: mapping the frequency domain signal onto the measurement domain using compressed sensing theory to convert the frequency domain signal into a measurement domain signal, as shown in the following formula: ; ; ; in, Used to represent far-end signals based on the measurement domain. Used to represent frequency-domain based far-end signals; Used to represent near-end signals based on the measurement domain. Used to represent near-end signals based on the frequency domain; Used to represent the error signal obtained after linear echo cancellation based on the measurement domain. Used to represent the error signal obtained after linear echo cancellation based on the frequency domain; Indicates size is The measurement matrix, where, Used to represent the signal length of a time-domain signal Used to represent the signal length of the measurement domain signal As shown in the following formula, based on each frequency point of the measurement domain, the measurement domain signal, and the pre-set smoothing parameters, the cross power spectrum between the far-end and near-end signals of the measurement domain is calculated and denoted as the far-end and near-end cross power spectrum. ; in, Indicates the first frame, Used to represent frequency points based on the measurement domain. ; Used to represent computational conjugate; Used to represent the far-to-near-end cross-power spectrum based on the measurement domain; Used to represent smoothing parameters; The cross-power spectrum between the near-end signal and the error signal in the measurement domain is denoted as the near-end error cross-power spectrum. ; in, Used to represent the cross power spectrum of near-end error based on the measurement domain; and the power spectra of far-end signal, near-end signal and error signal based on the measurement domain; ; ; ; in, Power spectrum used to represent far-end signals based on the measurement domain; Power spectrum used to represent near-end signals based on the measurement domain; Power spectrum used to represent error signals based on the measurement domain; Specifically, the step of calculating the cross-coherence coefficient based on the power spectral parameter set includes: calculating the far-to-near-to-far cross-coherence coefficient based on the far-to-near-to-far cross-power spectrum, the power spectrum of the far-to-far signal, and the power spectrum of the near-to-far signal, as shown in the following formula: ; in, Used to represent the near-end mutual interference coefficient; the near-end mutual interference coefficient is calculated based on the near-end error cross power spectrum, the power spectrum of the near-end signal, and the power spectrum of the error signal; ; in, Used to represent the mutual coherence coefficient of near-end errors.
7. An electronic device, comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method according to any one of claims 1-5.
8. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-5.