Echo cancellation method for equipment with AGC (Automatic Gain Control)

By setting trigger conditions and dynamically adjusting parameters in devices with AGC, the echo problem caused by the superposition of multiple audio streams and network jitter is solved, achieving a highly efficient echo cancellation effect.

CN121811902APending Publication Date: 2026-04-07GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-19
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing devices with AGC do not adequately suppress echoes in scenarios with multiple audio streams overlapping, and are prone to probabilistic echo recurrence under network jitter, leading to a decline in communication quality.

Method used

By setting a preset static reference parameter set and combining the amplitude characteristics of the multi-channel audio stream to set trigger conditions, the parameters of AGC are dynamically adjusted, and two adjustment strategies are used to eliminate echo, including dynamic adjustment of target gain, attack time, and release signal duration.

Benefits of technology

It effectively eliminates initial echoes and probabilistic echoes during the process, improves communication quality, and avoids the obviousness and recurrence of echoes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121811902A_ABST
    Figure CN121811902A_ABST
Patent Text Reader

Abstract

The invention discloses an echo cancellation method for equipment with AGC (Automatic Gain Control), which comprises the following steps: step 1, presetting a static reference parameter set of the AGC, taking the static reference parameter set as an initial value for dynamically adjusting parameters of the AGC, the static reference parameter set comprising target gain, attack time and release signal duration; 2, setting a triggering condition for triggering and adjusting AGC parameters based on the amplitude characteristics of the multi-channel audio stream monitored by the hardware interface of the equipment; and step 3, when the triggering condition is met, executing an adjustment strategy which is used for adjusting the parameters of the AGC so as to realize echo cancellation by adjusting the parameters of the AGC. According to the method and the device, the AGC parameters are dynamically adjusted, the two triggering conditions are adopted, and the corresponding adjustment strategies are executed, so that the echo can be better eliminated, and the initial echo and the process probability echo are effectively avoided or reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of echo cancellation technology, specifically an echo cancellation method for devices equipped with AGC (Automatic Gauge Control). Background Technology

[0002] Many voice or other audio devices are equipped with AGC (Automatic Gain Control). AGC can be implemented using circuitry, such as in online conferencing equipment, where it's built-in to ensure audio communication quality. However, many existing AGC parameters are static and fixed. For example, when deploying a WebRTC communication module on the Rockchip RK3588 processor for multi-party conferencing, the built-in AGC on the WebRTC module uses generic AGC parameters, which can lead to echo. 1. Initial echo is obvious. When multiple participants join a meeting (online conference), due to the AGC adjustment not being adapted to the scenario of multiple audio streams being superimposed, the amplitude difference between the signal collected by the sound pickup module (such as the microphone) and the signal played by the sound playback module (such as the speaker) is not corrected in time, resulting in insufficient echo suppression and thus a relatively obvious and clear remote voice echo phenomenon.

[0003] 2. Probabilistic echoes occur during communication. During a meeting, when remote participants switch speakers or network jitter causes audio stream delays, AGC relies solely on its built-in linear filtering algorithm and does not compare features with the original sampled signal. This can easily lead to misjudging valid speech as not echoing or missing real echoes, resulting in probabilistic echo recurrence. Summary of the Invention

[0004] In view of the shortcomings of the prior art, the purpose of this invention is to provide an echo cancellation method for devices with AGC, which can solve the problems described in the background art.

[0005] The technical solution to achieve the objective of this invention is: an echo cancellation method for devices with AGC, comprising the following steps: Step 1: Preset the static reference parameter set of the AGC. The static reference parameter set serves as the starting value for dynamically adjusting the parameters of the AGC. The static reference parameter set includes target gain, attack time, and release signal duration. Step 2: Based on the amplitude characteristics of the multi-channel audio stream monitored by the device's hardware interface, set the trigger conditions for adjusting the AGC parameters; Step 3: When the triggering condition is met, the adjustment strategy is executed. The adjustment strategy is used to adjust the parameters of AGC in order to achieve echo cancellation.

