Echo cancellation method and electronic device

By combining mixing, ducking, and adaptive filtering, the problem of nonlinear echo cancellation in existing technologies has been solved, achieving efficient echo cancellation and improved sound amplification, while enhancing sound fidelity and pickup distance.

CN119993179BActive Publication Date: 2026-07-31GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU BAOLUN ELECTRONICS CO LTD
Filing Date
2025-01-16
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing echo cancellation technology struggles to handle nonlinear echoes in complex scenes, making it difficult to completely eliminate residual echoes and reducing the user experience.

Method used

A combination of mixing, ducking, and adaptive filtering is used to accurately model linear echoes using an adaptive filter and suppress nonlinear residual echoes using a duck to generate echo-cancelled audio.

Benefits of technology

It achieves efficient elimination of nonlinear echoes, improves sound fidelity, enhances sound amplification, increases pickup distance, and achieves sound amplification at both near and far ends.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119993179B_ABST
    Figure CN119993179B_ABST
Patent Text Reader

Abstract

This application provides an echo cancellation method, device, and medium. The method includes: acquiring audio from a first microphone; obtaining remote audio transmitted by a remote audio device, the remote audio including a first audio, a second audio, and a third audio; mixing the second audio and the first microphone audio to generate amplified audio for sound reinforcement; performing ducking processing on the first microphone audio based on the first audio to generate ducking audio; performing adaptive filtering processing on the ducking audio and the second audio to obtain echo-canceling audio; and transmitting the echo-canceling audio to the remote audio device so that the remote audio device performs echo cancellation processing based on the acquired second microphone audio and the echo-canceling audio to generate new remote audio. This application can achieve efficient echo cancellation, improve sound fidelity, and achieve simultaneous near-end and far-end sound reinforcement, resulting in good sound reinforcement effect and increased pickup distance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of echo cancellation technology, and more specifically, to an echo cancellation method and an electronic device. Background Technology

[0002] Existing echo cancellation technologies primarily rely on adaptive filtering algorithms (such as LMS, NLMS, and RLS) or methods based on time-domain / frequency-domain ducking. Adaptive filtering algorithms perform echo cancellation under the condition that the echo path is linear. However, in real-world environments, audio equipment, microphones, and acoustic paths often exhibit nonlinear characteristics (such as nonlinear distortion in loudspeakers). Adaptive filters cannot accurately model these nonlinear characteristics (i.e., they struggle to handle echoes in complex scenes), resulting in incomplete elimination of residual echoes, limited echo cancellation effectiveness, and a degraded user experience. Summary of the Invention

[0003] This application addresses the shortcomings of existing methods by proposing an echo cancellation method and electronic device. This method can solve the problems that existing echo cancellation methods are unable to handle echoes in complex scenes, cannot effectively eliminate residual echoes, have limited echo cancellation effects, and reduce the user experience.

[0004] According to one aspect of the embodiments of this application, an echo cancellation method is provided for a near-end audio device connected to a far-end audio device, the method comprising:

[0005] The audio from the first microphone is collected to obtain the remote audio transmitted by the remote audio device, wherein the remote audio includes the first audio, the second audio, and the third audio.

[0006] The second audio and the first microphone audio are mixed to generate amplified audio for amplification, and the first microphone audio is ducked according to the first audio to generate ducked audio. The ducked audio and the second audio are then subjected to adaptive filtering to obtain echo-cancelled audio.

[0007] The echo-cancelled audio is transmitted to the remote audio device so that the remote audio device can amplify the sound and perform echo cancellation processing based on the acquired second microphone audio and the echo-cancelled audio to generate new remote audio.

[0008] In one possible implementation, the echo cancellation process includes ducking and adaptive filtering, and the ducking and adaptive filtering of the far-end audio device are performed in the same manner as those of the near-end audio device.

[0009] In one possible implementation, the mixing process for the second audio and the first microphone audio includes:

