Echo path detection method and device, equipment and storage medium
By using echo cancellation methods with different response speeds to process the sound signals played by the speakers, the problem of low echo path change detection efficiency in the prior art is solved, and more efficient echo path change detection is achieved.
Patent Information
- Application Number
- CN202311484927.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-08
- Publication Date
- 2025-05-09
AI Technical Summary
The detection method of echo path change in the prior art is inefficient in detection, and it is impossible to effectively distinguish scenes of echo path change, resulting in poor echo cancellation effect.
By obtaining the first sound signal collected by the microphone and the second sound signal played by the speaker, the first echo cancellation method and the second echo cancellation method with different response speeds are called to process the second sound signal, and the first predicted echo signal and the second predicted echo signal are obtained, and then whether the echo path has changed.
The detection accuracy of echo path changes is improved, the detection steps are simplified, the calculation amount is small, the detection efficiency is improved, and the problem of inefficient detection in the prior art is solved.
Smart Images

Figure CN119964592A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of voice communication, and in particular to an echo path detection method, device, equipment and storage medium. Background Art
[0002] At present, in the field of audio conferencing and other call fields, the microphone of the call device will simultaneously collect the voice of the near-end user and the far-end sound played by the speaker. If the sound is not specially processed, the far-end user will hear the sound he or she said before, that is, the echo. The presence of echo will seriously affect the call quality. In the prior art, echo cancellation algorithms are usually used to eliminate echoes. However, in scenarios where the near-end user and the far-end user speak at the same time (double talk) or the echo path changes, the echo cancellation algorithm does not work well. In order to improve the echo cancellation effect, the echo cancellation algorithm needs to be able to distinguish the scenarios where the echo path changes and take corresponding measures to improve the echo cancellation effect. Therefore, the detection of echo path changes is crucial.
[0003] However, the detection method of echo path change in the prior art has the technical problem of low detection efficiency. Summary of the invention
[0004] The embodiments of the present invention provide an echo path detection method, device, equipment and storage medium, which can improve the accuracy of detecting echo path changes and solve the technical problem of low detection efficiency in the echo path change detection method in the prior art.
[0005] In a first aspect, an embodiment of the present invention provides an echo path detection method, the method comprising:
[0006] Acquire a first sound signal collected by a microphone and a second sound signal played by a speaker;
[0007] Calling the first echo cancellation method and the second echo cancellation method to process the second sound signal, obtaining a first predicted echo signal output by the first echo cancellation method and a second predicted echo signal output by the second echo cancellation method, wherein the first echo cancellation method and the second echo cancellation method have different response speeds;
[0008] It is determined whether the echo path changes according to the first sound signal, the first predicted echo signal, and the second predicted echo signal.
[0009] In a second aspect, an embodiment of the present invention provides an echo path detection device, the device comprising:
[0010] A sound signal acquisition module, used to acquire a first sound signal collected by a microphone and a second sound signal played by a speaker;
[0011] an echo cancellation module, used for invoking a first echo cancellation method and a second echo cancellation method to process a second sound signal, obtaining a first predicted echo signal output by the first echo cancellation method and a second predicted echo signal output by the second echo cancellation method, wherein the first echo cancellation method and the second echo cancellation method have different response speeds;
[0012] The path detection module is used to determine whether the echo path changes according to the first sound signal, the first predicted echo signal and the second predicted echo signal.
[0013] In a third aspect, an embodiment of the present invention provides an echo path detection device, the echo path detection device comprising a processor and a memory;
[0014] The memory is used to store the computer program and transmit the computer program to the processor;
[0015] The processor is configured to execute an echo path detection method according to the first aspect according to instructions in a computer program.
[0016] In a fourth aspect, an embodiment of the present invention provides a storage medium storing computer executable instructions, where the computer executable instructions are used to perform an echo path detection method as described in the first aspect when executed by a computer processor.
[0017] As described above, the embodiment of the present invention provides an echo path detection method, device, equipment and storage medium. In this embodiment, a first sound signal collected by a microphone and a second sound signal played by a loudspeaker are first obtained, and then a first echo elimination method and a second echo elimination method with different response speeds are called to process the second sound signal to obtain a first predicted echo signal and a second predicted echo signal. Finally, it can be determined whether the echo path has changed according to the first sound signal, the first predicted echo signal and the second predicted echo signal. The embodiment of the present invention processes the second sound signal played by the loudspeaker using echo elimination methods with different response speeds, and detects whether the echo path has changed according to the predicted echo signals output by different echo elimination methods. The embodiment of the present invention simplifies the steps of detecting echo path changes, has a small amount of calculation, improves the detection efficiency of echo path changes, and solves the technical problem of low detection efficiency in the detection method of echo path changes in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of a flow chart of an echo path detection method provided by an embodiment of the present invention.
[0019] Figure 2 A schematic diagram of sources of a first sound signal and a second sound signal provided by an embodiment of the present invention.
[0020] Figure 3 A schematic diagram of a framework of an echo path detection method provided by an embodiment of the present invention.
[0021] Figure 4 A schematic flow chart of another echo path detection method provided by an embodiment of the present invention.
[0022] Figure 5 A schematic diagram of determining a real sound signal provided by an embodiment of the present invention.
[0023] Figure 6 A schematic diagram of changes in the echo cancellation evaluation index provided by an embodiment of the present invention.
[0024] Figure 7 A schematic diagram of the framework of another echo path detection method provided by an embodiment of the present invention.
[0025] Figure 8 A schematic diagram of the structure of an echo path detection device provided by an embodiment of the present invention.
[0026] Fig. 9 A schematic diagram of the structure of an echo path detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following description and accompanying drawings fully illustrate the specific embodiments of the present application so that those skilled in the art can practice them. The examples represent possible variations only. Unless explicitly required, separate components and functions are optional, and the order of operation can vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. The scope of the embodiments of the present application includes the entire scope of the claims, and all available equivalents of the claims. In this article, each embodiment may be represented individually or generally by the term "invention", which is only for convenience, and if more than one invention is disclosed in fact, it is not intended to automatically limit the scope of the application to any single invention or inventive concept. In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, without requiring or implying any actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed. The various embodiments are described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. As for the structures, products, etc. disclosed in the embodiments, since they correspond to the parts disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0028] In the prior art, the echo cancellation algorithm generally uses the far-end sound played by the speaker to eliminate the echo in the sound collected by the microphone. However, in the scenario where the near-end user and the far-end user speak at the same time (double talk) or the echo path changes, the echo cancellation algorithm is not effective. The echo path refers to the sound played by the speaker, which is received by the microphone through the air or other media. The propagation path from the speaker to the microphone is called the echo path. The change of the echo path means that the propagation path of the sound from the speaker to the microphone changes, for example, the position of the speaker or the position of the microphone changes.
[0029] In order to improve the processing effect of echo, the echo cancellation algorithm needs to be able to distinguish the current scene. If the current scene is when the echo path changes, the echo cancellation algorithm needs to increase the nonlinear strength of the echo to reduce echo leakage; if the current scene is double talk, the nonlinearity of the echo cannot be increased to prevent the near-end sound from being suppressed, so the detection of echo path changes is crucial. In the prior art, there are two methods for detecting echo path changes. One is to detect whether the echo path has changed based on the residual amount of residual echo in the error signal. This method is simple to detect, but the estimation of residual echo is not accurate. The other is to judge based on the correlation between the coefficients of two time domain filters with different update rates. This calculation method has a large amount of calculation and complicated steps, and the calculation efficiency is low.
[0030] Based on this, in order to solve the above technical problems, an embodiment of the present invention provides an echo path detection method, such as Figure 1 As shown, Figure 1 A flowchart of an echo path detection method provided by an embodiment of the present invention. The echo path detection method provided by an embodiment of the present invention can be performed by an echo path detection device, which can be implemented by software and / or hardware. The echo path detection device can be composed of two or more physical entities, or can be composed of one physical entity. For example, the echo path detection device can be a computer, a mobile phone, a tablet or other device. The method includes the following steps:
[0031] Step 101: Acquire a first sound signal collected by a microphone and a second sound signal played by a speaker.
[0032] In this embodiment, the echo path detection device first needs to obtain the first sound signal collected by the microphone and the second sound signal played by the speaker. The microphone refers to an energy conversion device for converting a sound signal into an electrical signal, while the speaker, on the contrary, is an energy conversion device for converting an electrical signal into a sound signal. In this embodiment, the microphone and the speaker can be directly installed on the echo path detection device when the echo path detection device leaves the factory; or, the microphone and the speaker are connected to the echo path detection device in a detachable manner, for example, the echo path detection device can be provided with multiple audio interfaces, and the microphone and the speaker are connected to the echo path detection device through the audio interface. The sound signal is a signal representing a mechanical wave, and is an information carrier of the wavelength and intensity changes of the mechanical wave. The sound is the mechanical wave generated by the vibration of the object. The first sound signal and the second sound signal are used to distinguish the sound signals from different sources.
[0033] In this embodiment, the first sound signal collected by the microphone is the sound signal of the environment in which the microphone is located, and the second sound signal played by the speaker is provided by the echo path detection device. Figure 2 As shown, after the echo path detection device 10 receives the second sound signal S2 transmitted by the remote device 20 through the network, it calls the speaker to play the second sound signal S2. At this time, the first sound signal collected by the microphone is S1, which includes the echo generated by the second sound signal and the ambient sound S3.
[0034] Step 102: Call the first echo cancellation method and the second echo cancellation method to process the second sound signal to obtain a first predicted echo signal output by the first echo cancellation method and a second predicted echo signal output by the second echo cancellation method. The first echo cancellation method and the second echo cancellation method have different response speeds.
[0035] After obtaining the first sound signal and the second sound signal, the echo path detection device needs to call the first echo cancellation algorithm and the second echo cancellation algorithm, and the first echo cancellation algorithm and the second echo cancellation algorithm are both used to predict the echo signal generated by the sound signal. It should be noted that the response speed of the first echo cancellation method and the second echo cancellation method in this embodiment is different, wherein the response speed is also called the reaction time, which specifically refers to the time taken by the echo cancellation method to stabilize and converge after the echo cancellation method receives the input sound signal and processes the sound signal. In addition, the types of the first echo cancellation algorithm and the second echo cancellation algorithm in this embodiment can be selected according to actual needs, for example, LMS (Least Mean Square), NLMS (Normalized Least Mean Square), KALMAN (Kalman) or a fixed filter can be selected, which is not specifically limited in this embodiment. In addition, the calculation domain of the first echo cancellation algorithm and the second echo cancellation algorithm is not limited in this embodiment, for example, the calculation domain can be in the time domain, frequency domain or other domains.
[0036] After the echo path detection device calls the first echo cancellation algorithm and the second echo cancellation algorithm, the second sound signal is input into the first echo cancellation algorithm and the second echo cancellation algorithm. The first echo cancellation algorithm processes the second sound signal, thereby predicting the echo generated by the second sound signal and obtaining a first predicted echo signal. Similarly, the second echo cancellation algorithm processes the second sound signal, thereby predicting the echo generated by the second sound signal and obtaining a second predicted echo signal. It can be understood that in this embodiment, due to the different response speeds of the first echo cancellation algorithm and the second echo cancellation algorithm, there is a difference between the time when the first echo cancellation algorithm outputs the first echo signal and the time when the second echo cancellation algorithm outputs the second echo signal.
[0037] Step 103: Determine whether the echo path changes according to the first sound signal, the first predicted echo signal, and the second predicted echo signal.
[0038] After obtaining the first predicted echo signal output by the first echo cancellation algorithm and the second predicted echo signal output by the second echo cancellation algorithm, the echo path detection device can determine whether the echo path has changed according to the first sound signal, the first predicted echo signal and the second preset echo signal. In one embodiment, the echo path cancellation device can calculate a first echo cancellation evaluation index according to the first sound signal and the first echo signal; and calculate a second echo cancellation evaluation index according to the first sound signal and the second echo signal, wherein the echo cancellation evaluation index is used to evaluate the echo cancellation effect of the echo cancellation algorithm. Afterwards, the echo path detection device can determine whether the echo path has changed according to the first echo cancellation evaluation index and the second echo cancellation evaluation index. For example, when the echo path changes, due to the different response speeds of the first echo cancellation algorithm and the second echo cancellation algorithm, the echo cancellation algorithm with a slower response speed cannot immediately adapt to the echo after the echo path changes, resulting in the echo cancellation effect of the echo cancellation algorithm with a slower response speed being worse than that of the echo cancellation algorithm with a faster response speed. That is, at this time, the corresponding echo cancellation evaluation indicators of the two will deviate accordingly. The echo path detection device can determine whether the echo path has changed according to the deviation of the echo cancellation evaluation indicator. The specific process is as follows: Figure 3 shown.
[0039] As mentioned above, an embodiment of the present invention provides an echo path detection method. In this embodiment, a first sound signal collected by a microphone and a second sound signal played by a loudspeaker are first obtained, and then a first echo elimination method and a second echo elimination method with different response speeds are called to process the second sound signal to obtain a first predicted echo signal and a second predicted echo signal. Finally, it is possible to determine whether the echo path has changed according to the first sound signal, the first predicted echo signal and the second predicted echo signal. The embodiment of the present invention processes the second sound signal played by the loudspeaker using echo elimination methods with different response speeds, and detects whether the echo path has changed according to the predicted echo signals output by different echo elimination methods. The embodiment of the present invention simplifies the steps for detecting echo path changes, has a small amount of calculation, improves the detection efficiency of echo path changes, and solves the technical problem of low detection efficiency in the detection method of echo path changes in the prior art.
[0040] The embodiment of the present invention also provides another echo path detection method, such as Figure 4 As shown, Figure 4 A flow chart of another echo path detection method provided by an embodiment of the present invention is as follows: Figure 4 The echo path detection method shown is a specific embodiment of the above echo path detection method. The echo path detection method provided by the embodiment of the present invention includes:
[0041] Step 201: Acquire a first sound signal collected by a microphone and a second sound signal played by a speaker.
[0042] Step 202: Call the first echo cancellation method and the second echo cancellation method to process the second sound signal to obtain a first predicted echo signal output by the first echo cancellation method and a second predicted echo signal output by the second echo cancellation method. The first echo cancellation method and the second echo cancellation method have different response speeds.
[0043] Step 203: Obtain a first real sound signal according to the first sound signal and the first predicted echo signal.
[0044] In this embodiment, after obtaining the first predicted echo signal output by the first echo cancellation method, the echo path detection device can filter out the echo generated by the second sound signal in the first sound signal according to the first predicted echo signal to obtain the first real sound signal. Specifically, the first predicted echo signal is eliminated from the first sound signal to obtain the first real sound signal. For example, Figure 5As shown, after outputting the first predicted echo signal, the first echo cancellation algorithm can filter out the first predicted echo signal in the first sound signal S1, that is, filter out the echo generated by the second sound signal S2 in the first sound signal S1, to obtain the first real sound signal.
[0045] Step 204: Obtain a second real sound signal according to the first sound signal and the second predicted echo signal.
[0046] Similarly, the second predicted echo signal can also be processed in the same way to obtain the second real sound signal. For the specific process, please refer to Figure 5 , which will not be described in detail in this embodiment.
[0047] Step 205: Determine whether the echo path changes according to the first sound signal, the first real sound signal, and the second real sound signal.
[0048] After obtaining the first real sound signal and the second real sound signal, the echo path detection device can determine whether the echo path has changed according to the first sound signal, the first real sound signal, and the second real sound signal. Exemplarily, the echo path detection device can calculate a first echo cancellation evaluation index according to the first sound signal and the first real sound signal, calculate a second echo cancellation evaluation index according to the first sound signal and the second real sound signal, and determine whether the echo path has changed according to the first echo cancellation evaluation index and the second echo cancellation evaluation index.
[0049] Based on the above embodiment, determining whether the echo path changes according to the first sound signal, the first real sound signal, and the second real sound signal in step 205 includes:
[0050] Step 2051: Determine a first average energy corresponding to the first sound signal, a second average energy corresponding to the first real sound signal, and a third average energy corresponding to the second real sound signal.
[0051] In this embodiment, it is first necessary to determine a first average energy corresponding to the first sound signal, a second average energy corresponding to the first real sound signal, and a third average energy corresponding to the second real sound signal, wherein the average energy refers to the average value of the energy of the sound signal. For example, in the time domain, the energy of the sound signal can be calculated by integrating the sound signal.
[0052] Step 2052: Determine a first echo cancellation evaluation index according to the first average energy and the second average energy.
[0053] After determining the first average energy corresponding to the first sound signal and the second average energy corresponding to the first real sound signal, the first echo cancellation evaluation index can be determined according to the first average energy and the second average energy. Specifically, when determining the first echo cancellation evaluation index, the first value is multiplied by a preset multiple to obtain the first echo cancellation evaluation index. The first value is a logarithm of a real number with a base of 10 and a ratio of the first average energy to the second average energy. The specific calculation formula is as follows:
[0054] ERLE1=10log 10 (D / E1)
[0055] Wherein, ERLE1 is the first echo cancellation evaluation index, D is the first average energy, and E1 is the second average energy.
[0056] Step 2053: Determine a second echo cancellation evaluation index according to the first average energy and the third average energy.
[0057] Similarly, when calculating the second echo cancellation evaluation index, the calculation process is similar to the process of calculating the first echo cancellation evaluation index, and the calculation formula is:
[0058] ERLE2=10log 10 (D / E2)
[0059] Among them, ERLE2 is the second echo cancellation evaluation index, and E2 is the third average energy.
[0060] Step 2054: Determine whether the echo path changes according to the first echo cancellation evaluation index and the second echo cancellation evaluation index.
[0061] After calculating the first echo cancellation evaluation index and the second echo cancellation evaluation index, it can be determined whether the echo path has changed. In one embodiment, determining whether the echo path has changed based on the first echo cancellation evaluation index and the second echo cancellation evaluation index includes: determining whether the difference between the first echo cancellation evaluation index and the second echo cancellation evaluation index is greater than a preset threshold. If so, it is determined that the echo path has changed.
[0062] In one embodiment, the difference between the first echo cancellation evaluation index and the second echo cancellation evaluation index can be calculated, and it is determined whether the difference is greater than a preset threshold, wherein the preset threshold is a pre-set threshold, and the specific value of the preset threshold can be set according to actual needs. When the difference is greater than the preset threshold, the echo path detection device can determine that the echo path has changed. Exemplarily, assuming that the response speed of the first echo cancellation algorithm is greater than the response speed of the second echo cancellation algorithm, the convergence depth of the first echo cancellation algorithm is lower, and the convergence depth of the second echo cancellation algorithm is higher. When detecting changes in the echo path, the first echo cancellation evaluation index is subtracted from the second echo cancellation evaluation index to obtain the difference, and then it is determined whether the difference is greater than the preset threshold to determine whether the echo path has changed. Figure 6 As shown, Figure 6 : is a curve diagram of the first echo cancellation evaluation index F1 and the second echo cancellation evaluation index F2. Since the response speed of the second echo cancellation algorithm is slower than that of the first echo cancellation algorithm, when the echo path changes, the second echo cancellation algorithm still remains in the state of processing the echo before the echo path changes, resulting in poor echo cancellation effect of the second echo cancellation algorithm, that is, the second echo cancellation evaluation index is low at this time. Since the response speed of the first echo cancellation algorithm is fast, the first echo cancellation evaluation index will increase rapidly after the echo path changes, resulting in a difference between the first echo cancellation evaluation index and the second echo cancellation evaluation index. Therefore, when the difference is greater than the preset threshold, it can be determined that the echo path has changed.
[0063] Step 206: When it is determined that the echo path has changed, determine an optimal real sound signal with a smaller average energy between the first real sound signal and the second real sound signal.
[0064] After determining that the echo path has changed, the echo path detection device needs to determine the optimal real sound signal with smaller average energy from the first real sound signal and the second real sound signal. The optimal real sound signal refers to the real sound signal with the best echo cancellation effect. It can be understood that the smaller the average energy, the greater the echo cancellation evaluation index, and the better the echo cancellation effect.
[0065] Step 207: Perform echo cancellation nonlinear processing on the optimal real sound signal.
[0066] After determining the optimal real sound signal, in order to reduce echo leakage, the optimal real sound signal can be further subjected to echo cancellation nonlinear processing, that is, the nonlinear processing degree of the echo cancellation method corresponding to the optimal real sound signal is increased over a period of time. The overall process is as follows: Figure 7 shown.
[0067] As described above, an embodiment of the present invention provides an echo path detection method. In this embodiment, a first sound signal collected by a microphone and a second sound signal played by a loudspeaker are first obtained, and then a first echo cancellation method and a second echo cancellation method with different response speeds are called to process the second sound signal to obtain a first predicted echo signal and a second predicted echo signal. The first predicted echo signal and the second predicted echo signal are used to eliminate the echo in the first sound signal to obtain a first real sound signal and a second real sound signal. Then, a first echo cancellation evaluation index and a second echo cancellation evaluation index are calculated according to the first real sound signal and the second real sound signal, respectively, and whether the echo path has changed is determined according to the difference between the first echo cancellation evaluation index and the second echo cancellation evaluation index. In this embodiment of the present invention, the second sound signal played by the loudspeaker is processed by using echo cancellation methods with different response speeds, and after performing echo cancellation in the first sound signal collected by the microphone according to the predicted echo signals output by different echo cancellation methods, the echo cancellation evaluation indexes corresponding to the different echo cancellation methods are calculated, and whether the echo path has changed is detected according to the difference between the echo cancellation evaluation indexes corresponding to the two echo cancellation algorithms. The embodiment of the present invention simplifies the steps of detecting echo path changes, reduces the amount of calculation, improves the detection efficiency and accuracy of echo path changes, and solves the technical problem of low detection efficiency in the detection method of echo path changes in the prior art. In addition, the embodiment of the present invention does not limit the type of echo cancellation algorithm and the calculation domain, thereby improving the scope of application of echo path detection.
[0068] Figure 8 As shown, Figure 8 A schematic diagram of the structure of an echo path detection device provided by an embodiment of the present invention is shown in FIG. Figure 8 As shown, an echo path detection device provided by an embodiment of the present invention includes:
[0069] The sound signal acquisition module 301 is used to acquire a first sound signal collected by a microphone and a second sound signal played by a speaker.
[0070] The echo cancellation module 302 is used to call the first echo cancellation method and the second echo cancellation method to process the second sound signal to obtain a first predicted echo signal output by the first echo cancellation method and a second predicted echo signal output by the second echo cancellation method. The response speeds of the first echo cancellation method and the second echo cancellation method are different.
[0071] The path detection module 303 is used to determine whether the echo path changes according to the first sound signal, the first predicted echo signal and the second predicted echo signal.
[0072] Based on the above embodiment, the path detection module 303 includes:
[0073] The first real signal calculation submodule is used to obtain a first real sound signal according to the first sound signal and the first predicted echo signal.
[0074] The second real signal calculation submodule is used to obtain a second real sound signal according to the first sound signal and the second predicted echo signal.
[0075] The path detection submodule is used to determine whether the echo path changes according to the first sound signal, the first real sound signal and the second real sound signal.
[0076] On the basis of the above embodiment, the first real signal calculation submodule is specifically used to eliminate the first preset echo signal in the first sound signal to obtain the first real sound signal.
[0077] Based on the above embodiment, the path detection submodule includes:
[0078] The average energy determination unit is used to determine a first average energy corresponding to the first sound signal, a second average energy corresponding to the first real sound signal, and a third average energy corresponding to the second real sound signal.
[0079] The first index calculation unit is used to determine a first echo cancellation evaluation index according to the first average energy and the second average energy.
[0080] The second index calculation unit is used to determine a second echo cancellation evaluation index according to the first average energy and the third average energy.
[0081] The path detection unit determines whether the echo path changes according to the first echo cancellation evaluation index and the second echo cancellation evaluation index.
[0082] Based on the above embodiment, the first index calculation unit is specifically used to multiply the first value by a preset multiple to obtain a first echo cancellation evaluation index, wherein the first value is a logarithm of a ratio of the first average energy to the second average energy with a base of 10.
[0083] Based on the above embodiment, the path detection unit includes:
[0084] A difference judgment subunit, used to determine whether the difference between the first echo cancellation evaluation index and the second echo cancellation evaluation index is greater than a preset threshold;
[0085] The path change determination subunit is used to determine that the echo path has changed if the difference is greater than a preset threshold.
[0086] Based on the above embodiment, it also includes:
[0087] The final signal determination module is used to determine an optimal real sound signal with smaller average energy between the first real sound signal and the second real sound signal when it is determined that the echo path has changed.
[0088] The non-linear processing module is used to perform echo cancellation non-linear processing on the optimal real sound signal.
[0089] The echo path detection device provided in the embodiment of the present invention is included in the echo path detection equipment and can be used to execute the echo path detection method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0090] It is worth noting that in the embodiment of the above-mentioned echo path detection device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present invention.
[0091] like Fig. 9 As shown, Fig. 9 A schematic diagram of the structure of an echo path detection device provided by an embodiment of the present invention is shown in FIG. Fig. 9 As shown, the echo path detection device 40 includes a processor 400 and a memory 401;
[0092] The memory 401 is used to store the computer program 402 and transmit the computer program 402 to the processor 400;
[0093] The processor 400 is configured to execute the steps in the above-mentioned embodiment of the echo path detection method according to the instructions in the computer program 402 .
[0094] Exemplarily, the computer program 402 may be divided into one or more modules / units, one or more modules / units are stored in the memory 401, and are executed by the processor 400 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 402 in the echo path detection device 40.
[0095] The echo path detection device 40 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The echo path detection device 40 may include, but is not limited to, a processor 400 and a memory 401. Those skilled in the art will appreciate that Fig. 9This is only an example of the echo path detection device 40 and does not constitute a limitation of the echo path detection device 40. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the echo path detection device 40 may also include input and output devices, network access devices, buses, etc.
[0096] The processor 400 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0097] The memory 401 may be an internal storage unit of the echo path detection device 40, such as a hard disk or memory of the echo path detection device 40. The memory 401 may also be an external storage device of the echo path detection device 40, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the echo path detection device 40. Further, the memory 401 may also include both the internal storage unit and the external storage device of the echo path detection device 40. The memory 401 is used to store computer programs and other programs and data required by the echo path detection device 40. The memory 401 may also be used to temporarily store data that has been output or is to be output.
[0098] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0099] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0100] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0101] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store computer programs.
[0103] An embodiment of the present invention further provides a storage medium containing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to perform an echo path detection method. The method includes the following steps:
[0104] Acquire a first sound signal collected by a microphone and a second sound signal played by a speaker;
[0105] Calling the first echo cancellation method and the second echo cancellation method to process the second sound signal, obtaining a first predicted echo signal output by the first echo cancellation method and a second predicted echo signal output by the second echo cancellation method, wherein the first echo cancellation method and the second echo cancellation method have different response speeds;
[0106] It is determined whether the echo path changes according to the first sound signal, the first predicted echo signal, and the second predicted echo signal.
[0107] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the embodiments of the present invention are not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.
Claims
1. An echo path detection method, characterized in that: The method comprises: Acquire a first sound signal collected by a microphone and a second sound signal played by a speaker; calling a first echo cancellation method and a second echo cancellation method to process the second sound signal, obtaining a first predicted echo signal output by the first echo cancellation method and a second predicted echo signal output by the second echo cancellation method, wherein the first echo cancellation method and the second echo cancellation method have different response speeds; It is determined whether the echo path changes according to the first sound signal, the first predicted echo signal, and the second predicted echo signal.
2. The echo path detection method according to claim 1, characterized in that: The determining whether the echo path changes according to the first sound signal, the first predicted echo signal, and the second predicted echo signal includes: Obtaining a first real sound signal according to the first sound signal and the first predicted echo signal; Obtaining a second real sound signal according to the first sound signal and the second predicted echo signal; It is determined whether an echo path changes according to the first sound signal, the first real sound signal, and the second real sound signal.
3. The echo path detection method according to claim 2, characterized in that: The step of obtaining a first real sound signal according to the first sound signal and the first predicted echo signal comprises: The first preset echo signal is eliminated from the first sound signal to obtain a first real sound signal.
4. The echo path detection method according to claim 2, characterized in that: The determining whether the echo path changes according to the first sound signal, the first real sound signal, and the second real sound signal includes: determining a first average energy corresponding to the first sound signal, a second average energy corresponding to the first real sound signal, and a third average energy corresponding to the second real sound signal; determining a first echo cancellation evaluation index according to the first average energy and the second average energy; determining a second echo cancellation evaluation index according to the first average energy and the third average energy; It is determined whether the echo path changes according to the first echo cancellation evaluation index and the second echo cancellation evaluation index.
5. The echo path detection method according to claim 4, characterized in that: The determining a first echo cancellation evaluation index according to the first average energy and the second average energy includes: The first value is multiplied by a preset multiple to obtain a first echo cancellation evaluation index, wherein the first value is a logarithm of a real number with 10 as the base and a ratio of the first average energy to the second average energy.
6. The echo path detection method according to claim 4, characterized in that: The determining whether the echo path changes according to the first echo cancellation evaluation index and the second echo cancellation evaluation index includes: Determine whether a difference between the first echo cancellation evaluation index and the second echo cancellation evaluation index is greater than a preset threshold; If so, it is determined that the echo path has changed.
7. The echo path detection method according to claim 2, characterized in that: In the case where it is determined that the echo path has changed, the method further includes: Determining an optimal real sound signal having a smaller average energy between the first real sound signal and the second real sound signal; An echo cancellation nonlinear process is performed on the optimal real sound signal.
8. An echo path detection device, characterized in that: The device comprises: A sound signal acquisition module, used to acquire a first sound signal collected by a microphone and a second sound signal played by a speaker; an echo cancellation module, configured to call a first echo cancellation method and a second echo cancellation method to process the second sound signal, to obtain a first predicted echo signal output by the first echo cancellation method and a second predicted echo signal output by the second echo cancellation method, wherein the first echo cancellation method and the second echo cancellation method have different response speeds; The path detection module is used to determine whether the echo path changes according to the first sound signal, the first predicted echo signal and the second predicted echo signal.
9. An echo path detection device, characterized in that: The echo path detection device includes a processor and a memory; The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute an echo path detection method according to any one of claims 1 to 7 according to instructions in the computer program.
10. A storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to perform an echo path detection method according to any one of claims 1 to 7 when executed by a computer processor.