Audio processing method and device, equipment and storage medium
By estimating the echo return loss and performing double-talk detection on the audio signal, and combining different filter strategies, the problem of poor flexibility in audio echo cancellation is solved, and a better echo cancellation effect is achieved.
Patent Information
- Application Number
- CN202610170865.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-05
AI Technical Summary
Existing audio echo cancellation technologies lack flexibility, resulting in unsatisfactory echo cancellation effects.
By acquiring the first and second audio signals, echo return loss estimation and dual-talk detection are performed. Based on the echo return loss and dual-talk detection results, different filter strategies are used for echo cancellation.
It improves the flexibility and effectiveness of audio echo cancellation, adapting to echo cancellation needs in different environments and communication states.
Smart Images

Figure CN121983076A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of echo cancellation technology, and more particularly to an audio processing method, apparatus, device, and storage medium. Background Technology
[0002] Echo cancellation is a key technology in audio processing. For example, echo cancellation plays an important role in communication scenarios such as voice communication and video conferencing. However, in related technologies, electronic devices often lack flexibility in echo cancellation, leading to poor echo cancellation results. Summary of the Invention
[0003] This application provides an audio processing method, apparatus, device, and storage medium, aiming to solve the technical problem of poor audio echo cancellation effect caused by poor flexibility in audio echo cancellation.
[0004] Firstly, this application provides an audio processing method, the audio processing method comprising: Acquire a preset audio signal to be processed; the preset audio signal includes a first audio signal and a second audio signal, wherein the first audio signal is different from the second audio signal; Echo return loss is estimated for the first audio signal and the second audio signal to obtain the corresponding echo return loss. Based on the first audio signal and the second audio signal, perform dual-talk detection on the preset audio signal to obtain the dual-talk detection result of the preset audio signal; Based on at least one of the echo return loss and the dual-talk detection result, echo cancellation is performed on the preset audio signal to obtain the target audio signal corresponding to the preset audio signal.
[0005] Secondly, this application provides an audio processing apparatus, the audio processing apparatus comprising: An audio acquisition module is used to acquire a preset audio signal to be processed; the preset audio signal includes a first audio signal and a second audio signal, wherein the first audio signal is different from the second audio signal. The echo return loss estimation module is used to estimate the echo return loss of the first audio signal and the second audio signal to obtain the corresponding echo return loss. A dual-talk detection module is used to perform dual-talk detection on the preset audio signal based on the first audio signal and the second audio signal, and obtain the dual-talk detection result of the preset audio signal; An echo cancellation module is used to perform echo cancellation on the preset audio signal based on at least one of the echo return loss and the dual-talk detection result, so as to obtain the target audio signal corresponding to the preset audio signal.
[0006] Thirdly, this application provides an electronic device, which includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and, in executing the computer program, implement the steps of the audio processing method described above.
[0007] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the audio processing method described above.
[0008] This application provides an audio processing method, apparatus, device, and storage medium. When a preset audio signal to be processed is acquired, including a first audio signal and a second audio signal, and the first and second audio signals are different, the first and second audio signals can be used by an electronic device to estimate echo return loss to determine the corresponding echo return loss. Correspondingly, the first and second audio signals can also be used by the electronic device to perform dual-talk detection on the preset audio signal to determine the dual-talk detection result. Based on this, the electronic device can flexibly perform echo cancellation on the preset audio signal according to at least one of echo return loss and dual-talk detection result to obtain the target audio signal corresponding to the preset audio signal, which improves the flexibility of echo cancellation on the preset audio signal and thus improves the echo cancellation effect. Attached Figure Description
[0009] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A schematic flowchart illustrating an audio processing method provided in an embodiment of this application; Figure 2 This is a schematic block diagram of an audio processing apparatus provided in an embodiment of this application; Figure 3 This is a schematic block diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0012] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0013] This application provides an audio processing method, apparatus, device, and storage medium. The audio processing method can be applied to electronic devices. Electronic devices may include near-eye display devices, self-moving devices, terminal devices, etc., without limitation. Near-eye display devices may include augmented reality (AR) glasses, virtual reality (VR) glasses, mixed reality (MR) glasses, AR headsets, VR headsets, MR headsets, etc., without limitation. Self-moving devices may include robots, etc., without limitation. Terminal devices may include mobile phones, computers, etc., without limitation. The audio processing method can also be applied to servers, which may be standalone servers or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0014] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0015] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating an audio processing method provided in an embodiment of this application. It should be noted that the audio processing method provided in this application embodiment can be used in electronic devices or servers, and is not limited thereto.
[0016] like Figure 1 As shown, the audio processing method includes steps S101 to S104.
[0017] S101. Obtain the preset audio signal to be processed; the preset audio signal includes a first audio signal and a second audio signal, the first audio signal and the second audio signal are different.
[0018] For example, when a user is in a communication scenario such as voice communication or video conferencing, the electronic device can acquire a preset audio signal related to the communication scenario. The preset audio signal may contain acoustic interference, such as acoustic echoes during communication. The preset audio signal can then be used as a preset audio signal to be processed for subsequent echo cancellation to obtain the corresponding target audio signal.
[0019] For example, a preset audio signal may include a first audio signal and a second audio signal. In a communication scenario, the first audio signal may be an audio stream sent from the other end of the electronic device, and thus it can also be called a remote signal or a remote reference signal. For example, the electronic device can acquire the first audio signal sent from a remote signal transmitter, such as a speaker or a corresponding line output. Correspondingly, the second audio signal may be determined based on an audio stream locally acquired by the electronic device, and thus it can also be called a near-end signal or a near-end acquisition signal. For example, the electronic device can acquire the second audio signal of the preset audio signal through a near-end signal receiver, such as a microphone or a corresponding line input. Since the first audio signal is sent from the other end of the electronic device, while the second audio signal is acquired locally by the electronic device, it can be determined that the audio stream directions of the first and second audio signals are different, and therefore, it can be determined that the first and second audio signals are different.
[0020] For example, the preset audio signal can be an audio signal in one of the following states: silent state, one-way talk state, or two-way talk state. The one-way talk state can include a remote one-way talk state or a near-end one-way talk state. For instance, during communication between two parties in a communication scenario, a corresponding preset audio signal can be acquired. If neither party speaks, it can be determined that both the first and second audio signals included in the preset audio signal are inactive, thus determining that the preset audio signal is an audio signal in a silent state. If the user at the other end of the electronic device is speaking, and the user at the local end of the electronic device is not speaking, it can be determined that the first audio signal included in the preset audio signal is active, and the second audio signal is inactive, thus determining that the preset audio signal is an audio signal in a remote one-way talk state. If the user at the other end of the electronic device is not speaking, and the user at the local end of the electronic device is speaking, it can be determined that the first audio signal included in the preset audio signal is inactive, and the second audio signal is active, thus determining that the preset audio signal is an audio signal in a near-end one-way talk state. If the remote user and the local user of the electronic device speak at the same time, it can be determined that both the first audio signal and the second audio signal included in the preset audio signal are active, and thus it can be determined that the preset audio signal is an audio signal in dual-talk mode.
[0021] When a preset audio signal to be processed is obtained, the preset audio signal can be used as a basis for echo cancellation of the preset audio signal to determine the corresponding target audio signal, so as to improve the flexibility of echo cancellation of the preset audio signal in the future, and thus help to improve the echo cancellation effect of the preset audio signal.
[0022] S102. Estimate the echo return loss of the first audio signal and the second audio signal to obtain the corresponding echo return loss.
[0023] For example, upon acquiring a first audio signal and a second audio signal, the electronic device can estimate the echo return loss of the first and second audio signals to obtain the corresponding echo return loss (ERL). ERRL indicates the power attenuation that occurs when the echo generated by the first audio signal after playback from the far-end signal transmitter of the electronic device, via the acoustic or circuit path, reaches the near-end signal receiver of the electronic device. Ideally, the first audio signal, serving as a far-end reference signal, can be approximately equal to the echo generated via the acoustic or circuit path.
[0024] In some implementations, power estimation is performed on the first audio signal to obtain a first signal power of the first audio signal; power estimation is performed on the second audio signal to obtain a second signal power of the second audio signal; and echo return loss corresponding to the first audio signal and the second audio signal is determined based on the first signal power and the second signal power.
[0025] For example, the echo return loss corresponding to the first audio signal and the second audio signal can be expressed as: ; in, The first signal power used to indicate the first audio signal The second signal power is used to indicate the second audio signal.
[0026] The first signal power of the first audio signal It can be represented as: ; The second signal power of the second audio signal It can be represented as: ; in, Used to indicate the nth frame signal of the first audio signal Used to indicate the nth frame signal of the second audio signal Used to indicate the smoothing factor when performing power estimation on a preset audio signal. It is adjustable and is not restricted here.
[0027] Once the first audio signal is acquired, it can be segmented into frames to divide the continuous audio stream into short-term overlapping frames, resulting in a multi-frame signal comprising the first audio signal. Accordingly, the electronic device can apply a window function to each frame of the first audio signal to reduce spectral leakage caused by frame truncation.
[0028] The nth frame signal included in the first audio signal hereinafter referred to as signal For example, electronic devices can calculate signals. The instantaneous power. For example, the signal. It can include multiple samples, and the electronic device can respond to the signal. The sum of squares (i.e., energy) or the mean of the sum of squares (i.e., average power) of all sample values within the frame determines the signal. The instantaneous power. In an exemplary embodiment, the signal The instantaneous power can be expressed as .
[0029] In determining the signal In the case of instantaneous power, based on signal The instantaneous power may fluctuate too much to be suitable for determining the echo return loss corresponding to the first and second audio signals, in order to consider subsequent echo cancellation of the preset audio signal. Electronic devices can adjust the signal... The instantaneous power is recursively smoothed to obtain the signal. First signal power .Signal First signal power This can be used as the first signal power of the first audio signal.
[0030] Based on this, the electronic device can combine the nth frame signal of the first audio signal. instantaneous power The instantaneous power of the (n-1)th frame of the first audio signal and smoothing factor The power of the first audio signal is estimated to obtain the first signal power of the first audio signal. The (n-1)th frame of the first audio signal can be represented as... Then the signal instantaneous power It can be represented as And so on.
[0031] Accordingly, upon acquiring the second audio signal, the electronic device can sequentially perform frame segmentation, windowing, instantaneous power calculation, and recursive smoothing of the instantaneous power to obtain the second signal power of the second audio signal.
[0032] The nth frame signal included in the second audio signal hereinafter referred to as signal For example, in one exemplary implementation, the signal... The instantaneous power can be expressed as Electronic devices can process signals. The instantaneous power is recursively smoothed to obtain the signal. Second signal power .Signal Second signal power This can then be used as the second signal power of the second audio signal. Based on this, the electronic device can combine the nth frame signal of the second audio signal. instantaneous power The instantaneous power of the (n-1)th frame of the second audio signal and smoothing factor The power of the second audio signal is estimated to obtain the second signal power of the second audio signal. The (n-1)th frame of the second audio signal can be represented as... Then the signal instantaneous power It can be represented as And so on.
[0033] Given a first signal power and a second signal power, the electronic device can substitute these power values into the formula for calculating echo return loss to obtain the echo return loss corresponding to the first and second audio signals. The echo return loss corresponding to the first and second audio signals can be used as a basis for determining the corresponding target audio signal when performing echo cancellation on a preset audio signal. This allows for improved flexibility in echo cancellation of the preset audio signal, ultimately enhancing the echo cancellation effect.
[0034] S103. Based on the first audio signal and the second audio signal, perform dual-talk detection on the preset audio signal to obtain the dual-talk detection result of the preset audio signal.
[0035] For example, when the first audio signal and the second audio signal are acquired, the electronic device can perform dual-talk detection on the preset audio signal based on the first audio signal and the second audio signal to determine whether the preset audio signal is in a silent state, a single-talk state or a dual-talk state, and obtain the dual-talk detection result of the preset audio signal.
[0036] In some implementations, based on a first audio signal, autocorrelation estimation is performed on the first audio signal to obtain a first autocorrelation function corresponding to the first audio signal; based on a second audio signal, autocorrelation estimation is performed on the second audio signal to obtain a second autocorrelation function corresponding to the second audio signal; based on the first audio signal and the second audio signal, cross-correlation estimation is performed on the first audio signal and the second audio signal to obtain a cross-correlation function corresponding to the first audio signal and the second audio signal; based on the first autocorrelation function, the second autocorrelation function, and the cross-correlation function, the cross-correlation function is normalized to obtain a normalized cross-correlation function; based on the normalized cross-correlation function, dual-talk detection is performed on a preset audio signal to obtain a dual-talk detection result for the preset audio signal.
[0037] For example, the first autocorrelation function corresponding to the first audio signal can be expressed as: The second autocorrelation function corresponding to the second audio signal can be expressed as: The cross-correlation function of the first audio signal and the second audio signal can be expressed as: The normalized cross-correlation function can be expressed as: .
[0038] The first autocorrelation function corresponding to the first audio signal It can be represented as: ; in, Used to indicate the first audio signal The transpose of .
[0039] The second autocorrelation function corresponding to the second audio signal It can be represented as: ; Cross-correlation function of the first audio signal and the second audio signal It can be represented as: ; Normalized cross-correlation function It can be represented as: ; in, Used to indicate the smoothing factor when performing bilingual detection on a preset audio signal. It is adjustable and is not restricted here.
[0040] Upon acquiring the first audio signal, the electronic device can combine the first audio signal and its corresponding first historical autocorrelation function to perform autocorrelation estimation on the first audio signal, thereby obtaining the first autocorrelation function. The first historical autocorrelation function can be determined based on the first historical audio signal corresponding to the first audio signal. Taking the first audio signal as including the nth frame signal and the (n-1)th frame signal, where the nth frame and the (n-1)th frame are adjacent frames, as an example, the nth frame signal of the first audio signal can be used as the first audio signal, and the (n-1)th frame signal of the first audio signal can be used as the first historical audio signal. The first audio signal can be represented as a signal. The first historical audio signal can be represented as a signal. The first historical autocorrelation function can be expressed as follows: And so on.
[0041] Accordingly, upon acquiring the second audio signal, the electronic device can combine the second audio signal and its corresponding second historical autocorrelation function to perform autocorrelation estimation on the second audio signal, thereby obtaining the second autocorrelation function. The second historical autocorrelation function can be determined based on the second historical audio signal corresponding to the second audio signal. Taking the second audio signal as including the nth frame signal and the (n-1)th frame signal, where the nth frame and the (n-1)th frame are adjacent frames, as an example, the nth frame signal of the second audio signal can be used as the second audio signal, and the (n-1)th frame signal of the second audio signal can be used as the second historical audio signal. The second audio signal can be represented as a signal... The second historical audio signal can be represented as: The second historical autocorrelation function can be expressed as: And so on.
[0042] Accordingly, the electronic device can combine the first audio signal, the second audio signal, and the historical cross-correlation function corresponding to the first and second audio signals to perform cross-correlation estimation on the first and second audio signals, thereby obtaining the cross-correlation function corresponding to the first and second audio signals. The historical cross-correlation function can be determined based on the first historical audio signal corresponding to the first audio signal and the second historical audio signal corresponding to the second audio signal. The historical cross-correlation function can be expressed as... And so on.
[0043] Given a first autocorrelation function, a second autocorrelation function, and a cross-correlation function, the electronic device can normalize the cross-correlation function using these functions to obtain a normalized cross-correlation function. This normalized cross-correlation function can then be used to perform two-way detection on a preset audio signal, yielding the two-way detection result. For example, the electronic device can determine whether the peak value of the normalized cross-correlation function is greater than or equal to a preset peak threshold. If the peak value is greater than or equal to the preset peak threshold, the electronic device can determine that the preset audio signal is in a single-way state, thus determining the two-way detection result. If the peak value is less than the preset peak threshold, the electronic device can determine that the preset audio signal is in a two-way state, thus determining the two-way detection result. However, this is not a limitation and is not specified here.
[0044] Given the determined dual-talk detection result of the preset audio signal, the dual-talk detection result of the preset audio signal can be used as the basis for echo cancellation of the preset audio signal to determine the corresponding target audio signal, so as to improve the flexibility of echo cancellation of the preset audio signal in the future, and thus help to improve the echo cancellation effect of the preset audio signal.
[0045] S104. Based on at least one of the echo return loss and dual-talk detection results, perform echo cancellation on the preset audio signal to obtain the target audio signal corresponding to the preset audio signal.
[0046] Given the echo return loss of a preset audio signal and the two-way detection result of the preset audio signal, the electronic device can determine an echo cancellation strategy for echo cancellation of the preset audio signal based on at least one of the echo return loss and the two-way detection result. Then, it performs echo cancellation on the preset audio signal according to the echo cancellation strategy to obtain the target audio signal corresponding to the preset audio signal. For example, the electronic device can determine the echo cancellation strategy for echo cancellation of the preset audio signal solely based on the two-way detection result of the preset audio signal. Alternatively, the electronic device can combine the echo return loss of the preset audio signal and the two-way detection result to determine the echo cancellation strategy. The echo cancellation strategy determined by the electronic device can vary depending on the basis used to determine the echo cancellation strategy for the preset audio signal.
[0047] For example, when there are preset audio signals with different echo return losses, the electronic device can employ different echo cancellation strategies to cancel the echoes of the preset audio signals with different echo return losses, thereby obtaining the target audio signal corresponding to each preset audio signal. Similarly, when there are preset audio signals with different dual-talk detection results, the electronic device can employ different echo cancellation strategies to cancel the echoes of the preset audio signals with different dual-talk detection results, thereby obtaining the target audio signal corresponding to each preset audio signal.
[0048] Based on this, electronic devices can flexibly perform echo cancellation on preset audio signals according to at least one of the echo return loss of preset audio signals and the double-talk detection results of preset audio signals, so as to obtain the target audio signal corresponding to the preset audio signal. This is beneficial to improving the flexibility of echo cancellation on preset audio signals, and thus improving the echo cancellation effect on preset audio signals.
[0049] In some implementations, when the echo return loss is greater than the first echo return loss threshold, and the preset audio signal is determined to be in a single-talk state based on the two-talk detection result, the preset audio signal is echo-cancelled through the first filter to obtain the target audio signal.
[0050] For example, if the echo return loss of the preset audio signal is greater than the first echo return loss threshold, the electronic device can infer that the environment in which the electronic device is located has a strong attenuation of echoes and a large echo path loss. If the preset audio signal is determined to be in a single-talk state based on the two-talk detection results, the electronic device can determine that the second audio signal contains only echoes and no independent near-end speech interference. Based on this, the electronic device can determine that echo cancellation of the preset audio information is relatively easy, and thus can input the preset audio signal into the first filter to perform echo cancellation on the preset audio signal, thereby obtaining the target audio signal corresponding to the preset audio signal. The first filter is essentially the basic filter of the electronic device. For example, the first filter allows the electronic device to balance convergence speed and computational efficiency when performing echo cancellation on the preset audio signal.
[0051] For example, based on the first filter, echo cancellation is performed on the preset audio signal to obtain the first error signal corresponding to the preset audio signal; based on the first error signal, the target audio signal is determined.
[0052] When the first filter acquires a preset audio signal, it can use the preset audio signal, including a first audio signal, as a far-end reference signal. Then, based on the first audio signal, it performs echo estimation on the preset audio signal to obtain a first estimated echo signal. When the first estimated echo signal is determined, the first filter can subtract the first estimated echo signal from the second audio signal included in the preset audio signal to obtain a first error signal corresponding to the preset audio signal. The first error signal is essentially the signal obtained after echo cancellation of the preset audio signal by the first filter; therefore, the electronic device can determine the first error signal as the target audio signal.
[0053] The first filter can have adaptive update capabilities. For example, the first filter can use one of the following adaptive algorithms to achieve adaptive updates: Normalized Least Mean Square (NLMS), Least Mean Square (LMS), Affine Projection Algorithm (APA), Recursive Least Squares (RLS), Kalman filtering, Frequency-Domain Adaptive Filter (FDAF), etc. Of course, the adaptive algorithm used by the first filter is not limited to these, and no restriction is placed here. When a preset audio signal is acquired, the first filter can adaptively update itself based on the preset audio signal.
[0054] The following explanation uses the NLMS algorithm to adaptively update the first filter as an example. In this case, the first filter can also be called an NLMS filter. Electronic devices can use the NLMS filter to cancel echoes in a preset audio signal to obtain the target audio signal.
[0055] The process of obtaining the target audio signal by performing echo cancellation on the preset audio signal using an NLMS filter can be represented as follows: ; ; in, Used to indicate that the first audio signal includes the nth frame signal or the first audio signal at the nth time. Used to indicate whether the second audio signal includes the nth frame signal or the first audio signal at the nth moment. Used to indicate the filter weight vector of the NLMS filter at time n. The transpose of the matrix, Used to indicate the first echo estimation signal at time n. This is used to indicate whether the first error signal includes the error signal of the nth frame or the first error signal at the nth time.
[0056] When the NLMS filter acquires a preset audio signal, it can filter the first audio signal included in the preset audio signal. With filter weight vector Multiplying by the transpose of the matrix yields the first echo estimation signal corresponding to the preset audio signal. Accordingly, the NLMS filter can filter the second audio signal included in the preset audio signal. Subtract the first echo estimation signal The first error signal corresponding to the preset audio signal is obtained. Thus, the first error signal is determined. The target audio signal corresponding to the preset audio signal.
[0057] Accordingly, the adaptive update process of the NLMS filter can be expressed as: ; First audio signal It can be represented as: ; Filter weight vector It can be represented as: ; in, The step size factor used to indicate the adaptive update of the NLMS filter. Used to indicate the regularization parameter of the NLMS filter. Used to indicate the filter length of the NLMS filter. Step size factor. It can be used to control the convergence speed of NLMS filters. Regularization parameter. It can be used to prevent division by zero. Filter length. It can be determined based on the echo path delay corresponding to a preset audio signal. In an exemplary implementation, the step size factor... It can be greater than 0 and less than or equal to 2. Of course, it is not limited to this, and no restrictions are imposed here.
[0058] Based on this, when the preset audio signal is echo-cancelled through the first filter to obtain the target audio signal, the echo cancellation strategy of the electronic device for the preset audio signal can be adapted to the echo return loss of the preset audio signal and the double-talk detection result, which is conducive to improving the accuracy of echo cancellation of the preset audio signal, and thus conducive to improving the echo cancellation effect of the preset audio signal.
[0059] In some implementations, when the echo return loss is less than or equal to the first echo return loss threshold, and the preset audio signal is determined to be in a single-talk state based on the two-talk detection result, the preset audio signal is echo-cancelled through a second filter to obtain the target audio signal.
[0060] For example, when the echo return loss of a preset audio signal is less than or equal to a first echo return loss threshold, the electronic device can infer that the environment in which the electronic device is located has weak echo attenuation and low echo path loss. When the preset audio signal is determined to be in a single-talk state based on the two-talk detection results, the electronic device can determine that the second audio signal contains only echoes and no independent near-end speech interference. Based on this, the electronic device can determine that the echo cancellation difficulty of the preset audio information is moderate, and thus can input the preset audio signal into a second filter to perform echo cancellation on the preset audio signal, thereby obtaining the target audio signal corresponding to the preset audio signal. The second filter can be different from the first filter. For example, if the stability of the second filter is better than that of the first filter, then when performing echo cancellation on a preset audio signal with an echo return loss less than or equal to the first echo return loss threshold and in a single-talk state, the echo cancellation effect of the second filter on the preset audio signal can be better than that of the first filter. For example, the second filter can improve the tracking ability of the electronic device to rapidly changing echo paths when performing echo cancellation on the preset audio signal.
[0061] For example, based on the second filter, echo cancellation is performed on the preset audio signal to obtain the second error signal corresponding to the preset audio signal; the target audio signal is determined based on the second error signal.
[0062] When the second filter acquires a preset audio signal, it can use the preset audio signal, including the first audio signal, as a far-end reference signal. Then, based on the first audio signal, it performs echo estimation on the preset audio signal to obtain a second estimated echo signal. When the second estimated echo signal is determined, the second filter can subtract the second estimated echo signal from the second audio signal included in the preset audio signal to obtain a second error signal corresponding to the preset audio signal. The second error signal is essentially the signal obtained after echo cancellation of the preset audio signal by the second filter; therefore, the electronic device can determine the second error signal as the target audio signal.
[0063] The second filter can have adaptive update capabilities. For example, the second filter can use another adaptive algorithm such as NLMS, LMS, APA, RLS, Kalman filtering, FDAF, etc., to achieve adaptive updates. Of course, the adaptive algorithms used by the second filter are not limited to these, and no restrictions are placed here. When a preset audio signal is acquired, the second filter can adaptively update itself based on the preset audio signal.
[0064] The following explanation uses the example of adaptive updating of the second filter using Kalman filtering. In this case, the second filter can also be called a Kalman filter.
[0065] When the preset audio signal is echo-cancelled by a Kalman filter to obtain the target audio signal, the Kalman filter can process the non-stationary signals included in the preset audio signal to determine the target audio signal corresponding to the preset audio signal.
[0066] The state-space model of a Kalman filter can include state equations and observation equations: The state equation can be expressed as: ; The observation equation can be expressed as: .
[0067] The Kalman filtering process may include a prediction step and an update step: The prediction step can be represented as: ; ; The update steps can be represented as follows: ; ; .
[0068] in, Used to indicate the system state of the Kalman filter at time n, i.e., the filter coefficients of the Kalman filter at time n. Used to indicate process noise during Kalman filtering. The covariance matrix used to indicate process noise. Used to indicate observation noise during the Kalman filtering process. Used to indicate the state estimation error covariance matrix in the Kalman filtering process. Used to indicate Kalman gain The forgetting factor is used to indicate the Kalman filter.
[0069] Given a preset audio signal, the Kalman filter can determine the appropriate parameters based on its filter coefficients. and process noise Determine the state equation of the Kalman filter, and based on the first audio signal included in the preset audio signal... and the second audio signal Observation noise and filter coefficients The observation equation of the Kalman filter is determined, and then the Kalman filter can perform recursive optimal estimation of the state equation to obtain the estimated coefficients of the echo path corresponding to the preset audio signal. Accordingly, the Kalman filter can generate a second echo estimation signal based on the estimated coefficients of the echo path, and then the Kalman filter can include the second audio signal in the preset audio signal. Subtracting the second echo estimation signal yields the second error signal corresponding to the preset audio signal, which is then determined to be the target audio signal corresponding to the preset audio signal.
[0070] Based on this, when the preset audio signal is echo-cancelled through the second filter to obtain the target audio signal, the echo cancellation strategy of the electronic device for the preset audio signal can be adapted to the echo return loss of the preset audio signal and the double-talk detection result, which is conducive to improving the accuracy of echo cancellation of the preset audio signal, and thus conducive to improving the echo cancellation effect of the preset audio signal.
[0071] In some implementations, when it is determined from the dual-talk detection result that the preset audio signal is in dual-talk state, the preset audio signal is echo-cancelled by the first filter and the second filter to obtain the target audio signal.
[0072] For example, if the preset audio signal is determined to be in a dual-talk state based on the dual-talk detection result, the electronic device can determine that the second audio signal includes both echo and near-end speech interference. Therefore, the electronic device can determine that the echo cancellation of the preset audio information is relatively difficult. Consequently, the electronic device can use the first filter and the second filter as a combined filter to cancel the echo of the preset audio signal through the combined filter to obtain the target audio signal.
[0073] For example, based on the first filter, echo cancellation is performed on the preset audio signal to obtain a first error signal corresponding to the preset audio signal; based on the second filter, echo cancellation is performed on the preset audio signal to obtain a second error signal corresponding to the preset audio signal; based on the first error signal, the second error signal, the first weight corresponding to the first error signal, and the second weight corresponding to the second error signal, a third error signal corresponding to the preset audio signal is determined; based on the third error signal, the target audio signal is determined.
[0074] The steps for echo cancellation of the preset audio signal based on the first filter can be referred to the corresponding description above, and will not be repeated here. Correspondingly, the steps for echo cancellation of the preset audio signal based on the second filter to obtain the second error signal corresponding to the preset audio signal can be referred to the corresponding description above, and will not be repeated here.
[0075] Having determined the first error signal through the first filter and the second error signal through the second filter, the electronic device can combine the first and second error signals to determine the third error signal after echo cancellation of the preset audio signal by the combined filter corresponding to the first and second filters. The third error signal can also be referred to as the output error of the combined filter, which is not limited here.
[0076] For example, when the combined filter receives a first error signal and a second error signal, it can combine the first weight corresponding to the first error signal and the second weight corresponding to the second error signal to determine the combined filter output error, i.e., the third error signal. The third error signal is essentially the signal obtained after echo cancellation of the preset audio signal by the combined filter corresponding to the first and second filters. Therefore, the electronic device can identify the third error signal as the target audio signal. Accordingly, by combining the first weight corresponding to the first error signal and the second weight corresponding to the second error signal to determine the third error signal, the electronic device can suppress the interference of near-end speech on the adaptive process of the combined filter through weighted fusion, thereby improving the echo cancellation effect on the preset audio signal.
[0077] When echo cancellation is performed on a preset audio signal using a first filter and a second filter to obtain the target audio signal, the electronic device can combine the filtering performance of the first and second filters to achieve echo cancellation of the preset audio signal, thus improving the echo cancellation effect. Taking an NLMS filter as the first filter and a Kalman filter as the second filter as an example, the NLMS filter has fast convergence performance, and the Kalman filter can be used to process non-stationary signals. Therefore, the electronic device can combine the fast convergence performance of the NLMS filter with the stability of the Kalman filter to perform echo cancellation on the preset audio signal and obtain the target audio signal corresponding to the preset audio signal. Of course, the first filter is not limited to an NLMS filter, and the second filter is not limited to a Kalman filter; no restrictions are imposed here.
[0078] Based on this, electronic devices can determine whether the echo return loss is greater than the first echo return loss threshold, and whether the preset audio signal is in single-talk or dual-talk state based on the dual-talk detection result. Different filters can be used, such as using the first filter alone, using the second filter alone, or using one of the first and second filters in combination, to cancel the echo of the preset audio signal and obtain the target audio signal. This is beneficial to improving the flexibility of echo cancellation of the preset audio signal, and thus improving the echo cancellation effect of the preset audio signal.
[0079] In some implementations, a first weight corresponding to the first error signal and a second weight corresponding to the second error signal are determined based on the first error signal and the second error signal.
[0080] For example, the first weight corresponding to the first error signal and the second weight corresponding to the second error signal can be dynamically adjusted. The sum of the first weight and the second weight equals 1. During the echo cancellation process of the preset audio signal through the first filter and the second filter, the electronic device can combine the first error signal and the second error signal to determine the first weight corresponding to the first error signal and the second weight corresponding to the second error signal.
[0081] For example, based on the first error signal, a first error variance corresponding to the first error signal is determined; based on the second error signal, a second error variance corresponding to the second error signal is determined; based on the proportion of the second error variance in the sum of the first error variance and the second error variance, a first weight is determined; based on the proportion of the first error variance in the sum of the first error variance and the second error variance, a second weight is determined.
[0082] Given a first error signal, its variance can be estimated to obtain a first error variance. Similarly, given a second error signal, its variance can be estimated to obtain a second error variance. The electronic device can calculate the proportion of the second error variance in the sum of the first and second error variances to obtain a first weight corresponding to the first error signal. Likewise, the electronic device can calculate the proportion of the first error variance in the sum of the first and second error variances to obtain a second weight corresponding to the second error signal. Based on this, the first and second weights can be dynamically adjusted in response to changes in the first and second error information, and the sum of the first and second weights can be kept equal to 1 during this dynamic adjustment. This is beneficial for suppressing the interference of near-end speech in the preset audio signal on the adaptive process through weighted fusion, thereby improving the echo cancellation effect of the preset audio signal.
[0083] Taking an NLMS filter as the first filter and a Kalman filter as the second filter as an example, the first error signal can be expressed as: The second error signal can be expressed as The electronic device can react based on the first error signal. Determine the first error signal The corresponding first error variance. The first error variance can be expressed as: Accordingly, the electronic device can base its actions on the second error signal. Determine the second error signal The corresponding second error variance. The second error variance can be expressed as... According to the first error variance and the second error variance The first weights corresponding to the NLMS filter and the second weights corresponding to the Kalman filter can be determined. The first weight of the NLMS filter can be expressed as: The second weight corresponding to the Kalman filter can be expressed as: First weight It can be represented as: Of course, the first filter is not limited to the NLMS filter, and the second filter is not limited to the Kalman filter; no restrictions are imposed here.
[0084] When the first error signal and the second error signal are determined based on the first error signal and the second error signal, the first weight and the second weight can be used by the electronic device to determine the third error signal corresponding to the preset audio signal, and then determine the target audio signal corresponding to the preset audio signal.
[0085] In some implementations, when the echo return loss is less than the second echo return loss threshold and the dual-talk intensity parameter corresponding to the preset audio signal is greater than or equal to the preset intensity threshold, both the first weight and the second weight are determined to be preset weights; the second echo return loss threshold is less than the first echo return loss threshold.
[0086] For example, the dual-talk state can include either a normal dual-talk state or a strong dual-talk state. When it is determined that the preset audio signal is in a dual-talk state based on the dual-talk detection result, the electronic device can obtain the dual-talk intensity parameter corresponding to the preset audio signal, and combine the dual-talk intensity parameter with a preset intensity threshold to determine whether the preset audio signal is in a strong dual-talk state. For example, the dual-talk intensity parameter can include at least one of the following: the power inversion ratio of the near-end speech to the echo in the preset audio signal, the absolute energy level of the second audio signal included in the preset audio signal, and the cross-correlation attenuation degree corresponding to the preset audio signal. Of course, the dual-talk intensity parameter is not limited to these, and is not restricted here. When the dual-talk intensity parameter corresponding to the preset audio signal is greater than or equal to the preset intensity threshold, the electronic device can determine that the preset audio signal is in a strong dual-talk state.
[0087] If the echo return loss of the preset audio signal is less than the second echo return loss threshold, and the second echo return loss threshold is less than the first echo return loss threshold, the electronic device can infer that the environment in which the electronic device is located has very weak attenuation of the echo and very little echo path loss.
[0088] Based on this, when the echo return loss is less than the second echo return loss threshold, and the dual-talk intensity parameter corresponding to the preset audio signal is greater than or equal to the preset intensity threshold, the electronic device can determine that the echo cancellation of the preset audio signal is extremely difficult. Therefore, the electronic device can fix both the first weight and the second weight to the preset weight to force equalize the contribution of the first filter and the second filter to the echo cancellation of the preset audio signal, which is beneficial to improving the echo cancellation effect of the preset audio signal in the future.
[0089] When both the first weight and the second weight are preset weights, the first weight and the second weight can be used by the electronic device to determine the third error signal corresponding to the preset audio signal, and then to determine the target audio signal corresponding to the preset audio signal.
[0090] In some implementations, a first product between a first error signal and a first weight is determined; a second product between a second error signal and a second weight is determined; and a third error signal is determined based on the sum of the first and second products.
[0091] For example, given a first error signal and a first weight, the first error signal can be multiplied by the first weight to obtain a first product. Similarly, given a second error signal and a second weight, the second error signal can be multiplied by the second weight to obtain a second product. Given both the first and second products, the sum of the first and second products can be calculated to determine a third error signal. The third error signal is essentially a weighted fusion of the first and second error signals. Therefore, the third error signal can suppress the interference of near-end speech in the preset audio signal on the adaptive process, thereby improving the echo cancellation effect on the preset audio signal.
[0092] Taking an NLMS filter as the first filter and a Kalman filter as the second filter as an example, the first error signal can be expressed as: The second error signal can be expressed as The first weight corresponding to the NLMS filter can be expressed as: The second weight corresponding to the Kalman filter can be expressed as: The third error signal, determined by the combination filter corresponding to the first and second filters, can be expressed as: Third error signal It can be represented as Of course, the first filter is not limited to the NLMS filter, and the second filter is not limited to the Kalman filter; no restrictions are imposed here.
[0093] When a third error signal is determined based on the first error signal, the second error signal, the first weight, and the second weight, the third error signal can be used to determine the target audio signal corresponding to the preset audio signal, which is beneficial to improving the echo cancellation effect of the preset audio signal.
[0094] The audio processing method provided in the above embodiments includes: acquiring a preset audio signal to be processed; the preset audio signal includes a first audio signal and a second audio signal; the first audio signal and the second audio signal are different; estimating the echo return loss of the first audio signal and the second audio signal to obtain the corresponding echo return loss; performing dual-talk detection on the preset audio signal based on the first audio signal and the second audio signal to obtain the dual-talk detection result of the preset audio signal; and performing echo cancellation on the preset audio signal based on at least one of the echo return loss and the dual-talk detection result to obtain the target audio signal corresponding to the preset audio signal.
[0095] When a preset audio signal to be processed is acquired, which includes a first audio signal and a second audio signal, and the first audio signal and the second audio signal are different, the first audio signal and the second audio signal can be used by the electronic device to estimate the echo return loss to determine the corresponding echo return loss. Correspondingly, the first audio signal and the second audio signal can also be used by the electronic device to perform two-way detection on the preset audio signal to determine the two-way detection result of the preset audio signal. Based on this, the electronic device can flexibly perform echo cancellation on the preset audio signal according to at least one of the echo return loss of the preset audio signal and the two-way detection result of the preset audio signal to obtain the target audio signal corresponding to the preset audio signal. This improves the flexibility of echo cancellation on the preset audio signal and thus improves the echo cancellation effect on the preset audio signal.
[0096] Please see Figure 2 , Figure 2 This is a schematic block diagram of an audio processing apparatus provided in an embodiment of this application. The audio processing apparatus can be configured in an electronic device or a server to execute the aforementioned audio processing method. The electronic device may include near-eye display devices, self-moving devices, terminal devices, etc., and is not limited thereto. Near-eye display devices may include AR glasses, VR glasses, MR glasses, AR helmets, VR helmets, MR helmets, etc., and are not limited thereto. Self-moving devices may include robots, etc., and are not limited thereto. Terminal devices may include mobile phones, computers, etc., and are not limited thereto. The server may be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms.
[0097] like Figure 2 As shown, the audio processing device includes an audio acquisition module 110, an echo return loss module 120, a dual-talk detection module 130, and an echo cancellation module 140.
[0098] The audio acquisition module 110 is used to acquire a preset audio signal to be processed; the preset audio signal includes a first audio signal and a second audio signal, wherein the first audio signal is different from the second audio signal. The echo return loss estimation module 120 is used to estimate the echo return loss of the first audio signal and the second audio signal to obtain the corresponding echo return loss. The dual-talk detection module 130 is used to perform dual-talk detection on the preset audio signal based on the first audio signal and the second audio signal, and obtain the dual-talk detection result of the preset audio signal; The echo cancellation module 140 is used to perform echo cancellation on the preset audio signal based on at least one of the echo return loss and the dual-talk detection result, so as to obtain the target audio signal corresponding to the preset audio signal.
[0099] For example, the echo cancellation module 140 includes a first echo cancellation submodule, a second echo cancellation submodule, and a third echo cancellation submodule.
[0100] The first echo cancellation submodule is used to perform echo cancellation on the preset audio signal through the first filter to obtain the target audio signal when the echo return loss is greater than the first echo return loss threshold and the preset audio signal is determined to be in a single-talk state according to the dual-talk detection result. The second echo cancellation submodule is used to perform echo cancellation on the preset audio signal through a second filter to obtain the target audio signal when the echo return loss is less than or equal to the first echo return loss threshold and the preset audio signal is determined to be in a single-talk state according to the dual-talk detection result. The third echo cancellation submodule is used to perform echo cancellation on the preset audio signal through the first filter and the second filter when it is determined that the preset audio signal is in a dual-talk state based on the dual-talk detection result, so as to obtain the target audio signal.
[0101] For example, the first echo cancellation submodule includes a first error signal determination submodule and a first target signal determination submodule; The first error signal determination submodule is used to perform echo cancellation on the preset audio signal based on the first filter to obtain the first error signal corresponding to the preset audio signal. The first target signal determination submodule is used to determine the target audio signal based on the first error signal; The second echo cancellation submodule includes a second error signal determination submodule and a second target signal determination submodule; The second error signal determination submodule is used to perform echo cancellation on the preset audio signal based on the second filter to obtain the second error signal corresponding to the preset audio signal; The second target signal determination submodule is used to determine the target audio signal based on the second error signal; The third echo cancellation submodule includes a first filtering submodule, a second filtering submodule, a third error signal determination submodule, and a third target signal determination submodule; The first filtering submodule is used to perform echo cancellation on the preset audio signal based on the first filter to obtain a first error signal corresponding to the preset audio signal; The second filtering submodule is used to perform echo cancellation on the preset audio signal based on the second filter to obtain the second error signal corresponding to the preset audio signal; The third error signal determination submodule is used to determine the third error signal corresponding to the preset audio signal based on the first error signal, the second error signal, the first weight corresponding to the first error signal, and the second weight corresponding to the second error signal. The third target signal determination submodule is used to determine the target audio signal based on the third error signal.
[0102] For example, the audio processing device includes a weight determination submodule.
[0103] The weight determination submodule is used to determine the first weight corresponding to the first error signal and the second weight corresponding to the second error signal based on the first error signal and the second error signal.
[0104] For example, the weight determination submodule includes a first error variance determination submodule, a second error variance determination submodule, a first weight determination submodule, and a second weight determination submodule.
[0105] The first error variance determination submodule is used to determine the first error variance corresponding to the first error signal based on the first error signal. The second error variance determination submodule is used to determine the second error variance corresponding to the second error signal based on the second error signal. The first weight determination submodule is used to determine the first weight based on the proportion of the second error variance in the sum of the first error variance and the second error variance; The second weight determination submodule is used to determine the second weight based on the proportion of the first error variance in the sum of the first error variance and the second error variance.
[0106] For example, the audio processing device includes a weight adjustment submodule.
[0107] The weight adjustment submodule is used to determine that both the first weight and the second weight are preset weights when the echo return loss is less than the second echo return loss threshold and the dual-talk intensity parameter corresponding to the preset audio signal is greater than or equal to the preset intensity threshold; the second echo return loss threshold is less than the first echo return loss threshold.
[0108] For example, the third error signal determination submodule includes a first product determination submodule, a second product determination submodule, and a product sum determination submodule.
[0109] The first product determination submodule is used to determine the first product between the first error signal and the first weight; The second product determination submodule is used to determine the second product between the second error signal and the second weight; The product sum determination submodule is used to determine the third error signal based on the sum of the first product and the second product.
[0110] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the above-described apparatus and its modules and units can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0111] The method of this application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0112] For example, the above-described method and apparatus can be implemented as a computer program that can run on an electronic device or server to perform audio processing. For example, the electronic device may include near-eye display devices, self-moving devices, terminal devices, etc., without limitation. Near-eye display devices may include AR glasses, VR glasses, MR glasses, AR helmets, VR helmets, MR helmets, etc., without limitation. Self-moving devices may include robots, etc., without limitation. Terminal devices may include mobile phones, computers, etc., without limitation. The server may be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms.
[0113] Please see Figure 3 , Figure 3 This is a schematic block diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 3As shown, the electronic device includes a memory and a processor. The memory and processor can be connected via a system bus, and the memory may include a storage medium and internal memory.
[0114] The storage medium can store the operating system and computer programs. When a computer program is executed, it causes the processor to perform the steps of any audio processing method.
[0115] The processor provides computing and control capabilities to support the operation of the entire electronic device.
[0116] Internal memory provides an environment for the execution of computer programs stored in the storage medium. When these computer programs are executed by the processor, the processor can perform any audio processing method.
[0117] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0118] It should be understood that a processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other convertible logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0119] In one embodiment, the processor is configured to execute a computer program and, when executing the computer program, perform the following steps: Acquire a preset audio signal to be processed; the preset audio signal includes a first audio signal and a second audio signal, wherein the first audio signal is different from the second audio signal; Echo return loss is estimated for the first audio signal and the second audio signal to obtain the corresponding echo return loss. Based on the first audio signal and the second audio signal, perform dual-talk detection on the preset audio signal to obtain the dual-talk detection result of the preset audio signal; Based on at least one of the echo return loss and the dual-talk detection result, echo cancellation is performed on the preset audio signal to obtain the target audio signal corresponding to the preset audio signal.
[0120] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of audio processing described above can be referred to the corresponding process in the aforementioned audio processing method embodiments, and will not be repeated here.
[0121] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method implemented can be referred to in various embodiments of the audio processing method of this application.
[0122] The computer-readable storage medium can be an internal storage unit of the electronic device described in the foregoing embodiments, such as a hard disk or memory of the electronic device. Alternatively, the computer-readable storage medium can be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device.
[0123] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0124] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, herein, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0125] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above descriptions are merely specific implementations of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An audio processing method, characterized in that, The audio processing method includes: Acquire a preset audio signal to be processed; the preset audio signal includes a first audio signal and a second audio signal, wherein the first audio signal is different from the second audio signal; Echo return loss is estimated for the first audio signal and the second audio signal to obtain the corresponding echo return loss. Based on the first audio signal and the second audio signal, perform dual-talk detection on the preset audio signal to obtain the dual-talk detection result of the preset audio signal; Based on at least one of the echo return loss and the dual-talk detection result, echo cancellation is performed on the preset audio signal to obtain the target audio signal corresponding to the preset audio signal.
2. The audio processing method according to claim 1, characterized in that, The step of performing echo cancellation on the preset audio signal based on at least one of the echo return loss and the dual-talk detection result to obtain the target audio signal corresponding to the preset audio signal includes: When the echo return loss is greater than the first echo return loss threshold, and the preset audio signal is determined to be in a single-talk state based on the dual-talk detection result, the preset audio signal is echo-cancelled using the first filter to obtain the target audio signal; or, When the echo return loss is less than or equal to the first echo return loss threshold, and the preset audio signal is determined to be in a single-talk state based on the dual-talk detection result, the preset audio signal is echo-cancelled using a second filter to obtain the target audio signal; or... When the preset audio signal is determined to be in a dual-talk state based on the dual-talk detection result, the preset audio signal is echo-cancelled through the first filter and the second filter to obtain the target audio signal.
3. The audio processing method according to claim 2, characterized in that, The step of passing the preset audio signal through a first filter to perform echo cancellation to obtain the target audio signal includes: Based on the first filter, echo cancellation is performed on the preset audio signal to obtain a first error signal corresponding to the preset audio signal; The target audio signal is determined based on the first error signal; The step of performing echo cancellation on the preset audio signal through a second filter to obtain a second error signal corresponding to the preset audio signal includes: Based on the second filter, echo cancellation is performed on the preset audio signal to obtain the second error signal corresponding to the preset audio signal; The target audio signal is determined based on the second error signal; The process of echo cancellation on the preset audio signal through a first filter and a second filter to obtain the target audio signal includes: Based on the first filter, echo cancellation is performed on the preset audio signal to obtain a first error signal corresponding to the preset audio signal; Based on the second filter, echo cancellation is performed on the preset audio signal to obtain the second error signal corresponding to the preset audio signal; Based on the first error signal, the second error signal, the first weight corresponding to the first error signal, and the second weight corresponding to the second error signal, a third error signal corresponding to the preset audio signal is determined. The target audio signal is determined based on the third error signal.
4. The audio processing method according to claim 3, characterized in that, Before determining the third error signal corresponding to the preset audio signal based on the first error signal, the second error signal, the first weight corresponding to the first error signal, and the second weight corresponding to the second error signal, the audio processing method further includes: Based on the first error signal and the second error signal, determine the first weight corresponding to the first error signal and the second weight corresponding to the second error signal.
5. The image processing method according to claim 4, characterized in that, Determining the first weight and the second weight based on the first error signal and the second error signal includes: Based on the first error signal, determine the first error variance corresponding to the first error signal; Based on the second error signal, determine the second error variance corresponding to the second error signal; The first weight is determined based on the proportion of the second error variance in the sum of the first error variance and the second error variance; The second weight is determined based on the proportion of the first error variance in the sum of the first error variance and the second error variance.
6. The audio processing method according to claim 3, characterized in that, Before determining the third error signal corresponding to the preset audio signal based on the first error signal, the second error signal, the first weight corresponding to the first error signal, and the second weight corresponding to the second error signal, the audio processing method further includes: When the echo return loss is less than the second echo return loss threshold, and the dual-talk intensity parameter corresponding to the preset audio signal is greater than or equal to the preset intensity threshold, the first weight and the second weight are both preset weights; the second echo return loss threshold is less than the first echo return loss threshold.
7. The audio processing method according to claim 3, characterized in that, The step of determining the third error signal corresponding to the preset audio signal based on the first error signal, the second error signal, the first weight corresponding to the first error signal, and the second weight corresponding to the second error signal includes: Determine the first product between the first error signal and the first weight; Determine the second product between the second error signal and the second weight; The third error signal is determined based on the sum of the first product and the second product.
8. An audio processing apparatus, characterized in that, The audio processing device includes: An audio acquisition module is used to acquire a preset audio signal to be processed; the preset audio signal includes a first audio signal and a second audio signal, wherein the first audio signal is different from the second audio signal. The echo return loss estimation module is used to estimate the echo return loss of the first audio signal and the second audio signal to obtain the corresponding echo return loss. A dual-talk detection module is used to perform dual-talk detection on the preset audio signal based on the first audio signal and the second audio signal, and obtain the dual-talk detection result of the preset audio signal; An echo cancellation module is used to perform echo cancellation on the preset audio signal based on at least one of the echo return loss and the dual-talk detection result, so as to obtain the target audio signal corresponding to the preset audio signal.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and, in executing the computer program, implement the steps of the audio processing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the steps of the audio processing method as described in any one of claims 1 to 7.