[0010] The second audio and the first microphone audio are mixed using audio-shared gain mixing to generate amplified audio.

[0011] In one possible implementation, generating ducking audio by performing ducking processing on the first microphone audio based on the first audio includes:

[0012] The dodging threshold is obtained based on the near-end sound reinforcement system of the near-end audio device;

[0013] Based on the comparison result between the dodging threshold and the first audio, the first microphone audio is subjected to dodging processing to generate the dodging audio.

[0014] In one possible implementation, the near-end sound reinforcement system includes a near-end microphone and a speaker, and the step of obtaining the dodging threshold based on the sound reinforcement system of the near-end audio device includes:

[0015] The dodging information is obtained from the near-end sound reinforcement system, and a dodging threshold is determined based on the dodging information. The dodging information includes at least one of the following: the position of the microphone and speaker, the microphone pickup distance, and the sound reinforcement level.

[0016] In one possible implementation, the step of performing ducking processing on the first microphone audio based on the comparison result between the ducking threshold and the first audio includes:

[0017] If it is determined that the volume or amplitude of the first audio is less than the ducking threshold, then the first microphone audio is determined to be ducking audio;

[0018] If it is determined that the volume or amplitude of the first audio is greater than or equal to the dodging threshold, then the first microphone audio is attenuated according to the ratio of the first audio to the first microphone audio to obtain the dodging audio.

[0019] In one possible implementation, the adaptive filtering process using the ducking audio and the second audio includes:

[0020] Obtain the echo signal corresponding to the echo path, and generate the echo cancellation audio based on the echo signal and the ducking audio.

[0021] According to one aspect of the embodiments of this application, an echo cancellation method is provided for a far-end audio device connected to a near-end audio device, the method comprising:

[0022] The system acquires audio from the second microphone and receives echo-cancelled audio transmitted by the near-end audio device, wherein the echo-cancelled audio is generated by the near-end audio device using the method described above.

[0023] Echo cancellation processing is performed based on the second microphone audio and the echo-cancelled audio to generate far-end audio, and the far-end audio is sent to the near-end audio device so that the near-end audio device generates new echo-cancelled audio.

[0024] Optionally, the remote audio device includes a remote sound reinforcement system, and receiving the echo-cancelled audio transmitted by the near-end audio device includes:

[0025] Once the echo-cancelled audio is received, the remote sound reinforcement system is used to generate the echo-cancelled audio and the mixed audio corresponding to the second microphone, and the mixed audio is amplified.

[0026] Sending the far-end audio to the near-end audio device includes:

[0027] The far-end audio is processed using an audio distributor to generate a first audio, a second audio, and a third audio, and the first audio, the second audio, and the third audio are sent to the near-end audio device.

[0028] According to one aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the methods described above.

[0029] The beneficial technical effects of the technical solutions provided in this application include:

[0030] The echo cancellation method provided in this application has the following advantages: It involves acquiring audio from a first microphone and obtaining remote audio transmitted from a remote audio device, the remote audio including a first audio, a second audio, and a third audio; mixing the second audio and the first microphone audio to generate amplified audio for sound reinforcement; performing ducking processing on the first microphone audio based on the first audio to generate ducked audio; and using adaptive filtering processing on the ducked audio and the second audio to obtain echo-cancelled audio; transmitting the echo-cancelled audio to the remote audio device so that the remote audio device can perform echo cancellation processing based on the acquired second microphone audio and echo-cancelled audio to generate new remote audio. This application can fully utilize the accurate modeling capability of adaptive filters for linear echoes and the suppression effect of ducking devices on nonlinear residual echoes to achieve efficient echo cancellation, improve sound fidelity, and achieve simultaneous near-end and far-end sound reinforcement, resulting in good sound reinforcement effect and increased pickup distance.

[0031] Additional aspects and advantages of this application will be set forth in part in the description which follows, and will become apparent from the description or may be learned by practice of this application. Attached Figure Description