[0006] Furthermore, the triggering conditions include a first triggering condition and a second triggering condition. When either the first or second triggering condition is met, the parameters of AGC are adjusted. First trigger condition: State a: The number of monitored remote audio streams is ≥2, and the instantaneous sum of the amplitudes of each audio stream is ≥ the amplitude threshold. And the duration of state a is greater than the duration threshold. Second trigger condition: A sudden change in amplitude is detected in the far-end audio stream of any channel.

[0007] Furthermore, the ratio of the first root mean square (RMS) amplitude to the second root mean square (RMS) amplitude is used to determine whether a sudden change in amplitude has occurred. If the RMS value of the first amplitude / the RMS value of the second amplitude is greater than or equal to a preset amplitude threshold, then a sudden amplitude change is determined to have occurred. The first root mean square (RMS) amplitude is the root mean square amplitude obtained based on the first duration, and the second root mean square (RMS) amplitude is the root mean square amplitude obtained based on the second duration, where the first duration is less than the second duration.

[0008] Furthermore, the first duration is a sampling period, and the second duration is a duration longer than the sampling period.

[0009] Furthermore, when the first triggering condition is met, the first adjustment strategy is used to adjust the parameters of AGC; when the second triggering condition is met, the second strategy is used to adjust the parameters of AGC.

[0010] Furthermore, the first adjustment strategy includes: increasing the target gain, decreasing the attack time, and keeping the release signal duration unchanged in the static baseline parameter set. The target gain in the static reference parameter set is increased to the target gain.

[0011] Furthermore, the first adjustment strategy also includes a first exit mechanism: when the duration of meeting the first trigger condition exceeds the preset duration safety period or the number of monitored remote audio streams drops to 1, the target gain is backed up to the target gain of the static reference parameter set at the target speed, that is, backed up to the target gain as the reference value.

[0012] Furthermore, the second adjustment strategy includes: reducing the release signal duration in the static baseline parameter set, dynamically adjusting the target gain, and increasing the attack time.

[0013] Furthermore, the target gain is dynamically adjusted according to the following formula to obtain the current real-time target gain. :

[0014] In the formula, Represents the target gain in the static reference parameter set. Represents the proportionality coefficient, 0 , Indicates the current amplitude of the audio stream. This represents the long-term average amplitude of the audio stream.

[0015] Furthermore, the second adjustment strategy also includes a second exit mechanism: when the amplitude fluctuations of all audio streams stabilize within a preset stability threshold and remain within a preset duration, the current target gain, attack time, and release signal duration are all reverted to the target gain, attack time, and release signal duration of the static reference parameter set.

[0016] The beneficial effects of the present invention are as follows: By dynamically adjusting the AGC parameters and employing two triggering conditions and executing corresponding adjustment strategies, the present invention can better eliminate echoes and effectively avoid or reduce initial echoes and probabilistic echoes during the process. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating a preferred embodiment of the present invention. Detailed Implementation

[0018] The present invention will be further described below with reference to the accompanying drawings and specific embodiments: like Figure 1 As shown, an echo cancellation method for a device with AGC includes the following steps: Step 1: Preset the static reference parameter set of the AGC. The static reference parameter set serves as the starting value for dynamically adjusting the parameters of the AGC. The static reference parameter set includes target gain, attack time, and release signal duration.

[0019] Understandably, this can be determined based on the typical input sensitivity of the device's sound module (such as an audio codec chip) and the comfortable loudness range of echo speech.

[0020] Attack time is a balance between suppressing plosive pre-response gain requirements and the ability to suppress plosive sounds during single-channel audio testing of the device.

[0021] The duration of the release signal can smoothly handle regular speech pauses to avoid frequent gain jitter.

[0022] The device in this embodiment uses hardware composed of Rockchip RK3588 processor, with the target gain set to 18dB, the attack time set to 5ms, and the signal duration set to 100ms.

[0023] Step 2: Based on the amplitude characteristics of the multi-channel audio stream monitored by the device's hardware interface, set the trigger conditions for adjusting the AGC parameters.

[0024] For example, the triggering conditions include a first triggering condition and a second triggering condition. When either the first triggering condition or the second triggering condition is met, the parameters of AGC are adjusted.

