Audio echo cancellation method, module and related device
By identifying and adapting interface strategies to different application scenarios, the audio echo cancellation module becomes adaptive, solving the compatibility problem of audio echo cancellation technology in various scenarios and improving the quality of audio signal output.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN TIMEKETTLE TECH CO LTD
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-12
AI Technical Summary
Existing audio echo cancellation technology has poor compatibility in various application scenarios and is difficult to adjust flexibly for different device types, communication protocols and acoustic environments, resulting in poor audio signal output quality.
By identifying the target application scenario, determining the corresponding target interface, and performing the target echo cancellation operation according to the interface, including the identification unit, determination unit, and execution unit, the audio echo cancellation module achieves adaptability, applicable to both non-WebRTC and WebRTC application scenarios. It utilizes techniques such as root mean square filtering, dynamic delay matching, and anomaly handling to improve audio signal quality.
It improves the compatibility of audio echo cancellation technology in various application scenarios and the quality of audio signal output, adapts to changes in different device types, communication protocols and acoustic environments, and enhances the overall quality of audio signals.
Smart Images

Figure CN121600946B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this application relate to the field of audio signal processing, and more particularly to an audio echo cancellation method, module, and related equipment. Background Technology
[0002] Acoustic echo cancellation (AEC) technology is mainly used in real-time audio communication scenarios such as video conferencing, VoIP, and online game voice communication.
[0003] Currently, the relevant technologies suffer from poor compatibility with various application scenarios. Summary of the Invention
[0004] According to embodiments of this application, an audio echo cancellation method, module, and related device are provided. By identifying the target application scenario, the corresponding target interface is determined; the target echo cancellation operation is performed on the input raw audio signal according to the target interface to output the target audio signal. This enables the application scenario adaptation of the audio echo cancellation algorithm, flexibly adjusting the interface strategy for different device types, communication protocols, and / or acoustic environments, thereby improving the compatibility of audio echo cancellation technology in various application scenarios and specifically improving the output quality of audio signals in specific application scenarios.
[0005] In a first aspect of this application, an audio echo cancellation method is provided, comprising:
[0006] Identify the target application scenario;
[0007] Determine the corresponding target interface based on the target application scenario;
[0008] Based on the target interface, perform target echo cancellation on the input raw audio signal to output the target audio signal.
[0009] In some feasible implementations, the above-mentioned determination of the corresponding target interface based on the target application scenario includes:
[0010] If it is determined that the target application scenario corresponds to the target non-WebRTC application scenario, the target interface is determined to correspond to the first target interface;
[0011] If the target application scenario corresponds to the target WebRTC application scenario, then the target interface is determined to correspond to the second target interface.
[0012] In some feasible implementations, the aforementioned first target interface is applicable to a first target interface function set, including:
[0013] The target instance creation function, the target audio parameter initialization function, the target input / output function, and / or the target instance destruction function.
[0014] In some feasible implementations, the aforementioned second target interface is applicable to a set of second target interface functions, including:
[0015] The target interface transforms the function call, and / or the target instance returns the function.
[0016] In some feasible implementations, the above-described target echo cancellation operation on the input raw audio signal according to the target interface to output the target audio signal includes:
[0017] Determine the target root mean square filter parameters based on the original audio signal;
[0018] Based on the target root mean square filter parameters, the target filter operation is performed on the audio signal block corresponding to the original audio signal so that the convergence of the first target frequency band is greater than or equal to the preset convergence.
[0019] And / or, the stability corresponding to the second target frequency band is greater than or equal to the preset stability;
[0020] The energy value corresponding to the first target frequency band is greater than the energy value corresponding to the second target frequency band.
[0021] In some feasible implementations, the above method further includes:
[0022] Perform target dynamic delay matching operation on multiple target intervals of the audio signal block to dynamically update the target delay compensation amount, so that the waveform difference between the original audio signal and the target reference signal is less than the preset difference;
[0023] Among them, there are multiple target ranges, including: the acquisition range, and / or the rendering range.
[0024] In some feasible implementations, the above method further includes:
[0025] If an anomaly is detected in the target, the target dynamic delay matching operation is corrected based on the smoothing results of the historical delay sequence and / or the confidence assessment results.
[0026] Among these, target anomalies include: delay mutations, data packet loss, and / or, signal energy anomalies.
[0027] In a second aspect of this application, an audio echo cancellation module is provided, comprising:
[0028] The identification unit is used to identify the target application scenario.
[0029] The determination unit is used to determine the corresponding target interface based on the target application scenario;
[0030] The execution unit is used to perform target echo cancellation operation on the input raw audio signal according to the target interface, so as to output the target audio signal.
[0031] In a third aspect of this application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the method described above.
[0032] In a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0033] This application provides an audio echo cancellation method, module, and related device. The method includes: identifying a target application scenario; determining a corresponding target interface based on the target application scenario; and performing a target echo cancellation operation on the input raw audio signal according to the target interface to output a target audio signal. This application can achieve application scenario adaptability of the audio echo cancellation algorithm, flexibly adjusting the interface strategy for different device types, communication protocols, and / or acoustic environments, thereby improving the compatibility of audio echo cancellation technology in various application scenarios and specifically improving the output quality of audio signals in specific application scenarios.
[0034] It should be understood that the description in the Summary Section is not intended to limit the key or essential features of the embodiments of this application, nor is it intended to restrict the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0035] The above and other features, advantages, and aspects of the embodiments of this application will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0036] Figure 1 This is a flowchart illustrating an audio echo cancellation method according to an embodiment of this application;
[0037] Figure 2 This is a structural schematic diagram of an audio echo cancellation module provided according to an embodiment of this application;
[0038] Figure 3 This is a structural schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0040] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0041] In a first aspect of this application, an audio echo cancellation method is provided. Figure 1 This paper illustrates a flowchart of an audio echo cancellation method 100 proposed in an embodiment of this application, as shown below. Figure 1 As shown, method 100 includes:
[0042] Step S1: Identify the target application scenario.
[0043] For example, the target application scenario described above can be used to determine the device application type, communication protocol, and / or acoustic environment, etc.
[0044] Specifically, the above-mentioned device application types may include: mobile terminals, desktop terminals, and / or, conferencing systems, etc.
[0045] Specifically, the aforementioned communication protocols may include: SIP, VoIP, and / or WebRTC, etc.
[0046] Specifically, the aforementioned acoustic environments may include: conference rooms, vehicle interiors, and / or, outdoors, etc.
[0047] Step S2: Determine the corresponding target interface based on the target application scenario.
[0048] For example, the corresponding target interface can be determined based on the device application type, communication protocol, and / or acoustic environment, etc.
[0049] It should be noted that the target interface mentioned above may include AECNG_ADM_API to adapt to the next generation of audio echo cancellation technology (AECNG).
[0050] In some feasible implementations, step S2 above, determining the corresponding target interface based on the target application scenario, includes:
[0051] Step S21: If it is determined that the target application scenario corresponds to the target non-WebRTC application scenario, the target interface is determined to correspond to the first target interface.
[0052] For example, the first target interface mentioned above may include a native library interface, which can be integrated and called by other applications in non-WebRTC application scenarios.
[0053] In some feasible implementations, the aforementioned first target interface is applicable to a first target interface function set, including:
[0054] The target instance creation function, the target audio parameter initialization function, the target input / output function, and / or the target instance destruction function.
[0055] For example, the target instance creation function described above may include:
[0056] aecng_adm_create(config) is used to create a target instance.
[0057] For example, the target audio parameter initialization function described above may include:
[0058] aecng_adm_init(instance, sample_rate, channels) is used to initialize the target audio parameters.
[0059] For example, the target input-output function described above may include:
[0060] aecng_adm_process_capture(instance, mic_in, samples_out),
[0061] And / or,
[0062] aecng_adm_process_render(instance, audio_out).
[0063] Specifically, the above-mentioned aecng_adm_process_capture(instance, mic_in, samples_out) is used to input the original audio signal and / or output the target audio signal.
[0064] The aforementioned raw audio signal may include: the raw microphone signal (mic_in). The aforementioned target audio signal may include: the near-end speech signal processed by AECNG, etc.
[0065] Specifically, the above aecng_adm_process_render(instance, audio_out) is used to input the target reference signal.
[0066] The aforementioned target reference signal may include: the remote reference signal (audio_out) that is about to be played, for use by the AEC engine.
[0067] For example, the target instance destruction function mentioned above may include: aecng_adm_destroy(instance), which is used to destroy the target instance.
[0068] Therefore, the above method can link to the first target interface and call the corresponding first target API in non-WebRTC application scenarios to output the echo-cancelled target audio signal in non-WebRTC application scenarios. This makes the method no longer limited to the WebRTC ecosystem and can be quickly integrated into any audio application or device that requires echo cancellation through standardized APIs, thereby improving the applicability of the method to non-WebRTC application scenarios.
[0069] Step S22: If it is determined that the target application scenario corresponds to the target WebRTC application scenario, then the target interface is determined to correspond to the second target interface.
[0070] For example, the second target interface mentioned above may include a WebRTC Adapter Interface to adapt to the AudioDeviceModule interface specification defined by the WebRTC platform in the target WebRTC application scenario.
[0071] In some feasible implementations, the aforementioned second target interface is applicable to a set of second target interface functions, including:
[0072] The target interface transforms the function call, and / or the target instance returns the function.
[0073] The aforementioned second target interface function set can correspond to the virtual function set of the AudioDeviceModule interface class.
[0074] In some feasible implementations, the target interface conversion call function mentioned above may include: StartRecording(); RecordedDataIsAvailable(); aecng_adm_process_capture; StartPlayout(); NeedMorePlayData(); and / or aecng_adm_process_render, used to convert the interface call operation corresponding to the target WebRTC application scenario.
[0075] For example, when it is determined that the target application scenario corresponds to the target WebRTC application scenario, the calls initiated by the WebRTC framework through its native ADM interface, such as StartRecording() and RecordedDataIsAvailable(), will be converted and bridged to the independent library interface inside the audio echo cancellation module, such as aecng_adm_process_capture. This enables the WebRTC audio pipeline to seamlessly perform target echo cancellation operations on the input raw audio signal according to the second target interface, so as to output the target audio signal.
[0076] For example, if it is determined that the target application scenario corresponds to the target WebRTC application scenario, playback-related calls, such as StartPlayout() and NeedMorePlayData(), can be converted and invoked to aecng_adm_process_render.
[0077] In some feasible implementations, the target instance return function may include:
[0078] The CreateAudioDeviceModule is used to return the target instance.
[0079] For example, when it is determined that the target application scenario corresponds to the target WebRTC application scenario, the WebRTC factory function, such as CreateAudioDeviceModule, can return an AudioDeviceModule object instance to completely replace the original WebRTC ADM implementation and seamlessly perform target echo cancellation operation on the input raw audio signal according to the second target interface to output the target audio signal.
[0080] It should be noted that the above method can seamlessly replace the built-in ADM based on the native ADM interface without modifying the WebRTC core source code, when the target application scenario is determined to correspond to the target WebRTC application scenario. This enables the target echo cancellation operation to be seamlessly performed on the input raw audio signal to output the target audio signal according to the second target interface.
[0081] Therefore, the above method can adaptively select the corresponding target interface according to the target application scenario, thereby improving the compatibility and applicability for both target non-WebRTC application scenarios and target WebRTC application scenarios.
[0082] Step S3: Perform target echo cancellation operation on the input raw audio signal according to the target interface to output the target audio signal.
[0083] For example, the root mean square (RMS) normalization operation can be performed on the input raw audio signal according to the target interface to output the target audio signal.
[0084] In some feasible implementations, step S3 above; performing target echo cancellation operation on the input raw audio signal according to the target interface to output the target audio signal, includes:
[0085] Step S31: Determine the target root mean square filter parameters based on the original audio signal.
[0086] Step S32: Perform target filtering operation on the audio signal block corresponding to the original audio signal according to the target root mean square filtering parameters, so that the convergence of the first target frequency band is greater than or equal to the preset convergence.
[0087] And / or, the stability corresponding to the second target frequency band is greater than or equal to the preset stability;
[0088] The energy value corresponding to the first target frequency band is greater than the energy value corresponding to the second target frequency band.
[0089] For example, the dynamic adjustment adaptive step size of the target root mean square filter parameters can be determined based on the root mean square (RMS) of the original audio signal; based on the dynamic adjustment adaptive step size, the target filtering operation is performed on the audio signal block corresponding to the original audio signal, so that the convergence of the first target frequency band is greater than or equal to the preset convergence; and / or, the stability of the second target frequency band is greater than or equal to the preset stability.
[0090] Specifically, the first target frequency band mentioned above can correspond to a higher energy frequency band. The second target frequency band mentioned above can correspond to a lower energy frequency band.
[0091] Specifically, the aforementioned preset convergence and / or preset stability are positively correlated with the output quality requirements of the target audio signal. That is, the higher the output quality requirements of the target audio signal, the greater the aforementioned preset convergence and / or preset stability.
[0092] Therefore, the above method can perform target filtering operation on the audio signal block corresponding to the original audio signal according to the target root mean square filtering parameters, so that the convergence of the first target frequency band is greater than or equal to the preset convergence; and / or the stability of the second target frequency band is greater than or equal to the preset stability. This reduces the computational complexity while making the first target frequency band of the output target audio signal converge faster and the second target frequency band remain stable, thereby improving the output quality of the target audio signal.
[0093] It should be noted that the instruction sets corresponding to steps S31 to S32 can be optimized in parallel to avoid the limitations of the traditional WebRTC built-in AEC in fully implementing the target echo cancellation operation on the input raw audio signal according to the target interface in order to output the target audio signal.
[0094] For example, SIMD instructions, such as x86 AVX / AVX2 and ARM NEON, can be used to accelerate the vector operations of the filter, so as to achieve parallel optimization of the instruction set corresponding to steps S31 to S32.
[0095] In some feasible implementations, the above method further includes:
[0096] Step S33: Perform target dynamic delay matching operation on multiple target intervals of the audio signal block to dynamically update the target delay compensation amount, so that the waveform difference between the original audio signal and the target reference signal is less than the preset difference;
[0097] Among them, there are multiple target ranges, including: the acquisition range, and / or the rendering range.
[0098] For example, based on cross-correlation analysis and energy envelope detection, a target dynamic delay matching operation can be performed on the acquisition interval and / or rendering interval of the audio signal block to dynamically update the target delay compensation amount according to network jitter and / or device scheduling changes. The corresponding pointers of the acquisition interval and / or rendering interval are adjusted through a feedback control loop so that the waveform difference between the original audio signal and the target reference signal is less than a preset difference.
[0099] Specifically, the aforementioned preset difference is negatively correlated with the output quality requirements of the target audio signal; that is, the higher the output quality requirements of the target audio signal, the smaller the aforementioned preset difference.
[0100] Therefore, the above method dynamically updates the target delay compensation amount by performing target dynamic delay matching operations on multiple target intervals of the audio signal block, so that the waveform difference between the original audio signal and the target reference signal is less than the preset difference. This is beneficial to further improve the output quality of the target audio signal in different application scenarios through multi-level delay estimation and adaptive delay tracking.
[0101] In some feasible implementations, the above method further includes:
[0102] Step S34: If it is determined that there is a target anomaly, correct the target dynamic delay matching operation based on the smoothing results of the historical delay sequence and / or the confidence assessment results.
[0103] Among these, target anomalies include: delay mutations, data packet loss, and / or, signal energy anomalies.
[0104] For example, when it is determined that there is a delay mutation, data packet loss, and / or abnormal signal energy, the target dynamic delay matching operation can be corrected based on the smoothing results of historical delay sequences and / or the confidence assessment results, thereby improving the execution accuracy of the target dynamic delay matching operation, avoiding incorrect matching, and thus improving the robustness of this method.
[0105] It should be noted that the instruction sets corresponding to steps S33 to S34 can be optimized to improve computational efficiency.
[0106] For example, based on the target algorithm code, the target platform can be deeply optimized at the underlying SIMD instruction level to optimize the instruction set corresponding to steps S33 to S34.
[0107] Specifically, the target algorithm code mentioned above may include corresponding algorithm code for filtering, discrete Fourier transform (FFT), and / or energy calculation.
[0108] Specifically, the target platforms mentioned above may include: x86: SSE / AVX / AVX2, and / or, ARM: NEON, etc.
[0109] Based on this, the audio echo cancellation method provided in this application includes: identifying the target application scenario; determining the corresponding target interface according to the target application scenario; and performing a target echo cancellation operation on the input original audio signal according to the target interface to output the target audio signal. This application can achieve application scenario adaptability of the audio echo cancellation algorithm, flexibly adjusting the interface strategy for different device types, communication protocols, and / or acoustic environments, thereby improving the compatibility of audio echo cancellation technology in various application scenarios and improving the output quality of the audio signal.
[0110] It should be noted that, for the sake of simplicity, the aforementioned system embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0111] The above is an introduction to the method embodiments. The following describes the solution described in this application through device embodiments.
[0112] In a second aspect of this application, an audio echo cancellation module is provided. Figure 2 A structural schematic diagram of an audio echo cancellation module 200 according to an embodiment of this application is shown, as follows. Figure 2 As shown, the audio echo cancellation module 200 includes: a recognition unit 210, a determination unit 220, and an execution unit 230.
[0113] The identification unit 210 is used to identify the target application scenario.
[0114] The determining unit 220 is used to determine the corresponding target interface based on the target application scenario.
[0115] In some feasible implementations, the above-mentioned determination of the corresponding target interface based on the target application scenario includes:
[0116] If it is determined that the target application scenario corresponds to the target non-WebRTC application scenario, the target interface is determined to correspond to the first target interface;
[0117] If the target application scenario corresponds to the target WebRTC application scenario, then the target interface is determined to correspond to the second target interface.
[0118] In some feasible implementations, the aforementioned first target interface is applicable to a first target interface function set, including:
[0119] The target instance creation function, the target audio parameter initialization function, the target input / output function, and / or the target instance destruction function.
[0120] In some feasible implementations, the aforementioned second target interface is applicable to a set of second target interface functions, including:
[0121] The target interface transforms the function call, and / or the target instance returns the function.
[0122] The execution unit 230 is used to perform target echo cancellation operation on the input raw audio signal according to the target interface, so as to output the target audio signal.
[0123] In some feasible implementations, the execution unit 230 may include: an independent compilation component 231, an audio acquisition component 232, an audio rendering component 233, an echo cancellation component 234, and an audio pre- and post-processing component 235 to perform target echo cancellation operation on the input raw audio signal and output the target audio signal.
[0124] For example, the aforementioned independent compilation component 231 may include: AECNG_ADM_Module. The aforementioned AECNG_ADM_Module may include: dynamic library files, such as: so / .dll, and / or, static library files, such as: a / .lib.
[0125] For example, the audio acquisition component 232 described above can be used for the acquisition buffer management of the original audio signal.
[0126] For example, the audio rendering component 233 described above can be used for rendering buffer management of the original audio signal.
[0127] For example, the echo cancellation component 234 described above may include: a next-generation echo cancellation core engine (AECNGCore Engine) for performing target echo cancellation operation on the input raw audio signal according to the target interface to output the target audio signal.
[0128] In some feasible implementations, the above-described target echo cancellation operation on the input raw audio signal according to the target interface to output the target audio signal includes:
[0129] Determine the target root mean square filter parameters based on the original audio signal;
[0130] Based on the target root mean square filter parameters, the target filter operation is performed on the audio signal block corresponding to the original audio signal so that the convergence of the first target frequency band is greater than or equal to the preset convergence.
[0131] And / or, the stability corresponding to the second target frequency band is greater than or equal to the preset stability;
[0132] The energy value corresponding to the first target frequency band is greater than the energy value corresponding to the second target frequency band.
[0133] In some feasible implementations, the above method further includes:
[0134] Perform target dynamic delay matching operation on multiple target intervals of the audio signal block to dynamically update the target delay compensation amount, so that the waveform difference between the original audio signal and the target reference signal is less than the preset difference;
[0135] Among them, there are multiple target ranges, including: the acquisition range, and / or the rendering range.
[0136] In some feasible implementations, the above method further includes:
[0137] If an anomaly is detected in the target, the target dynamic delay matching operation is corrected based on the smoothing results of the historical delay sequence and / or the confidence assessment results.
[0138] Among these, target anomalies include: delay mutations, data packet loss, and / or, signal energy anomalies.
[0139] For example, the audio pre- and post-processing components 235 described above are used to perform gain control and / or noise suppression processing on the original audio signal after echo cancellation in order to output a target audio signal.
[0140] It should be noted that the audio acquisition component 232, audio rendering component 233, echo cancellation component 234, and audio pre- and post-processing component 235 mentioned above can be encapsulated in the execution unit 230.
[0141] Based on this, the audio echo cancellation module provided in this application does not rely on the core source code of WebRTC or other specific communication frameworks. It can achieve application scenario adaptation of the audio echo cancellation algorithm, flexibly adjust the interface strategy for different device types, communication protocols, and / or acoustic environments, thereby improving the compatibility of audio echo cancellation technology in various application scenarios and specifically improving the output quality of audio signals in specific application scenarios.
[0142] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the described method can be referred to the corresponding process in the aforementioned system embodiments, and will not be repeated here.
[0143] In a third aspect of this application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0144] Figure 3 A structural schematic diagram of an electronic device suitable for implementing embodiments of this application is shown.
[0145] like Figure 3As shown, the electronic device includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes based on a program stored in a read-only memory (ROM) 302 or a program loaded from a storage section 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for server operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0146] The following components are connected to I / O interface 305: an input section 306 including a keyboard, mouse, etc.; an output section 307 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to I / O interface 305 as needed. A removable medium 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 310 as needed so that computer programs read from it can be installed into storage section 308 as needed.
[0147] Specifically, according to embodiments of this application, the above method flow steps can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a machine-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the functions defined in the system of this application.
[0148] In a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0149] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0150] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0151] The units or modules described in the embodiments of this application can be implemented in software or hardware. The described units or modules can also be located in a processor. The names of these units or modules do not, in certain circumstances, constitute a limitation on the unit or module itself.
[0152] In another aspect, this application also provides a computer-readable storage medium, which may be included in the server described in the above embodiments; or it may exist independently and not assembled into the server. The aforementioned computer-readable storage medium stores one or more programs that, when used by one or more processors, execute the methods described in this application.
[0153] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the foregoing application concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions claimed in this application.
Claims
1. An audio echo cancellation method, characterized in that, include: Identify the target application scenario; Based on the target application scenario, determine the corresponding target interface; According to the target interface, a target echo cancellation operation is performed on the input raw audio signal to output a target audio signal, including: Based on the original audio signal, the target root mean square filter parameters are determined; based on the target root mean square filter parameters, a target filtering operation is performed on the audio signal block corresponding to the original audio signal so that the convergence of the first target frequency band is greater than or equal to the preset convergence. And / or, the stability corresponding to the second target frequency band is greater than or equal to the preset stability; The step of performing a target filtering operation on the audio signal block corresponding to the original audio signal according to the target root mean square filtering parameters includes: determining a dynamic adjustment adaptive step size of the target root mean square filtering parameters according to the root mean square corresponding to the original audio signal; and performing a target filtering operation on the audio signal block according to the dynamic adjustment adaptive step size. The energy value corresponding to the first target frequency band is greater than the energy value corresponding to the second target frequency band.
2. The method according to claim 1, characterized in that, The step of determining the corresponding target interface based on the target application scenario includes: If it is determined that the target application scenario corresponds to the target non-WebRTC application scenario, the target interface is determined to correspond to the first target interface; If it is determined that the target application scenario corresponds to the target WebRTC application scenario, then the target interface is determined to correspond to the second target interface.
3. The method according to claim 2, characterized in that, The first target interface is applicable to the first target interface function set, including: The target instance creation function, the target audio parameter initialization function, the target input / output function, and / or the target instance destruction function.
4. The method according to claim 2, characterized in that, The second target interface applies to the second target interface function set, including: The target interface transforms the function call, and / or the target instance returns the function.
5. The method according to claim 1, characterized in that, Also includes: Target dynamic delay matching operation is performed on multiple target intervals of the audio signal block to dynamically update the target delay compensation amount, so that the waveform difference between the original audio signal and the target reference signal is less than a preset difference; The plurality of target intervals include: a collection interval, and / or a rendering interval.
6. The method according to claim 5, characterized in that, Also includes: If an anomaly is detected in the target, the target dynamic delay matching operation is corrected based on the smoothing results of the historical delay sequence and / or the confidence assessment results. The target anomaly includes: delay mutation, data packet loss, and / or signal energy anomaly.
7. An audio echo cancellation module, characterized in that, For implementing audio echo cancellation according to any one of claims 1-6, comprising: The identification unit is used to identify the target application scenario. The determining unit is used to determine the corresponding target interface based on the target application scenario; An execution unit, configured to perform a target echo cancellation operation on the input raw audio signal according to the target interface, to output a target audio signal, includes: Based on the original audio signal, the target root mean square filter parameters are determined; based on the target root mean square filter parameters, a target filtering operation is performed on the audio signal block corresponding to the original audio signal so that the convergence of the first target frequency band is greater than or equal to the preset convergence. And / or, the stability corresponding to the second target frequency band is greater than or equal to the preset stability; The step of performing a target filtering operation on the audio signal block corresponding to the original audio signal according to the target root mean square filtering parameters includes: determining a dynamic adjustment adaptive step size of the target root mean square filtering parameters according to the root mean square corresponding to the original audio signal; and performing a target filtering operation on the audio signal block according to the dynamic adjustment adaptive step size. The energy value corresponding to the first target frequency band is greater than the energy value corresponding to the second target frequency band.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.