[0032] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0033] Figure 1 A flowchart of an echo cancellation method for a near-end audio device provided in an embodiment of this application;

[0034] Figure 2 A schematic diagram of near-end echo cancellation and far-end echo cancellation provided for embodiments of this application;

[0035] Figure 3 A flowchart of an echo cancellation method for a remote audio device provided in an embodiment of this application;

[0036] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0037] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0038] Those skilled in the art will understand that, unless specifically stated otherwise, the terms "described" and "the" as used herein may also include plural forms. It should be further understood that the term "comprising" as used in this application's specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude other features, information, data, steps, operations, elements, components, and / or combinations thereof supported by this art. It should be understood that when we say an element is "connected" or "coupled" to another element, the element may be directly connected or coupled to the other element, or it may mean that the element and the other element are connected through an intermediate element. Furthermore, "connected" or "coupled" as used herein may include wireless connection or wireless coupling. The term "and / or" as used herein refers to at least one of the items defined by the term; for example, "A and / or B" may be implemented as "A," or as "B," or as "A and B."

[0039] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0040] This application provides an echo cancellation method that can be used in a near-end audio device connected to a far-end audio device. The near-end audio device includes a near-end sound reinforcement system, which may include a near-end microphone, an audio processing module, a power amplifier, and a speaker. Specifically, the near-end audio device can acquire audio from a first microphone via the near-end microphone, perform mixing, ducking, and adaptive filtering on the audio using the audio processing module, amplify the audio to be amplified, and play the amplified audio through a speaker.

[0041] Optionally, the audio processing module may include a mixing submodule, a ducking submodule, and an adaptive filtering submodule. The mixing submodule can be connected to a remote audio device and a near-end microphone, receiving audio transmitted from the near-end microphone and the cloud audio device and mixing the audio. The ducking submodule can be connected to both the near-end microphone and the adaptive filtering submodule, transmitting the ducked-out audio to the adaptive filtering submodule, which then outputs echo-cancelled audio.

[0042] like Figure 1 , Figure 2 As shown, the echo cancellation method of this application includes:

[0043] S101: Acquire audio from the first microphone and obtain remote audio transmitted by the remote audio device.

[0044] Optionally, the remote audio includes a first audio, a second audio, and a third audio. The first audio, the second audio, and the third audio are the same audio signal, which can be obtained by processing the remote audio transmitted by the remote audio device via an audio distributor.

[0045] Optionally, the near-end audio device acquires first microphone audio via a near-end microphone, which may include local human voice (original audio) and sound reflected from the near-end sound reinforcement system.

[0046] Optionally, the far-end audio can be network audio transmitted by the far-end audio device over a network. This far-end audio can be obtained through echo cancellation processing, which includes ducking processing and adaptive filtering processing. The ducking processing and adaptive filtering processing methods of the far-end audio device are the same as those of the near-end audio device.

[0047] In one embodiment, the remote audio device can be a voice communication terminal or a voice relay switch, such as a recording host or a video conferencing terminal. The remote audio device transmits the remote audio obtained after echo cancellation processing to an audio distributor, which processes the audio and then transmits it to the near-end audio device.

[0048] Optionally, after the near-end microphone acquires the audio from the first microphone, it transmits the first microphone audio to the ducking submodule and the mixing submodule. The far-end audio received by the near-end audio device is also transmitted to the ducking submodule and the mixing submodule for further processing based on the first microphone audio and the far-end audio.

[0049] S102: Mix the second audio and the first microphone audio to generate amplified audio for sound reinforcement, and perform ducking processing on the first microphone audio based on the first audio to generate ducked audio. Use the ducked audio and the second audio for adaptive filtering to obtain echo-cancelled audio.

[0050] Optionally, the mixing process for the second audio and the first microphone audio includes: performing audio-shared gain mixing on the second audio and the first microphone audio to generate amplified audio.