[0025] It is understandable that the logical relationship between the first triggering condition and the second triggering condition is an "OR" relationship, that is, satisfying any triggering condition will trigger the step of adjusting the parameters of AGC.

[0026] First trigger condition: State a: The number of monitored remote audio streams is ≥2, and the instantaneous sum of the amplitudes of each audio stream is ≥ the amplitude threshold. And the duration of state a is greater than the duration threshold.

[0027] Setting a timeout threshold and requiring state a to exceed this threshold is intended to prevent false triggering caused by brief noise.

[0028] In this embodiment, the amplitude threshold is 30 dBFs and the duration threshold is 500 ms.

[0029] Second trigger condition: A sudden change in amplitude is detected in the far-end audio stream of any channel.

[0030] Understandably, the ratio of the first root mean square (RMS) amplitude to the second root mean square (RMS) amplitude can be used to determine whether an amplitude abrupt change has occurred. Specifically, if the ratio of the first RMS amplitude to the second RMS amplitude is greater than or equal to a preset amplitude threshold, then an amplitude abrupt change is determined to have occurred. The first RMS amplitude is the root mean square amplitude calculated based on a first duration, and the second RMS amplitude is the root mean square amplitude calculated based on a second duration, where the first duration is less than the second duration.

[0031] The first duration can be a sampling period, and the second duration is a duration longer than the sampling period.

[0032] Step 3: When the triggering condition is met, the adjustment strategy is executed. The adjustment strategy is used to adjust the parameters of AGC in order to achieve echo cancellation.

[0033] Specifically, when the first triggering condition is met, the first adjustment strategy is used to adjust the parameters of AGC; when the second triggering condition is met, the second strategy is used to adjust the parameters of AGC.

[0034] Specifically, the first adjustment strategy includes: increasing the target gain, decreasing the attack time, and keeping the release signal duration unchanged in the static reference parameter set. By decreasing the attack time, the attack duration is shortened, allowing the gain to climb at a faster rate and enabling the target gain to be increased to the target gain.

[0035] The first adjustment strategy also includes a first exit mechanism: when the duration of meeting the first trigger condition exceeds a preset safety period or the number of monitored remote audio streams drops to 1, the target gain is balanced back to the target gain of the static reference parameter set at the target speed, that is, back to the target gain used as the reference value. In this embodiment, the target gain is balanced back to the reference value at a rate of 1dB recovery every 100ms.

[0036] The goals of implementing the first adjustment strategy include rapidly increasing the target gain so that the signal strength acquired by the microphone quickly approaches the multi-channel superimposed far-end reference signal, thus gaining an advantage in echo cancellation.

[0037] In this embodiment, the attack time is reduced from 5ms to 3ms, the target gain is temporarily increased from 18dB to 22dB, and the signal release duration remains unchanged.

[0038] The second adjustment strategy includes: reducing the release signal duration in the static baseline parameter set, dynamically adjusting the target gain, and increasing the attack time.

[0039] By reducing the duration of the release signal, the release time is shortened, allowing the target gain to fall back more quickly when the signal at the far end weakens, thus avoiding overgain. In this embodiment, the release signal duration is reduced from 100ms to 60ms.

[0040] The target gain is dynamically adjusted according to the following formula to obtain the current real-time target gain. :

[0041] In the formula, Represents the target gain in the static reference parameter set. Represents the proportionality coefficient, 0 , Indicates the current amplitude of the audio stream. This represents the long-term average amplitude of the audio stream.

[0042] By introducing a proportionality coefficient This allows for a small-scale adjustment of the gain based on the degree to which the current amplitude deviates from the long-term average. This gain adjustment is instantaneous and finite, designed to rapidly dampen fluctuations.

[0043] In this embodiment, the attack time is increased from 5ms to 8ms to increase the smoothness of gain changes during response abrupt changes and avoid introducing audible gain step noise.

[0044] The second adjustment strategy also includes a second exit mechanism: when the amplitude fluctuation of all audio streams stabilizes within a preset stability threshold (which can be set manually, such as ±6dB) and continues for a preset duration (such as 200ms), the current target gain, attack time, and release signal duration are all reverted to the target gain, attack time, and release signal duration of the static reference parameter set.

