Echo cancellation method, device, equipment and readable storage medium
By acquiring and analyzing the initial sound signal and bringing back sound audio signal on the first user end, echoes are removed and sent to the speaker to play, the problem of echoes affecting call quality in instant messaging is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202210753468.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-06-29
AI Technical Summary
In instant messaging, when the second user terminal device does not have an echo processing function or the processing effect is poor, the first user terminal will hear the sound of itself speaking, which will affect the call quality and user experience, and may even make a scream.
By obtaining the initial sound signal picked up by the first user microphone, and receiving the brought back audio signal picked up by the second user microphone, analyzing and nonlinear echoes corresponding to the initial sound signal, the audio signal after echo removal is obtained and sent to the speaker to play.
Effectively eliminate echoes, ensure the quality of calls on the first user side, improve user experience, and avoid echoes and howling phenomena.
Smart Images

Figure CN115118826B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to an echo cancellation method, apparatus, device and readable storage medium. Background Art
[0002] With the continuous improvement of living standards, people's requirements for healthy quality of life are also constantly increasing. As a common communication tool in life, the sound quality of voice communication equipment is also attracting more and more attention.
[0003] In instant messaging applications, real-time voice communication between two or more parties is required. Usually, after the first user speaks, the second user's microphone picks up the voice and transmits it back to the first user. If the second user does not have an echo processing function, the call quality and user experience will be affected. In more serious cases, oscillation and howling may occur.
[0004] In view of this, how to provide an echo cancellation method, apparatus, device and computer-readable storage medium becomes a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of the embodiments of the present invention is to provide an echo cancellation method, apparatus, device and computer-readable storage medium, which can effectively cancel echoes when a second user terminal device has an echo cancellation function during use, thereby ensuring the call quality of the local user and improving the user experience.
[0006] To solve the above technical problems, an embodiment of the present invention provides an echo cancellation method, comprising:
[0007] Acquiring an initial sound signal picked up by a microphone at the first user terminal;
[0008] receiving an audio signal with echo picked up by a microphone at a second user end;
[0009] removing the audio signal corresponding to the initial sound signal from the audio signal with echo to obtain an audio signal after echo removal;
[0010] The audio signal after the echo is removed is sent to the speaker for playback.
[0011] Optionally, removing the audio signal corresponding to the initial sound signal from the audio signal with echo to obtain the audio signal after echo removal includes:
[0012] Analyzing the audio signal with echo and the initial sound signal to obtain a linear echo signal and a nonlinear echo signal corresponding to the initial sound signal;
[0013] The linear echo signal and the nonlinear echo signal are removed from the audio signal with echo to obtain an audio signal after echo removal.
[0014] Optionally, the analyzing the audio signal with echo and the initial sound signal to obtain a linear echo signal and a nonlinear echo signal corresponding to the initial sound signal includes:
[0015] Using an adaptive filter to perform correlation analysis on the audio signal with echo and the initial sound signal to obtain a linear echo signal;
[0016] The initial sound signal is processed using a transfer function to obtain a nonlinear echo signal.
[0017] Optionally, the adopting an adaptive filter to perform correlation analysis on the audio signal with echo and the initial sound signal to obtain a linear echo signal includes:
[0018] Determine whether the audio signal with echo includes a second user-end sound signal; if so, process the initial sound signal using the current weight function to obtain a linear echo signal; if not, update the weight function of the adaptive filter based on the audio signal with echo and the initial sound signal, and process the initial sound signal using the updated weight function to obtain a linear echo signal.
[0019] Optionally, determining whether the audio signal with echo includes a second user end voice signal includes:
[0020] It is determined whether the energy of the audio signal is greater than the energy of the voice signal. If so, it is determined that the audio signal with echo includes the second user end voice signal.
[0021] Optionally, before removing the audio signal corresponding to the initial sound signal from the audio signal with echo, the method further includes:
[0022] It is determined whether the audio signal with echo contains an audio signal corresponding to the initial sound signal. If so, the step of removing the audio signal corresponding to the initial sound signal from the audio signal with echo is performed.
[0023] Optionally, also include:
[0024] Storing the initial sound signal picked up by the microphone of the first user terminal in a microphone signal memory;
[0025] The obtaining of the initial sound signal picked up by the microphone of the first user terminal includes:
[0026] The initial sound signal is obtained from the microphone signal memory.
[0027] Optionally, also include:
[0028] The initial sound signal stored in the microphone signal memory for a period exceeding a preset period is cleared.
[0029] An embodiment of the present invention provides an echo cancellation device, comprising:
[0030] An acquisition module, configured to acquire an initial sound signal picked up by a microphone of the first user terminal;
[0031] A receiving module, configured to receive an audio signal with echo picked up by a microphone at a second user terminal;
[0032] a removal module, configured to remove the audio signal corresponding to the initial sound signal from the audio signal with echo, to obtain an audio signal after echo removal;
[0033] The sending module is used to send the audio signal after the echo is removed to the speaker for playing.
[0034] An embodiment of the present invention provides an echo cancellation device, including:
[0035] memory for storing computer programs;
[0036] A processor is configured to implement the steps of the echo cancellation method described above when executing the computer program.
[0037] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the echo cancellation method described above are implemented.
[0038] An embodiment of the present invention provides an echo cancellation method, apparatus, device, and computer-readable storage medium. The method includes: obtaining an initial sound signal picked up by a microphone on a first user end; receiving an audio signal with echo picked up by a microphone on a second user end; removing an audio signal corresponding to the initial sound signal from the audio signal with echo to obtain an audio signal after echo removal; and sending the audio signal after echo removal to a speaker for playback.
[0039] It can be seen that the present invention obtains the initial sound signal picked up by the microphone of the first user end, and after receiving the audio signal with echo sent by the second user end and picked up by the microphone of the second user end, removes the audio signal corresponding to the initial sound signal picked up by the microphone of the first user end, thereby removing the echo in the audio signal with echo, and then sends the audio signal after removing the echo to the speaker of the first user end for playback, so that the user of the first user end will not hear his own voice. During use, the present invention can still effectively eliminate the echo when the second user end device has an echo cancellation function, thereby ensuring the call quality of the local user and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the prior art and the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 A schematic diagram of a flow chart of an echo cancellation method provided by an embodiment of the present invention;
[0042] Figure 2 A schematic flow chart of another echo cancellation method provided by an embodiment of the present invention;
[0043] Figure 3 A schematic diagram of an echo cancellation system provided by an embodiment of the present invention;
[0044] Figure 4 A schematic structural diagram of an echo cancellation device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The embodiments of the present invention provide an echo cancellation method, apparatus, device, and computer-readable storage medium, which can effectively cancel echoes when a second user terminal device has an echo cancellation function during use, thereby ensuring the call quality of the local user and improving the user experience.
[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0047] It's important to note that in instant messaging between two or more parties, the first user's voice is played by the speaker or audio system of the second user's device, then picked up by the second user's microphone and transmitted back to the first user, creating an echo. This allows the first user to hear their own voice. If this echo is not processed, call quality and user experience will be affected. In more serious cases, it may even cause oscillation and howling. Currently, for the above scenario, the echo cancellation technology commonly used is to eliminate the sound played by the second user end speaker from the sound data collected by the microphone after the second user end microphone collects the sound, so that the sound recorded by the microphone is only the second user's voice. After transmitting this sound to the first user end, the first user end can avoid hearing the first user's own voice. The characteristics of this echo cancellation technology are that the quality of the echo cancellation function of the second user end can affect the experience of the first user, and the quality of the echo cancellation function of the first user end can affect the experience of the second user. That is, whether there is an echo in the sound signal transmitted by the second user end device played by the first user speaker is determined by the quality of the echo cancellation function of the second user end device. In other words, the quality of the sound received by the first user end is determined by the second user end. If the second user end does not have an echo cancellation function or the cancellation function is poor, the first user end will not have a good voice call experience, affecting the first user end's own user experience. In view of this, an embodiment of the present invention provides an echo cancellation method, apparatus, device and computer-readable storage medium, which obtains an initial sound signal picked up by a microphone of a first user end, and after receiving an audio signal with echo picked up by a microphone of a second user end, removes the audio signal corresponding to the initial sound signal in the audio signal with echo, and then sends the audio signal after the echo is removed to a loudspeaker for playback. That is, after the first user end receives the sound signal picked up by the microphone of the second user end, it removes the echo part therein and then sends the processed sound signal to the loudspeaker for playback, so that there is no echo part in the sound signal played by the loudspeaker of the first user end, thereby improving the user experience of the first user end user.
[0048] Next, we will take a received audio signal with echo as an example to introduce in detail an echo cancellation method provided by an embodiment of the present invention. Figure 1 , Figure 1 A schematic flow chart of an echo cancellation method provided in an embodiment of the present invention. The method includes:
[0049] S110: Acquire an initial sound signal picked up by a microphone at the first user terminal;
[0050] It should be noted that the embodiment of the present invention can be used for the case where the second user device has no echo cancellation function or has poor echo cancellation function. During the call between the first user end and the second user end, the sound signal picked up by the microphone of the first user end is called the initial sound signal.
[0051] S120: Receive an audio signal with echo picked up by a microphone at the second user terminal;
[0052] Specifically, the first user end sends the initial sound signal to the speaker or speaker of the second user end device for playback, and the played sound is picked up by the microphone of the second user end device (that is, the second user end microphone) to obtain an audio signal with echo. The second user end microphone sends the picked up audio signal with echo to the first user end, and the first user end receives the audio signal with echo sent by the second user end microphone.
[0053] In addition, it should be noted that in actual applications, S110 and S120 can be executed in any order. S110 can be executed first, or S120 can be executed first and then the corresponding initial sound signal picked up by the microphone of the first user end is obtained after the audio signal with echo is obtained. The specific order is not specifically limited in the embodiment of the present invention.
[0054] S130: removing the audio signal corresponding to the initial sound signal from the audio signal with echo to obtain an audio signal after echo removal;
[0055] It can be understood that after receiving the audio signal with echo, the first user end removes the part of the audio signal in the audio signal with echo corresponding to the initial sound signal according to the initial sound signal generated by the first user end, thereby obtaining an audio signal after echo removal, that is, the audio signal after echo removal no longer carries the audio signal corresponding to the initial sound signal generated by the first user end.
[0056] S140: Sending the audio signal after the echo is removed to the speaker for playback.
[0057] Specifically, after the first user end obtains the audio signal after echo removal, the audio signal after echo removal is sent to the speaker for playback, so that the sound signal played by the speaker does not carry an echo. For each audio signal with echo picked up by the microphone of the second user end, the method provided by the embodiment of the present invention is used to perform echo cancellation processing, so that the sound heard by the user of the first user end is only the sound at the user of the second user end, thereby improving the user experience of the first user end user.
[0058] For example, the first user terminal and the second user terminal are both mobile devices (such as mobile phones, etc.), the first user terminal is end A, and the second user terminal is end B. The sound signal collected by the microphone of end A is a, and end A transmits a to the speaker of end B for playback. The played sound signal is picked up by the microphone of end B. The echo signal corresponding to a in the sound signal b picked up by the microphone of end B is a', then end B sends b to end A. After end A receives b, since a' is related to a, a' in b can be removed based on a to obtain b', and b' is sent to the speaker for playback.
[0059] It can be seen that the present invention obtains the initial sound signal picked up by the microphone of the first user end, and after receiving the audio signal with echo sent by the second user end and picked up by the microphone of the second user end, removes the audio signal corresponding to the initial sound signal picked up by the microphone of the first user end, thereby removing the echo in the audio signal with echo, and then sends the audio signal after removing the echo to the speaker of the first user end for playback, so that the user of the first user end will not hear his own voice. During use, the present invention can still effectively eliminate the echo when the second user end device has an echo cancellation function, thereby ensuring the call quality of the local user and improving the user experience.
[0060] Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Please refer to Figure 2 and Figure 3 Specifically:
[0061] S200: Storing an initial sound signal picked up by a microphone of the first user terminal in a microphone signal storage;
[0062] It should be noted that, in actual application, the first user terminal (such as Figure 3 After the first user-end microphone (end A) picks up an initial sound signal, it stores the initial sound signal in microphone signal memory ①. Subsequently, upon receiving an echo-containing audio signal picked up by the second user-end microphone and including an echo corresponding to the initial sound signal, the corresponding initial sound signal is retrieved from the microphone signal memory to perform echo removal on the echo-containing audio signal. When storing the initial sound signal in the microphone signal memory, the time the initial sound signal was picked up may also be recorded.
[0063] S210: Acquire an initial sound signal from a microphone signal memory;
[0064] It should be noted that the initial sound signal can be obtained from the microphone signal memory ①. Specifically, the initial sound signal currently stored can be obtained in real time after the microphone of the first user terminal picks up the initial sound signal and stores the initial sound signal in the microphone signal memory ①. Since the sound signal picked up by the microphone of the first user terminal is transmitted to the second user terminal ( Figure 3 The sound signal is played by the speaker at the B end of the second user end, and the sound signal after playback is picked up by the microphone of the second user end and then transmitted back to the first user end. The time delay of the entire transmission path can be determined. Therefore, after the initial sound signal is obtained from the microphone signal storage, the audio signal with echo corresponding to the initial sound signal picked up by the microphone of the second user end can be received according to the corresponding time delay.
[0065] In addition, after receiving the audio signal with echo picked up by the microphone of the second user end, the corresponding initial sound signal can be obtained from the microphone signal memory. Specifically, the received audio signal with echo and the initial sound signal stored in the microphone signal memory can be correlated to determine and obtain the initial sound signal corresponding to the audio signal with echo.
[0066] S220: Receive an audio signal with echo picked up by a microphone at the second user terminal;
[0067] Specifically, the implementation process of S220 is the same as that of S120 in the above embodiment. For a detailed description, please refer to the S120 part in the above embodiment, and the embodiment of the present invention will not be repeated here.
[0068] S230: Analyze the audio signal with echo and the initial sound signal to obtain a linear echo signal and a nonlinear echo signal corresponding to the initial sound signal;
[0069] It can be understood that in order to better remove the audio signal corresponding to the initial sound signal in the audio signal with echo, in the embodiment of the present invention, the received audio signal with echo and the initial sound signal of the first user end can be analyzed to estimate the linear echo signal and the nonlinear echo signal corresponding to the initial sound signal, specifically, the linear echo signal and the nonlinear echo signal corresponding to the part of the audio signal corresponding to the initial sound signal in the audio signal with echo are estimated.
[0070] Specifically, in practical applications, after receiving an audio signal with echo picked up by a microphone at a second user end, it can be determined whether the audio signal with echo contains an audio signal corresponding to the initial sound signal picked up by the microphone at the first user end. If so, the audio signal with echo and the initial sound signal are analyzed to obtain a linear echo signal and a nonlinear echo signal corresponding to the initial sound signal. This can reduce energy consumption of the device based on the implementation of the embodiments of the present invention. It should be noted that when determining that the audio signal with echo contains an audio signal corresponding to the initial sound signal picked up by the microphone at the first user end, there may be two situations: one is that the second user end does not have an echo cancellation function, and the other is that the second user end has an echo cancellation function, but the echo cancellation function is poor, resulting in incomplete echo cancellation, resulting in a portion of echo signal still existing in the audio signal with echo. In either case, the method provided in the embodiments of the present invention can be used to perform correlation analysis on the audio signal with echo and the initial sound signal to further obtain the linear echo signal and the nonlinear echo signal corresponding to the initial sound signal in the audio signal with echo.
[0071] S240: removing the linear echo signal and the nonlinear echo signal from the audio signal with echo to obtain an audio signal after echo removal;
[0072] Specifically, after determining the linear echo signal and the nonlinear echo signal corresponding to the initial sound signal, the linear echo signal and the nonlinear echo signal are removed from the audio signal with echo, thereby eliminating the audio signal corresponding to the initial sound signal and obtaining an audio signal after echo removal.
[0073] S250: Sending the audio signal after the echo is removed to the speaker for playback.
[0074] It can be understood that the audio signal after echo removal obtained by the echo cancellation method in the embodiment of the present invention can better eliminate the echo, and sending the audio signal after echo removal to the speaker for playback can better improve the user experience of the first user end.
[0075] Furthermore, the process of analyzing the audio signal with echo and the initial sound signal in S230 to obtain the linear echo signal and the nonlinear echo signal corresponding to the initial sound signal may specifically include:
[0076] Adopting adaptive filter to perform correlation analysis on audio signal with echo and initial sound signal to obtain linear echo signal;
[0077] The initial sound signal is processed using a transfer function to obtain a nonlinear echo signal.
[0078] It should be noted that, in order to improve the estimation accuracy of the linear echo signal and the nonlinear echo signal in the embodiment of the present invention, an adaptive filter (such as Figure 3 ② in the figure), a correlation analysis is performed on the echoed audio signal and the initial sound signal to obtain a corresponding linear echo signal. The linear echo signal is then transmitted to a comparison subtractor ④, which then subtracts the linear echo signal from the received audio signal with echo picked up by the microphone of the second user terminal. The audio signal with echo subtracted from the linear echo signal is then transmitted to a nonlinear residual echo suppressor ⑤. The nonlinear residual echo suppressor ⑤ processes the initial sound signal using a transfer function to estimate a nonlinear echo signal. The transfer function in this embodiment of the present invention can be pre-set or obtained by performing a correlation analysis on a sound signal obtained by subtracting the corresponding linear echo signal from an initially detected sound signal from the second user terminal without speech, and then performing a correlation analysis on the sound signal and the corresponding initial sound signal. After obtaining the nonlinear echo signal, the nonlinear residual echo suppressor ⑤ subtracts the nonlinear echo signal from the received audio signal with echo subtracted from the linear echo signal, thereby obtaining an echo-cancelled audio signal.
[0079] Furthermore, the process of using the adaptive filter to perform correlation analysis on the audio signal with echo and the initial sound signal to obtain the linear echo signal may specifically include:
[0080] Determine whether the audio signal with echo includes a second user end sound signal. If so, use the current weight function of the adaptive filter to process the initial sound signal to obtain a linear echo signal. If not, update the weight function based on the audio signal with echo and the initial sound signal, and use the updated weight function to process the initial sound signal to obtain a linear echo signal.
[0081] It should be noted that the adaptive filter primarily adjusts the filter weight function through an adaptive filtering algorithm. Based on the weight function, the echoed audio signal, and the initial sound signal, an approximate echo path is estimated to approximate the true echo path to obtain delay information. An estimated linear echo signal is then obtained based on the delay information. Where the weight function is w(x) and the initial sound signal is a(t), then the linear echo signal s(t) = w(x) * a(t). By continuously learning and updating the weight function, the updated acoustic characteristics are made closer to the linear echo signal s'(t) in the echo signal a'(t) in the echoed audio signal picked up by the second user end microphone. This minimizes the error between the linear echo signal s'(t) minus the linear echo signal s(t) obtained after passing through the adaptive filter and the linear echo signal s'(t), thereby better eliminating the linear echo signal.
[0082] In the case where the second user is speaking or there are other useful sounds at the second user end, these sound signals will interfere with the adaptive filter, causing its weight function to fail to converge normally, thereby increasing the error. In the embodiment of the present invention, in order to avoid canceling the second user end sound signal (for example, the second user end user's sound signal or other useful sound signal at the second user end) as an echo, after receiving the audio signal with echo, further steps such as Figure 3 The double-talk detector ③ shown in the figure determines whether the audio signal with echo includes the second user end voice signal. If the second user end voice signal is included, the initial voice signal is processed based on the current weight function to obtain a linear echo signal. If the second user end voice signal is not included, the current weight function of the adaptive filter is updated based on the audio signal with echo and the initial voice signal, and the updated weight function is used to process the initial voice signal to obtain a linear echo signal.
[0083] Furthermore, the process of determining whether the audio signal with echo includes the second user end sound signal may specifically include:
[0084] It is determined whether the energy of the audio signal with echo is greater than the energy of the initial sound signal. If so, it is determined that the audio signal with echo includes the second user end sound signal.
[0085] Specifically, in practical applications, the energy of the echoed audio signal can be compared with the energy of the initial sound signal. If the energy of the echoed audio signal is greater than that of the initial sound signal, it is determined that the echoed audio signal includes the second user-end sound signal. In embodiments of the present invention, the presence of a second user-end user speaking can also be determined through energy comparison. Consequently, the adaptive filter can stop updating the weight function and use the current weight function to process the initial sound signal to obtain a linear echo signal, thereby avoiding cancellation of the second user-end user's speech signal. This ensures that the first user-end user can hear the second user's speech while eliminating the echo.
[0086] Furthermore, the method may further include:
[0087] The initial sound signal stored in the microphone signal memory for a time period exceeding a preset time period is cleared.
[0088] It should be noted that, in order to conserve storage space in the microphone signal memory, initial sound signals stored in the microphone signal memory for a period exceeding a preset time period may be cleared. Of course, the initial sound signal may also be cleared from the microphone signal memory after processing the audio signal with echo corresponding to the current initial sound signal is completed. The specific implementation method employed is not specifically limited in the present invention, provided that it achieves the objectives of the present invention.
[0089] Based on the above embodiment, the embodiment of the present invention provides an echo cancellation device, please refer to Figure 4 , the device comprises:
[0090] An acquisition module 41 is configured to acquire an initial sound signal picked up by a microphone of a first user terminal;
[0091] The receiving module 42 is configured to receive an audio signal with an echo picked up by a microphone at the second user terminal;
[0092] a removal module 43, configured to remove the audio signal corresponding to the initial sound signal from the audio signal with echo, to obtain an audio signal after the echo is removed;
[0093] The sending module 44 is used to send the audio signal after the echo is removed to the speaker for playback.
[0094] It should be noted that the echo cancellation device provided in the embodiment of the present invention has the same beneficial effects as the echo cancellation method provided in the above embodiment, and for the detailed introduction of the echo cancellation method involved in the embodiment of the present invention, please refer to the above embodiment, and the present invention will not repeat it here.
[0095] Based on the above embodiment, an embodiment of the present invention provides an echo cancellation device, which includes:
[0096] memory for storing computer programs;
[0097] The processor is configured to implement the steps of the above-mentioned echo cancellation method when executing a computer program.
[0098] For example, the processor in an embodiment of the present invention can be specifically used to obtain an initial sound signal picked up by a microphone on a first user end; receive an audio signal with echo picked up by a microphone on a second user end; remove the audio signal corresponding to the initial sound signal in the audio signal with echo to obtain an audio signal after echo removal; and send the audio signal after echo removal to a speaker for playback.
[0099] Based on the above embodiment, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above echo cancellation method are implemented.
[0100] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., which can store program codes.
[0101] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0102] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0103] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0104] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0105] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An echo cancellation method, characterized in that: include: Acquiring an initial sound signal picked up by a microphone at the first user terminal; receiving an audio signal with echo picked up by a microphone at a second user end; removing the audio signal corresponding to the initial sound signal from the audio signal with echo to obtain an audio signal after echo removal; The audio signal after the echo is removed is sent to the speaker for playback; wherein: The step of removing the audio signal corresponding to the initial sound signal from the audio signal with echo to obtain the audio signal after the echo is removed includes: Analyzing the audio signal with echo and the initial sound signal to obtain a linear echo signal and a nonlinear echo signal corresponding to the initial sound signal; removing the linear echo signal and the nonlinear echo signal from the audio signal with echo to obtain an audio signal after echo removal; The analyzing the audio signal with echo and the initial sound signal to obtain a linear echo signal and a nonlinear echo signal corresponding to the initial sound signal includes: A double-talk detector is used to determine whether the audio signal with echo includes a second user end voice signal. If so, the initial voice signal is processed using the current weight function to obtain a linear echo signal. If not, the weight function of the adaptive filter is updated based on the audio signal with echo and the initial voice signal, and the initial voice signal is processed using the updated weight function to obtain a linear echo signal. The linear echo signal is s(t) = w(x) * a(t), where w(x) is the weight function and a(t) is the initial voice signal. The initial sound signal is processed using a transfer function to obtain a nonlinear echo signal; the transfer function is a sound signal obtained by subtracting a corresponding linear echo signal from a sound signal of the second user end without speaking sound detected initially, and is obtained after performing a correlation analysis on the sound signal and the corresponding initial sound signal.
2. The echo cancellation method according to claim 1, wherein: The determining whether the audio signal with echo includes the second user end sound signal includes: It is determined whether the energy of the audio signal is greater than the energy of the voice signal. If so, it is determined that the audio signal with echo includes the second user end voice signal.
3. The echo cancellation method according to any one of claims 1 to 2, characterized in that: Before removing the audio signal corresponding to the initial sound signal from the audio signal with echo, the method further includes: It is determined whether the audio signal with echo contains an audio signal corresponding to the initial sound signal. If so, the step of removing the audio signal corresponding to the initial sound signal from the audio signal with echo is performed.
4. The echo cancellation method according to claim 3, wherein: Also includes: Storing the initial sound signal picked up by the microphone of the first user terminal in a microphone signal memory; The obtaining of the initial sound signal picked up by the microphone of the first user terminal includes: The initial sound signal is obtained from the microphone signal memory.
5. The echo cancellation method according to claim 4, wherein: Also includes: The initial sound signal stored in the microphone signal memory for a period exceeding a preset period is cleared.
6. An echo cancellation device, characterized in that: include: An acquisition module, configured to acquire an initial sound signal picked up by a microphone of the first user terminal; A receiving module, configured to receive an audio signal with echo picked up by a microphone at a second user terminal; a removal module, configured to remove the audio signal corresponding to the initial sound signal from the audio signal with echo, to obtain an audio signal after echo removal; The sending module is used to send the audio signal after the echo is removed to the speaker for playback; wherein: Remove modules for: Analyzing the audio signal with echo and the initial sound signal to obtain a linear echo signal and a nonlinear echo signal corresponding to the initial sound signal; removing the linear echo signal and the nonlinear echo signal from the audio signal with echo to obtain an audio signal after echo removal; The analyzing the audio signal with echo and the initial sound signal to obtain a linear echo signal and a nonlinear echo signal corresponding to the initial sound signal includes: A double-talk detector is used to determine whether the audio signal with echo includes a second user end voice signal. If so, the initial voice signal is processed using the current weight function to obtain a linear echo signal. If not, the weight function of the adaptive filter is updated based on the audio signal with echo and the initial voice signal, and the initial voice signal is processed using the updated weight function to obtain a linear echo signal. The linear echo signal is s(t) = w(x) * a(t), where w(x) is the weight function and a(t) is the initial voice signal. The initial sound signal is processed using a transfer function to obtain a nonlinear echo signal; the transfer function is a sound signal obtained by subtracting a corresponding linear echo signal from a sound signal of the second user end without speaking sound detected initially, and is obtained after performing a correlation analysis on the sound signal and the corresponding initial sound signal.
7. An echo cancellation device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the echo cancellation method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the echo cancellation method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Frequency-convertible echo cancellation method based on near-end audio signal calibration and correction
CN103561184A
Echo cancellation method, terminal equipment, electronic equipment and medium
CN113571077A