[0051] Optionally, the mixing process is performed through a mixing submodule, which encapsulates an audio mixing algorithm and performs audio shared gain mixing processing on the second audio and the first microphone audio through the audio mixing algorithm.

[0052] In one embodiment, during audio shared-gain mixing, the total energy is determined based on the volume or energy of the second audio and the first microphone audio, and the target output energy upper limit corresponding to the total energy is obtained. A shared gain factor is calculated based on the ratio of the total energy to the target value. Based on the shared gain factor, a shared gain is applied to the second audio and the first microphone audio, and combined with the channel weights of the second audio and the first microphone audio, the final gain of the second audio and the first microphone audio is obtained. Gain processing is performed on the second audio and the first microphone audio based on this final gain. Then, the gain-processed signals are added together to generate a mixed output audio. Finally, the mixed output audio is clipped to obtain amplified audio, thereby ensuring it remains within acceptable limits.

[0053] Optionally, generating ducking audio by performing ducking processing on the first microphone audio based on the first audio signal includes: obtaining a ducking threshold based on the near-end amplification system of the near-end audio device; and performing ducking processing on the first microphone audio based on the comparison result between the ducking threshold and the first audio signal to generate ducking audio.

[0054] Optionally, a dodging submodule is used to perform dodging processing to generate dodging audio. The dodging submodule uses the received first microphone audio as a dodging channel and the first audio as a reference signal, and adjusts the first microphone audio based on the reference signal and a dodging threshold.

[0055] Optionally, obtaining the dodging threshold based on the sound reinforcement system of the near-end audio device includes: obtaining dodging information based on the near-end sound reinforcement system, and determining the dodging threshold based on the dodging information, wherein the dodging information includes at least one of the positions of the microphone and speaker, the microphone pickup distance, and the sound reinforcement level.

[0056] Optionally, the dodging information includes the layout information of the near-end sound reinforcement system, the reflection information of the near-end sound reinforcement system is obtained based on the layout information, the threshold of the nonlinear echo (i.e., the dodging threshold) is obtained based on the reflection information, and the dodging processing is performed using the dodging threshold.

[0057] Optionally, the first microphone audio is subjected to ducking processing based on the comparison result between the ducking threshold and the first audio, including: if it is determined that the volume or amplitude of the first audio is less than the ducking threshold, then the first microphone audio is determined as ducked audio; if it is determined that the volume or amplitude of the first audio is greater than or equal to the ducking threshold, then the first microphone audio is attenuated according to the ratio of the first audio to the first microphone audio to obtain the ducked audio.

[0058] Optionally, the ratio of the first audio signal to the first microphone audio signal can be the ratio of the signal amplitudes. Specifically, 10 times this ratio can be used as the attenuation gain of the first microphone audio signal.

[0059] In one embodiment, when the volume of the first audio is less than the ducking threshold, it can be determined that the audio from the far end is small and will not form a nonlinear echo at the near end, so the first microphone audio can be directly identified as the ducking audio. When the volume of the first audio is greater than or equal to the ducking threshold, the ratio of the signal amplitudes of the first audio and the first microphone audio is obtained. Based on this ratio, an adaptive attenuation gain is applied to the first microphone audio (e.g., using 10 times the ratio as the attenuation gain of the first microphone audio) to obtain the ducking audio. The ducking processing method can effectively suppress nonlinearity and amplitude in the audio.

[0060] Optionally, adaptive filtering is performed using the ducking audio and the second audio, including: acquiring the echo signal corresponding to the echo path, and generating echo cancellation audio based on the echo signal and the ducking audio. The echo path can be determined based on the layout of the near-end sound reinforcement system and the space where the near-end sound reinforcement system is located.

[0061] Optionally, the adaptive filtering submodule may include a filter through which the echo path is modeled. To make the echo path as close as possible to the real echo path, an adaptive filtering algorithm can be used to adjust the filter's weight vector when acquiring the echo path. Specifically, the adaptive filtering algorithm can be the NLMS algorithm, which gradually adjusts the filter's weight vector using gradient descent, or it can be other types of filtering algorithms suitable for echo cancellation.