[0045] The embodiments disclosed in this specification are merely illustrative of one aspect of the invention, and the scope of protection of the invention is not limited to these embodiments. Any other functionally equivalent embodiments fall within the scope of protection of the invention. Those skilled in the art can make various other corresponding changes and modifications based on the technical solutions and concepts described above, and all such changes and modifications should fall within the scope of protection of the claims of this invention.

Claims

1. A method for echo cancellation in equipment with AGC, characterized in that, Includes the following steps: Step 1: Preset the static reference parameter set of the AGC. The static reference parameter set serves as the starting value for dynamically adjusting the parameters of the AGC. The static reference parameter set includes target gain, attack time, and release signal duration. Step 2: Based on the amplitude characteristics of the multi-channel audio stream monitored by the device's hardware interface, set the trigger conditions for adjusting the AGC parameters; Step 3: When the triggering condition is met, the adjustment strategy is executed. The adjustment strategy is used to adjust the parameters of AGC in order to achieve echo cancellation.

2. The echo cancellation method for equipment with AGC according to claim 1, characterized in that, The triggering conditions include a first triggering condition and a second triggering condition. When either the first or second triggering condition is met, the parameters of AGC will be adjusted. First trigger condition: State a: The number of monitored remote audio streams is ≥2, and the instantaneous sum of the amplitudes of each audio stream is ≥ the amplitude threshold. And the duration of state a is greater than the duration threshold. Second trigger condition: A sudden change in amplitude is detected in the far-end audio stream of any channel.

3. The echo cancellation method for equipment with AGC according to claim 2, characterized in that, The ratio of the first root mean square (RMS) amplitude to the second root mean square (RMS) amplitude is used to determine whether an amplitude abrupt change has occurred. If the RMS value of the first amplitude / the RMS value of the second amplitude is greater than or equal to a preset amplitude threshold, then a sudden amplitude change is determined to have occurred. The first root mean square (RMS) amplitude is the root mean square amplitude obtained based on the first duration, and the second root mean square (RMS) amplitude is the root mean square amplitude obtained based on the second duration, where the first duration is less than the second duration.

4. The echo cancellation method for equipment with AGC according to claim 3, characterized in that, The first duration is a sampling period, and the second duration is a duration longer than the sampling period.

5. The echo cancellation method for equipment with AGC according to claim 2, characterized in that, When the first triggering condition is met, the first adjustment strategy is used to adjust the parameters of AGC; when the second triggering condition is met, the second strategy is used to adjust the parameters of AGC.

6. The echo cancellation method for equipment with AGC according to claim 5, characterized in that, The first adjustment strategy includes: increasing the target gain, decreasing the attack time, and keeping the release signal duration unchanged in the static baseline parameter set. The target gain in the static reference parameter set is increased to the target gain.

7. The echo cancellation method for equipment with AGC according to claim 6, characterized in that, The first adjustment strategy also includes a first exit mechanism: when the duration of meeting the first trigger condition exceeds the preset safe period or the number of monitored remote audio streams drops to 1, the target gain is backed up to the target gain of the static reference parameter set at the target speed, that is, backed up to the target gain as the reference value.

8. The echo cancellation method for a device with AGC according to any one of claims 5-7, characterized in that, The second adjustment strategy includes: reducing the release signal duration in the static baseline parameter set, dynamically adjusting the target gain, and increasing the attack time.

9. The echo cancellation method for equipment with AGC according to claim 8, characterized in that, The target gain is dynamically adjusted according to the following formula to obtain the current real-time target gain. : In the formula, Represents the target gain in the static reference parameter set. Represents the proportionality coefficient, 0 , Indicates the current amplitude of the audio stream. This represents the long-term average amplitude of the audio stream.

10. The echo cancellation method for equipment with AGC according to claim 8, characterized in that, The second adjustment strategy also includes a second exit mechanism: when the amplitude fluctuations of all audio streams stabilize within a preset stability threshold and continue for a preset duration, the current target gain, attack time, and release signal duration are all reverted to the target gain, attack time, and release signal duration of the static reference parameter set.