[0062] Optionally, the adaptive filtering submodule inputs the ducking audio to the filter, and the filter outputs the echo signal corresponding to the ducking audio. The audio signal after subtracting the echo signal from the ducking audio is determined as the echo-cancelled audio.

[0063] S103: Transmit the echo-cancelled audio to the remote audio device so that the remote audio device can amplify the sound and perform echo cancellation processing based on the acquired second microphone audio and the echo-cancelled audio to generate new remote audio.

[0064] Optionally, the echo-cancelled audio can be transmitted to a remote audio device via a network, wherein the network transmission method can be at least one of wired transmission and wireless transmission.

[0065] Optionally, after receiving the echo-cancelled audio, the remote audio device can perform echo cancellation processing on the second microphone audio based on the echo-cancelled audio to obtain new remote audio, and use the remote audio for remote amplification and send the new remote audio to the near-end audio device so that the near-end audio device can amplify the sound and output the new echo-cancelled audio.

[0066] Optionally, the structure of the far-end audio device can be the same as that of the near-end audio device. The far-end audio device may include a far-end sound reinforcement system, the structure of which can be the same as that of the near-end sound reinforcement system. The far-end audio device acquires audio from a second microphone via a far-end microphone in the far-end sound reinforcement system. After receiving the echo-cancelled audio, it can use the far-end sound reinforcement system to mix the second microphone audio and the echo-cancelled audio to obtain an audio signal usable for amplification. Far-end sound reinforcement is then performed based on this audio signal. Alternatively, the echo-cancelled audio can be used as a reference signal. Based on this reference signal, the echo-cancelled audio can undergo ducking processing to obtain a first ducked audio. The echo signal corresponding to the echo-cancelled audio is then obtained through an adaptive filter in the far-end sound reinforcement system. Based on this echo signal, the first ducked audio undergoes adaptive filtering processing to obtain the far-end audio. The mixing, ducking, and adaptive filtering methods can differ from those of the near-end audio device.

[0067] The echo cancellation method of this application acquires audio from a first microphone and obtains far-end audio transmitted by a far-end audio device. The far-end audio includes a first audio, a second audio, and a third audio. The second audio and the first microphone audio are mixed to generate amplified audio for sound reinforcement. The first microphone audio is then subjected to ducking processing based on the first audio to generate ducked audio. The ducked audio and the second audio are then subjected to adaptive filtering to obtain echo-canceling audio. The echo-canceling audio is transmitted to the far-end audio device so that the far-end audio device performs echo cancellation processing based on the acquired second microphone audio and echo-canceling audio to generate new far-end audio. This application can fully utilize the accurate modeling capability of adaptive filters for linear echoes and the suppression effect of ducking devices on nonlinear residual echoes to achieve efficient echo cancellation, improve sound fidelity, and achieve simultaneous near-end and far-end sound reinforcement, resulting in good sound reinforcement effect and increased pickup distance.

[0068] Based on the same inventive concept, embodiments of this application also provide an echo cancellation method, which is used for a far-end audio device connected to a near-end audio device, such as... Figure 3 As shown, the method includes:

[0069] S201: Acquire audio from the second microphone and receive echo-cancelled audio transmitted from the near-end audio device.

[0070] Optionally, the echo-cancelled audio is generated by the near-end audio device using the method described in the above embodiments. This echo-cancelled audio can be transmitted to a remote audio device as network audio.

[0071] Optionally, the remote audio device may include a remote microphone that can capture audio from a second microphone, the audio of which may include human voices at the location of the remote audio device and reflected echoes.

[0072] S202: Perform echo cancellation processing based on the second microphone audio and the echo cancellation audio to generate far-end audio, and send the far-end audio to the near-end audio device so that the near-end audio device generates new echo cancellation audio.

[0073] Optionally, the remote audio device includes a remote sound reinforcement system that receives echo-cancelled audio transmitted from the near-end audio device, including: determining that the echo-cancelled audio has been received, generating the echo-cancelled audio and a mixed audio corresponding to the second microphone using the remote sound reinforcement system, and performing sound reinforcement processing on the mixed audio; and sending the remote audio to the near-end audio device, including: processing the remote audio using an audio distributor to generate a first audio, a second audio, and a third audio, and sending the first audio, the second audio, and the third audio to the near-end audio device. The first audio, the second audio, and the third audio are respectively sent to different sub-modules in the near-end audio device for different processing.

[0074] The beneficial effects of the echo cancellation method in this application are as follows:

[0075] 1. Long pickup distance: By amplifying both near and far ends, the local pickup distance exceeds 40cm, allowing speakers to communicate naturally without having to point their microphones or change their speaking volume.

[0076] 2. Improve collaboration efficiency: It enables simultaneous local amplification of near-end and far-end audio, ensuring that all participants can clearly hear the speeches from near-end and far-end speakers in large-space scenarios.

[0077] 3. Remote audio restoration: Enables remote audio to be restored to the scene through amplification, allowing listeners to hear the sound without relying on a single sound source (such as speakers or headphones).

[0078] 4. Echo Suppression: Combining ducking with adaptive filtering, it can amplify the sound while avoiding howling or echo interference, thus improving audio quality.

[0079] 5. Expanding Complex Scenarios: It can adapt to environments with various nonlinear interferences (such as low-quality equipment or high sound pressure scenarios), expanding the working range and effect of audio devices.

[0080] 6. Flexible speaking: Allows speakers near the microphone to be clearly picked up and amplified without having to deliberately point their microphones at the microphone, increasing the flexibility and convenience of speaking.

[0081] Based on the same inventive concept, embodiments of this application provide an electronic device, such as... Figure 4 As shown, Figure 4 The illustrated electronic device 2000 includes a processor 2001 and a memory 2003. The processor 2001 and the memory 2003 are communicatively connected, for example, via a bus 2002.

[0082] Processor 2001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), a FPGA (Field-Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 2001 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0083] Bus 2002 may include a pathway for transmitting information between the aforementioned components. Bus 2002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 2002 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the figure, but this does not indicate that there is only one bus or one type of bus.

[0084] The memory 2003 may be ROM (Read-Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read-Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0085] Optionally, the electronic device 2000 may also include a communication unit 2004. The communication unit 2004 can be used for receiving and transmitting signals. The communication unit 2004 allows the electronic device 2000 to communicate wirelessly or wiredly with other devices to exchange data. It should be noted that in practical applications, the communication unit 2004 is not limited to one.

[0086] Optionally, the electronic device 2000 may further include an input unit 2005. The input unit 2005 can be used to receive input numbers, characters, images, and / or sound information, or to generate key signal inputs related to user settings and function control of the electronic device 2000. The input unit 2005 may include, but is not limited to, one or more of the following: a touchscreen, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, a joystick, a camera, a microphone, etc.

[0087] Optionally, the electronic device 2000 may also include an output unit 2006. The output unit 2006 can be used to output or display information processed by the processor 2001. The output unit 2006 may include, but is not limited to, one or more of a display device, a speaker, a vibration device, etc.

[0088] Although the electronic device 2000 with various devices is shown in the figure, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0089] Optionally, the memory 2003 is used to store a computer program for executing the scheme of this application, and its execution is controlled by the processor 2001. The processor 2001 is used to execute the computer program stored in the memory 2003 to implement the steps of any method provided in the embodiments of this application.

[0090] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by an electronic device / processor, implements the steps of any method provided in this application or the steps of various optional implementations of the method provided in this application.

[0091] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in related technologies that are similar to those disclosed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.

[0092] In the description of this application, the terms "center," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate directions or positional relationships based on the exemplary directions or positional relationships shown in the accompanying drawings. They are used to facilitate the description or simplification of the embodiments of this application and are not intended to indicate or imply that the device or component referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0093] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0094] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0095] In the description of this specification, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.

[0096] The above description is only a partial implementation of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application, without departing from the technical concept of this application, also fall within the protection scope of the embodiments of this application.

Claims

1. An echo cancellation method, characterized by, For a near-end audio device connected to a remote audio device, the method includes: The audio from the first microphone is collected to obtain the remote audio transmitted by the remote audio device. The remote audio includes a first audio, a second audio, and a third audio. The first microphone audio includes local human voice and sound reflected from the near-end sound reinforcement system. The first audio, the second audio, and the third audio are the same audio signal. The second audio and the first microphone audio are mixed to generate amplified audio for amplification, and the first microphone audio is ducked according to the first audio to generate ducked audio. The ducked audio and the second audio are then subjected to adaptive filtering to obtain echo-cancelled audio. The echo-cancelled audio is transmitted to the remote audio device so that the remote audio device can amplify the sound and perform echo cancellation processing based on the acquired second microphone audio and the echo-cancelled audio to generate new remote audio. The step of generating ducking audio by performing ducking processing on the first microphone audio based on the first audio includes: The dodging threshold is obtained based on the near-end sound reinforcement system of the near-end audio device. The dodging threshold is a threshold for nonlinear echo. The acquisition of the threshold includes: obtaining the reflection information of the near-end sound reinforcement system based on the layout information of the near-end sound reinforcement system, and obtaining the threshold for nonlinear echo based on the reflection information. If it is determined that the volume or amplitude of the first audio is less than the ducking threshold, then the first microphone audio is determined to be ducking audio; If it is determined that the volume or amplitude of the first audio is greater than or equal to the ducking threshold, then the ratio of the signal amplitudes of the first audio and the first microphone audio is obtained, and the first microphone audio is adaptively attenuated and the gain is adjusted according to the ratio to obtain the ducking audio.

2. The echo cancellation method of claim 1, wherein, The echo cancellation process includes ducking and adaptive filtering. The ducking and adaptive filtering methods of the far-end audio device are the same as those of the near-end audio device.

3. The echo cancellation method of claim 1, wherein, The mixing process for the second audio and the first microphone audio includes: The second audio and the first microphone audio are mixed using audio-shared gain mixing to generate amplified audio.

4. The echo cancellation method of claim 1, wherein, The adaptive filtering process using the ducking audio and the second audio includes: Obtain the echo signal corresponding to the echo path, and generate the echo cancellation audio based on the echo signal and the ducking audio.

5. An echo cancellation method characterized by, The method for a remote audio device connected to a near-end audio device includes: Acquire audio from the second microphone and receive echo-cancelled audio transmitted by the near-end audio device, wherein the echo-cancelled audio is generated by the near-end audio device using the method described in any one of claims 1-4; Echo cancellation processing is performed based on the second microphone audio and the echo-cancelled audio to generate far-end audio, and the far-end audio is sent to the near-end audio device so that the near-end audio device generates new echo-cancelled audio.

6. The echo cancellation method of claim 5, wherein, The remote audio device includes a remote sound reinforcement system, and the receiving of echo-cancelled audio transmitted by the near-end audio device includes: Once the echo-cancelled audio is received, the remote sound reinforcement system is used to generate the echo-cancelled audio and the mixed audio corresponding to the second microphone, and the mixed audio is amplified. Sending the far-end audio to the near-end audio device includes: The far-end audio is processed using an audio distributor to generate a first audio, a second audio, and a third audio, and the first audio, the second audio, and the third audio are sent to the near-end audio device.

7. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program comprises instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1-6. The processor executes the computer program to implement the steps of the method as described in any one of claims 1-6.