CN111798864B - Echo cancellation method and device, electronic equipment and storage medium - Google Patents
Echo cancellation method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111798864B CN111798864B CN202010633748.0A CN202010633748A CN111798864B CN 111798864 B CN111798864 B CN 111798864B CN 202010633748 A CN202010633748 A CN 202010633748A CN 111798864 B CN111798864 B CN 111798864B
- Authority
- CN
- China
- Prior art keywords
- signal
- frequency response
- frequency
- echo
- signals
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 230000004044 response Effects 0.000 claims abstract description 176
- 238000001914 filtration Methods 0.000 claims abstract description 32
- 238000004891 communication Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 10
- 238000005316 response function Methods 0.000 claims description 9
- 230000005236 sound signal Effects 0.000 claims description 9
- 230000003044 adaptive effect Effects 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims description 7
- 230000008030 elimination Effects 0.000 abstract description 6
- 238000003379 elimination reaction Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 6
- 238000010606 normalization Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L21/00—Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
- G10L21/02—Speech enhancement, e.g. noise reduction or echo cancellation
- G10L21/0208—Noise filtering
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L21/00—Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
- G10L21/02—Speech enhancement, e.g. noise reduction or echo cancellation
- G10L21/0208—Noise filtering
- G10L21/0216—Noise filtering characterised by the method used for estimating noise
- G10L21/0232—Processing in the frequency domain
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L21/00—Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
- G10L21/02—Speech enhancement, e.g. noise reduction or echo cancellation
- G10L21/0208—Noise filtering
- G10L2021/02082—Noise filtering the noise being echo, reverberation of the speech
Landscapes
- Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Quality & Reliability (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)
- Circuit For Audible Band Transducer (AREA)
- Telephone Function (AREA)
Abstract
The echo cancellation method, the echo cancellation device, the electronic equipment and the storage medium provided by the embodiment of the application can acquire the signal played by the loudspeaker; pre-filtering the signal played by the loudspeaker according to the pre-calculated frequency response curve to obtain a reference signal; fitting an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pick-up to obtain an analog echo signal; and eliminating echo signals of the signals collected by the sound pick-up according to the analog echo signals. The fitting of the current echo signal is carried out through the pre-filtered loudspeaker signal and the signal collected by the sound pick-up, and the echo component in the signal collected by the sound pick-up is eliminated, so that the accuracy and the efficiency of echo signal elimination are improved.
Description
Technical Field
The present application relates to the field of information technologies, and in particular, to an echo cancellation method, an echo cancellation device, an electronic device, and a storage medium.
Background
Currently, communication over a network has become commonplace, such as web conferences and the like. However, in a network conference, it is necessary to play back a sound signal from the opposite end of the network by using a speaker or other sound amplifying device. And echo is generated due to factors such as surrounding environment, so that the sound signals collected by the sound pick-up often comprise echo.
At present, frequency compensation is generally performed on signals collected by a pickup through the obtained frequency difference between the current equipment and the preset equipment, so that echo is eliminated, then frequency compensation is performed on the signals after echo elimination, and finally output is performed. However, due to the uncertainty of the frequency difference between the current device and the preset device, distortion of the sound signal can be easily caused, thereby affecting the accuracy of echo cancellation.
Summary of the invention
The embodiment of the application aims to provide an echo cancellation method, an echo cancellation device, electronic equipment and a storage medium, so as to improve the accuracy of echo cancellation. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides an echo cancellation method, including:
Acquiring a signal played by a loudspeaker;
pre-filtering the signal played by the loudspeaker according to a pre-calculated frequency response curve to obtain a reference signal, wherein the frequency response curve is used for representing the relation between the frequency and the loudness of the current loudspeaker;
Fitting an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pick-up to obtain an analog echo signal;
And eliminating echo signals of the signals acquired by the sound pick-up according to the analog echo signals.
Optionally, pre-filtering the signal played by the speaker according to the pre-calculated frequency response curve to obtain a reference signal, including:
configuring a preset equalization filter according to a pre-calculated frequency response curve;
and amplifying or reducing a target frequency point in the signal played by the loudspeaker through the configured equalization filter to obtain a reference signal, wherein the target frequency point is a frequency point with frequency response larger than a preset threshold value, which is obtained through judgment of a frequency response curve.
Optionally, the configuring of the preset equalization filter according to the pre-calculated frequency response curve includes:
obtaining a central frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in a pre-calculated frequency response curve, wherein the gain coefficient is a peak value of frequency response corresponding to a frequency point with larger frequency response difference divided by a mean value of the frequency response;
And configuring a preset equalization filter according to the center frequency, the bandwidth and the gain.
Optionally, the method further comprises:
Broadcasting sweep frequency signals through a loudspeaker, wherein the sweep frequency signals comprise signals corresponding to a plurality of sweep frequency points;
receiving a sweep frequency signal played by a loudspeaker through a sound pickup to obtain the sweep frequency signal received by the sound pickup;
According to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the pickup, calculating to obtain the frequency response of each sweep frequency point through a preset response function;
and normalizing the frequency response to obtain a frequency response curve.
Optionally, normalizing the frequency response to obtain a frequency response curve, including:
according to the frequency response of each sweep frequency point, selecting the frequency response corresponding to the maximum value of the frequency response of each sweep frequency point as a reference frequency response;
and dividing the frequency response of each sweep point by the reference frequency response, and normalizing the frequency response to obtain a frequency response curve.
Optionally, fitting an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pickup to obtain an analog echo signal, including:
according to the reference signal and the signal acquired by the pre-acquired sound pick-up, the analog echo signal is obtained through the iterative updating of the adaptive filter.
Optionally, the method for eliminating the echo signal of the signal collected by the sound pick-up according to the analog echo signal includes:
And subtracting the analog echo signal from the signal acquired by the sound pick-up to obtain an audio signal for eliminating the echo.
In a second aspect, an embodiment of the present application provides an echo cancellation device, including:
The signal acquisition module is used for acquiring signals played by the loudspeaker;
The pre-filtering module is used for pre-filtering the signals played by the loudspeaker according to a pre-calculated frequency response curve to obtain reference signals, wherein the frequency response curve is used for representing the relation between the frequency and the loudness of the current loudspeaker;
The echo fitting module is used for fitting echo signals according to the reference signals and the signals acquired by the sound pick-up acquired in advance to obtain analog echo signals;
and the echo cancellation module is used for canceling the echo signals of the signals acquired by the sound pick-up according to the analog echo signals.
Optionally, the pre-filtering module includes:
the filtering configuration sub-module is used for configuring a preset equalization filter according to the frequency response curve obtained by the pre-calculation;
The signal adjustment sub-module is used for amplifying or reducing a target frequency point in a signal played by the loudspeaker through the configured equalization filter to obtain a reference signal, wherein the target frequency point is a frequency point with frequency response larger than a preset threshold value, which is obtained through judgment of a frequency response curve.
Optionally, the filtering configuration submodule includes:
the parameter acquisition unit is used for acquiring a central frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in the frequency response curve obtained by calculation in advance, wherein the gain coefficient is a peak value of frequency response corresponding to a frequency point with a large frequency response difference divided by a mean value of the frequency response;
and the parameter configuration unit is used for configuring the preset equalization filter according to the center frequency, the bandwidth and the gain.
Optionally, the apparatus further includes:
The frequency sweep signal module is used for playing frequency sweep signals through a loudspeaker, wherein the frequency sweep signals comprise signals corresponding to a plurality of frequency sweep points;
the sweep frequency receiving module is used for receiving sweep frequency signals played by the loudspeaker through the pickup to obtain sweep frequency signals received by the pickup;
the frequency response module is used for calculating the frequency response of each sweep point through a preset response function according to the sweep signals played by the loudspeaker and the sweep signals received by the pickup;
And the normalization module is used for normalizing the frequency response to obtain a frequency response curve.
Optionally, the normalization module includes:
the reference acquisition sub-module is used for selecting the frequency response corresponding to the maximum value of the frequency response of each sweep point as the reference frequency response according to the frequency response of each sweep point;
And the curve acquisition sub-module is used for dividing the frequency response of each sweep frequency point by the reference frequency response and normalizing the frequency response to obtain a frequency response curve.
Optionally, the echo fitting module includes:
And the iteration updating sub-module is used for obtaining an analog echo signal through iteration updating of the adaptive filter according to the reference signal and the signal acquired by the pre-acquired pickup.
Optionally, the echo cancellation module includes:
And the signal subtracting submodule is used for subtracting the analog echo signal from the signal acquired by the sound pick-up to obtain an audio signal for eliminating the echo.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
A memory for storing a computer program;
And a processor for performing any of the method steps described above when executing the computer program stored on the memory.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having a computer program stored therein, the computer program implementing any of the above method steps when executed by a processor.
The echo cancellation method, the echo cancellation device, the electronic equipment and the storage medium provided by the embodiment of the application can acquire the signal played by the loudspeaker; pre-filtering the signal played by the loudspeaker according to the pre-calculated frequency response curve to obtain a reference signal; fitting an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pick-up to obtain an analog echo signal; and eliminating echo signals of the signals acquired by the sound pick-up according to the analog echo signals. The fitting of the current echo signal is carried out through the pre-filtered loudspeaker signal and the signal collected by the sound pick-up, and the echo component in the signal collected by the sound pick-up is eliminated, so that the accuracy and the efficiency of echo signal elimination are improved. Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of an echo cancellation method according to an embodiment of the present application;
FIG. 2 is a graph of a frequency response of an embodiment of the present application;
FIG. 3 is a diagram showing an example of an echo cancellation method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an adaptive filter according to an embodiment of the present application;
FIG. 5 is a flowchart of a pre-filtering method according to an embodiment of the present application;
FIG. 6 is a flowchart of a method for obtaining a frequency response curve according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a method for obtaining a frequency response curve according to an embodiment of the present application;
FIG. 8 is another flow chart of an echo cancellation method according to an embodiment of the present application;
fig. 9 is a block diagram of an echo cancellation device according to an embodiment of the present application;
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a flowchart of an echo cancellation method according to an embodiment of the present application, including:
S11, acquiring signals played by a loudspeaker.
The signals played by the speaker may come from signals played by sound or music at the opposite end of the network through the speaker, for example, in a network conference process, when the local pickup collects local signals, echo signals may be included in the signals collected by the pickup.
The echo cancellation method according to the embodiment of the present application is directed to an echo generated by an acoustic system, and thus may be performed by an acoustic system, and in particular, the acoustic system may include a speaker, a pickup, and the like.
S12, pre-filtering the signal played by the loudspeaker according to the pre-calculated frequency response curve to obtain a reference signal.
Wherein the frequency response curve is used to characterize the relationship between the frequency and loudness of the current speaker. Through the frequency response curve, the frequency point with abnormal frequency response can be obtained, referring to fig. 2, fig. 2 is a graph of frequency response in an embodiment of the present application, in which 3000hz and 6500hz have obvious peaks, so that the pre-filtering process can be performed according to the frequency response curve pair. Specifically, the pre-filtering treatment for the peak values 3000hz and 6500hz may be that the average value ave_h of the frequency response corresponding to each frequency point h (n) is obtained through calculation by the frequency response curve, since an obvious peak value exists between 3000hz and 6500hz, the average value level of the frequency response h (n) corresponding to the 2375hz point and 3500hz point near the average value 3000hz can be obtained through comparing the values of the left side and the right side of the peak value point with the average value, and the bandwidth 1125hz corresponding to the peak value 3000hz can be obtained through subtracting the values; the peak and bandwidth corresponding to the peak 6500hz can be obtained in the same manner. Thereby obtaining the relevant parameters of the reference points 3000hz and 6500 hz.
And S13, fitting an echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain an analog echo signal.
Referring to fig. 3, fig. 3 is a diagram illustrating an example of an echo cancellation method according to an embodiment of the present application. And fitting echo signals according to the reference signals and the signals acquired by the sound pick-up acquired in advance to obtain analog echo signals. The fitting of the echo signals can be achieved by carrying out iterative updating estimation of the adaptive filter by utilizing the reference signals and the signals acquired by the pre-acquired sound pick-up, specifically, the fitting of the echo signals is achieved by utilizing the reference signals and the signals acquired by the pre-acquired sound pick-up, and the linear transformation can be carried out on the reference signals and the signals acquired by the pre-acquired sound pick-up through a pre-trained network model, so that the analog echo signals are obtained. For example, the reference signal is amplified by a times, the signal acquired by the pre-acquired sound pick-up is amplified by b times, and then the two groups of signals are combined to obtain the analog echo signal. Referring to fig. 4, fig. 4 is a schematic diagram of an adaptive filter according to an embodiment of the present application.
S14, eliminating echo signals of the signals collected by the sound pick-up according to the analog echo signals.
The echo signal cancellation is performed on the signal collected by the sound pickup according to the analog echo signal, and the echo signal may be subtracted from the current sound signal to obtain an echo cancelled signal. In the actual use process, when the signal obtained after the echo signal is eliminated still cannot meet the requirement of the scheme, the step S13 can be returned to fit the simulated echo signal again, and the echo signal is eliminated according to the simulated echo signal obtained by fitting again.
Therefore, by the method provided by the embodiment of the application, the signal played by the loudspeaker can be obtained; pre-filtering the signal played by the loudspeaker according to the pre-calculated frequency response curve to obtain a reference signal; fitting an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pick-up to obtain an analog echo signal; and eliminating echo signals of the signals acquired by the sound pick-up according to the analog echo signals. The fitting of the current echo signal is carried out through the pre-filtered loudspeaker signal and the signal collected by the sound pick-up, and the echo component in the signal collected by the sound pick-up is eliminated, so that the accuracy and the efficiency of echo signal elimination are improved.
In one possible implementation manner, referring to fig. 5, the pre-filtering processing is performed on the signal played by the speaker according to the pre-calculated frequency response curve to obtain the reference signal, where the pre-filtering processing includes:
S121, configuring a preset equalization filter according to the pre-calculated frequency response curve.
Optionally, the configuring of the preset equalization filter according to the pre-calculated frequency response curve includes: obtaining a central frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in a pre-calculated frequency response curve, wherein the gain coefficient is a peak value of frequency response corresponding to a frequency point with larger frequency response difference divided by a mean value of the frequency response; and configuring a preset equalization filter according to the center frequency, the bandwidth and the gain.
For example, referring to fig. 2, fig. 2 is a graph of a frequency response of an embodiment of the present application, a mean ave_h of an h (n) array may be obtained by calculation through a frequency response curve, meanwhile, an obvious peak value at 3000hz and 6500hz may be detected, by comparing values of left and right sides of a peak value with the mean value, a frequency response h (n) corresponding to a 2375hz point and a 3500hz point near the mean value 3000hz may be obtained by comparing the values with the mean value, the two values may be subtracted to obtain a bandwidth 1125hz, and meanwhile, a value h (n) corresponding to the peak value 3000hz may be divided by the mean value ave_h to obtain a gain coefficient, thereby, an equalization filter corresponding to the peak value may be configured according to a center frequency of 3000hz, a bandwidth and a gain of 1125hz may be obtained; similarly, 6500hz equalizing filter can be obtained.
S122, amplifying or reducing the signal of the target frequency point in the signal played by the loudspeaker through the configured equalization filter to obtain a reference signal.
The target frequency point is a frequency point with the frequency response larger than a preset threshold value, which is obtained through judgment of the frequency response curve.
Since the frequency response of the target frequency point in the frequency response curve is far greater than that of other frequency points possibly caused by the resonance of equipment, the nonlinear influence caused by external equipment can be reduced by amplifying or reducing the signal through the target frequency point, and the reference signal is obtained.
In one possible embodiment, referring to fig. 6, the method further includes:
S21, broadcasting sweep frequency signals through a loudspeaker.
The sweep frequency signal comprises signals corresponding to a plurality of sweep frequency points. The swept frequency signal is generated, for example, based on the frequency resolution of the echo cancellation algorithm or a resolution higher than that. For example, the resolution of echo cancellation is 125hz, and then a total of N single frequency signals of 125hz, 250hz, … N x 125hz … 8000hz are generated to form a frequency sweep signal. Referring to fig. 7, fig. 7 is a schematic diagram of a method for obtaining a frequency response curve according to an embodiment of the present application:
S22, receiving the sweep frequency signal played by the loudspeaker through the sound pickup to obtain the sweep frequency signal received by the sound pickup.
S23, according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the pickup, calculating to obtain the frequency response of each sweep frequency point through a preset response function.
For example, the sweep frequency signal is sent to a loudspeaker for playing, and is collected through a pickup. Sending the collected signals and the original sweep frequency signals into a calculated response function H (f), and calculating the frequency response H (n) of each sweep frequency point:
Wherein N is [1, N ], N is the number of single-frequency signal groups in the sweep frequency signal, X (N) is the amplitude of the nth single-frequency signal in the original sweep frequency signal, Y (N) is the amplitude of the nth single-frequency signal in the sweep frequency signal collected by the pickup, and therefore the frequency response H (N) of each sweep frequency point is obtained.
And S24, normalizing the frequency response to obtain a frequency response curve.
Optionally, normalizing the frequency response to obtain a frequency response curve, including: according to the frequency response of each sweep frequency point, selecting the frequency response corresponding to the maximum value of the frequency response of each sweep frequency point as a reference frequency response; and dividing the frequency response of each sweep point by the reference frequency response, and normalizing the frequency response to obtain a frequency response curve.
Therefore, by the method for acquiring the frequency response curve, the sweep frequency signal can be played through the loudspeaker; receiving a sweep frequency signal played by a loudspeaker through a sound pickup to obtain the sweep frequency signal received by the sound pickup; according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the pickup, calculating to obtain the frequency response of each sweep frequency point through a preset response function; and normalizing the frequency response to obtain a frequency response curve. Therefore, the configuration of the preset equalization filter can be facilitated according to the obtained frequency response curve.
Referring to fig. 8, fig. 8 is another flowchart of an echo cancellation method according to an embodiment of the present application, including:
S21, broadcasting sweep frequency signals through a loudspeaker.
The sweep frequency signal comprises signals corresponding to a plurality of sweep frequency points.
S22, receiving the sweep frequency signal played by the loudspeaker through the sound pickup to obtain the sweep frequency signal received by the sound pickup.
S23, according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the pickup, calculating to obtain the frequency response of each sweep frequency point through a preset response function.
And S24, normalizing the frequency response to obtain a frequency response curve.
Optionally, normalizing the frequency response to obtain a frequency response curve, including: according to the frequency response of each sweep frequency point, selecting the frequency response corresponding to the maximum value of the frequency response of each sweep frequency point as a reference frequency response; and dividing the frequency response of each sweep point by the reference frequency response, and normalizing the frequency response to obtain a frequency response curve.
S11, acquiring signals played by a loudspeaker.
S12, pre-filtering the signal played by the loudspeaker according to the pre-calculated frequency response curve to obtain a reference signal.
Wherein the frequency response curve is used to characterize the relationship between the frequency and loudness of the current speaker. Optionally, pre-filtering the signal played by the speaker according to the pre-calculated frequency response curve to obtain a reference signal, including: configuring a preset equalization filter according to a pre-calculated frequency response curve; and amplifying or reducing a target frequency point in the signal played by the loudspeaker through the configured equalization filter to obtain a reference signal, wherein the target frequency point is a frequency point with frequency response larger than a preset threshold value, which is obtained through judgment of a frequency response curve.
Optionally, the configuring of the preset equalization filter according to the pre-calculated frequency response curve includes: obtaining a central frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in a pre-calculated frequency response curve, wherein the gain coefficient is a peak value of frequency response corresponding to a frequency point with larger frequency response difference divided by a mean value of the frequency response; and configuring a preset equalization filter according to the center frequency, the bandwidth and the gain.
And S13, fitting an echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain an analog echo signal.
Optionally, fitting an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pickup to obtain an analog echo signal, including: according to the reference signal and the signal acquired by the pre-acquired sound pick-up, the analog echo signal is obtained through the iterative updating of the adaptive filter.
Optionally, before performing the fitting of the echo signal according to the reference signal and the signal acquired by the pre-acquired sound pickup to obtain the analog echo signal, the method further includes: broadcasting sweep frequency signals through a loudspeaker, wherein the sweep frequency signals comprise signals corresponding to a plurality of sweep frequency points; receiving a sweep frequency signal played by a loudspeaker through a sound pickup to obtain the sweep frequency signal received by the sound pickup; according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the pickup, calculating to obtain the frequency response of each sweep frequency point through a preset response function; and normalizing the frequency response to obtain a frequency response curve.
S14, eliminating echo signals of the signals collected by the sound pick-up according to the analog echo signals.
Optionally, the method for eliminating the echo signal of the signal collected by the sound pick-up according to the analog echo signal includes: and subtracting the analog echo signal from the signal acquired by the sound pick-up to obtain an audio signal for eliminating the echo.
Therefore, by the method provided by the embodiment of the application, the signal played by the loudspeaker can be obtained; pre-filtering the signal played by the loudspeaker according to the pre-calculated frequency response curve to obtain a reference signal; fitting an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pick-up to obtain an analog echo signal; and eliminating echo signals of the signals acquired by the sound pick-up according to the analog echo signals. The fitting of the current echo signal is carried out through the pre-filtered loudspeaker signal and the signal collected by the sound pick-up, and the echo component in the signal collected by the sound pick-up is eliminated, so that the accuracy and the efficiency of echo signal elimination are improved.
Referring to fig. 9, fig. 9 is a block diagram of an echo cancellation device according to an embodiment of the present application, including:
a signal acquisition module 101, configured to acquire a signal played by a speaker;
The pre-filtering module 102 is configured to perform pre-filtering processing on a signal played by the speaker according to a pre-calculated frequency response curve, so as to obtain a reference signal, where the frequency response curve is used to represent a relationship between a frequency and a loudness of the current speaker;
The echo fitting module 103 is configured to perform fitting of an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pickup, so as to obtain an analog echo signal;
The echo cancellation module 104 is configured to cancel echo signals from signals collected by the sound pickup according to the analog echo signals.
Optionally, the pre-filtering module 102 includes:
the filtering configuration sub-module is used for configuring a preset equalization filter according to the frequency response curve obtained by the pre-calculation;
The signal adjustment sub-module is used for amplifying or reducing a target frequency point in a signal played by the loudspeaker through the configured equalization filter to obtain a reference signal, wherein the target frequency point is a frequency point with frequency response larger than a preset threshold value, which is obtained through judgment of a frequency response curve.
Optionally, the filtering configuration submodule includes:
the parameter acquisition unit is used for acquiring a central frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in the frequency response curve obtained by calculation in advance, wherein the gain coefficient is a peak value of frequency response corresponding to a frequency point with a large frequency response difference divided by a mean value of the frequency response;
and the parameter configuration unit is used for configuring the preset equalization filter according to the center frequency, the bandwidth and the gain.
Optionally, the apparatus further includes:
The frequency sweep signal module is used for playing frequency sweep signals through a loudspeaker, wherein the frequency sweep signals comprise signals corresponding to a plurality of frequency sweep points;
the sweep frequency receiving module is used for receiving sweep frequency signals played by the loudspeaker through the pickup to obtain sweep frequency signals received by the pickup;
the frequency response module is used for calculating the frequency response of each sweep point through a preset response function according to the sweep signals played by the loudspeaker and the sweep signals received by the pickup;
And the normalization module is used for normalizing the frequency response to obtain a frequency response curve.
Optionally, the normalization module includes:
the reference acquisition sub-module is used for selecting the frequency response corresponding to the maximum value of the frequency response of each sweep point as the reference frequency response according to the frequency response of each sweep point;
And the curve acquisition sub-module is used for dividing the frequency response of each sweep frequency point by the reference frequency response and normalizing the frequency response to obtain a frequency response curve.
Optionally, the echo fitting module 103 includes:
And the iteration updating sub-module is used for obtaining an analog echo signal through iteration updating of the adaptive filter according to the reference signal and the signal acquired by the pre-acquired pickup.
Optionally, the echo cancellation module 104 includes:
And the signal subtracting submodule is used for subtracting the analog echo signal from the signal acquired by the sound pick-up to obtain an audio signal for eliminating the echo.
Therefore, through the device provided by the embodiment of the application, the signal played by the loudspeaker can be obtained; pre-filtering the signal played by the loudspeaker according to the pre-calculated frequency response curve to obtain a reference signal; fitting an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pick-up to obtain an analog echo signal; and eliminating echo signals of the signals acquired by the sound pick-up according to the analog echo signals. The fitting of the current echo signal is carried out through the pre-filtered loudspeaker signal and the signal collected by the sound pick-up, and the echo component in the signal collected by the sound pick-up is eliminated, so that the accuracy and the efficiency of echo signal elimination are improved.
The embodiment of the application also provides an electronic device, as shown in fig. 10, which comprises a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112 and the memory 113 complete communication with each other through the communication bus 114,
A memory 113 for storing a computer program;
The processor 111 is configured to execute a program stored in the memory 113, and implement the following steps:
Acquiring a signal played by a loudspeaker;
pre-filtering the signal played by the loudspeaker according to a pre-calculated frequency response curve to obtain a reference signal, wherein the frequency response curve is used for representing the relation between the frequency and the loudness of the current loudspeaker;
Fitting an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pick-up to obtain an analog echo signal;
And eliminating echo signals of the signals acquired by the sound pick-up according to the analog echo signals.
Optionally, when the above processing is used to execute a program stored in the memory, the above echo cancellation method can also be implemented.
The communication bus mentioned for the above-mentioned electronic devices may be a PCI (PERIPHERAL COMPONENT INTERCONNECT, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include RAM (Random Access Memory ) or NVM (Non-Volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but may also be a DSP (DIGITAL SIGNAL Processor), ASIC (Application SPECIFIC INTEGRATED Circuit), FPGA (Field-Programmable gate array) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the echo cancellation method steps of any one of the above are realized.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims (9)
1. An echo cancellation method, comprising:
Acquiring a signal played by a loudspeaker;
Pre-filtering the signal played by the loudspeaker according to a pre-calculated frequency response curve to obtain a reference signal, wherein the frequency response curve is used for representing the relation between the frequency and the loudness of the current loudspeaker;
fitting an echo signal according to the reference signal and a signal acquired by a pre-acquired sound pick-up to obtain an analog echo signal;
According to the analog echo signal, eliminating the echo signal of the signal collected by the sound pick-up;
the pre-filtering processing is performed on the signal played by the loudspeaker according to the pre-calculated frequency response curve to obtain a reference signal, including:
configuring a preset equalization filter according to a pre-calculated frequency response curve;
And amplifying or reducing a target frequency point in the signal played by the loudspeaker through the configured equalization filter to obtain a reference signal, wherein the target frequency point is a frequency point with frequency response larger than a preset threshold value, which is judged through the frequency response curve.
2. The method according to claim 1, wherein the configuring of the preset equalization filter according to the pre-calculated frequency response curve comprises:
obtaining a central frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in a pre-calculated frequency response curve, wherein the gain coefficient is a peak value of frequency response corresponding to the frequency point with larger frequency response difference divided by a mean value of the frequency response;
and configuring the preset equalization filter according to the center frequency, the bandwidth and the gain.
3. The method according to claim 1, wherein the method further comprises:
broadcasting sweep frequency signals through a loudspeaker, wherein the sweep frequency signals comprise signals corresponding to a plurality of sweep frequency points;
receiving a sweep frequency signal played by the loudspeaker through a sound pick-up to obtain the sweep frequency signal received by the sound pick-up;
According to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the pickup, calculating to obtain the frequency response of each sweep frequency point through a preset response function;
And normalizing the frequency response to obtain a frequency response curve.
4. A method according to claim 3, wherein normalizing the frequency response to obtain a frequency response curve comprises:
Selecting the frequency response corresponding to the maximum value of the frequency response of each sweep point as a reference frequency response according to the frequency response of each sweep point;
Dividing the frequency response of each sweep point by the reference frequency response, and normalizing the frequency response to obtain a frequency response curve.
5. The method of claim 1, wherein the fitting the echo signal according to the reference signal and the signal acquired by the pre-acquired sound pickup to obtain the analog echo signal comprises:
And according to the reference signal and the signal acquired by the pre-acquired pickup, obtaining an analog echo signal through iterative updating of the adaptive filter.
6. The method of claim 1, wherein the cancelling echo signal from the signal acquired by the microphone based on the analog echo signal comprises:
And subtracting the analog echo signal from the signal acquired by the sound pick-up to obtain an audio signal for eliminating the echo.
7. An echo cancellation device, comprising:
The signal acquisition module is used for acquiring signals played by the loudspeaker;
the pre-filtering module is used for pre-filtering the signals played by the loudspeaker according to a pre-calculated frequency response curve to obtain reference signals, wherein the frequency response curve is used for representing the relation between the frequency and the loudness of the current loudspeaker;
The echo fitting module is used for fitting echo signals according to the reference signals and the signals acquired by the sound pick-up acquired in advance to obtain analog echo signals;
The echo cancellation module is used for canceling echo signals of the signals acquired by the sound pick-up according to the analog echo signals;
The pre-filtering module comprises:
the filtering configuration sub-module is used for configuring a preset equalization filter according to the frequency response curve obtained by the pre-calculation;
And the signal adjustment sub-module is used for amplifying or shrinking the signal of the target frequency point in the signal played by the loudspeaker through the configured equalization filter to obtain a reference signal, wherein the target frequency point is a frequency point with the frequency response larger than a preset threshold value, which is judged through the frequency response curve.
8. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are in communication with each other through the communication bus;
A memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-6 when said computer program stored on a memory is executed.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010633748.0A CN111798864B (en) | 2020-07-02 | 2020-07-02 | Echo cancellation method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010633748.0A CN111798864B (en) | 2020-07-02 | 2020-07-02 | Echo cancellation method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111798864A CN111798864A (en) | 2020-10-20 |
CN111798864B true CN111798864B (en) | 2024-06-04 |
Family
ID=72811156
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010633748.0A Active CN111798864B (en) | 2020-07-02 | 2020-07-02 | Echo cancellation method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111798864B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112397080B (en) * | 2020-10-30 | 2023-02-28 | 浙江大华技术股份有限公司 | Echo cancellation method and apparatus, voice device, and computer-readable storage medium |
CN112863534B (en) * | 2020-12-31 | 2022-05-10 | 思必驰科技股份有限公司 | Noise audio eliminating method and voice recognition method |
CN113613143B (en) * | 2021-07-08 | 2023-06-13 | 北京小唱科技有限公司 | Audio processing method, device and storage medium suitable for mobile terminal |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1353904A (en) * | 1999-04-07 | 2002-06-12 | 艾利森公司 | Method and apparatus for space-time echo cancellation |
CN104158990A (en) * | 2013-05-13 | 2014-11-19 | 英特尔Ip公司 | Method for processing an audio signal and audio receiving circuit |
CN108269578A (en) * | 2018-02-05 | 2018-07-10 | 百度在线网络技术(北京)有限公司 | For handling the method and apparatus of information |
CN109360562A (en) * | 2018-12-07 | 2019-02-19 | 深圳创维-Rgb电子有限公司 | Echo cancel method, device, medium and voice awakening method and equipment |
CN111031448A (en) * | 2019-11-12 | 2020-04-17 | 西安讯飞超脑信息科技有限公司 | Echo cancellation method, echo cancellation device, electronic equipment and storage medium |
WO2020097828A1 (en) * | 2018-11-14 | 2020-05-22 | 深圳市欢太科技有限公司 | Echo cancellation method, delay estimation method, echo cancellation apparatus, delay estimation apparatus, storage medium, and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9100090B2 (en) * | 2013-12-20 | 2015-08-04 | Csr Technology Inc. | Acoustic echo cancellation (AEC) for a close-coupled speaker and microphone system |
KR20170142001A (en) * | 2016-06-16 | 2017-12-27 | 삼성전자주식회사 | Electric device, acoustic echo cancelling method of thereof and non-transitory computer readable recording medium |
-
2020
- 2020-07-02 CN CN202010633748.0A patent/CN111798864B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1353904A (en) * | 1999-04-07 | 2002-06-12 | 艾利森公司 | Method and apparatus for space-time echo cancellation |
CN104158990A (en) * | 2013-05-13 | 2014-11-19 | 英特尔Ip公司 | Method for processing an audio signal and audio receiving circuit |
CN108269578A (en) * | 2018-02-05 | 2018-07-10 | 百度在线网络技术(北京)有限公司 | For handling the method and apparatus of information |
WO2020097828A1 (en) * | 2018-11-14 | 2020-05-22 | 深圳市欢太科技有限公司 | Echo cancellation method, delay estimation method, echo cancellation apparatus, delay estimation apparatus, storage medium, and device |
CN109360562A (en) * | 2018-12-07 | 2019-02-19 | 深圳创维-Rgb电子有限公司 | Echo cancel method, device, medium and voice awakening method and equipment |
CN111031448A (en) * | 2019-11-12 | 2020-04-17 | 西安讯飞超脑信息科技有限公司 | Echo cancellation method, echo cancellation device, electronic equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
语音通信系统中的自适应回声消除技术;台宏达;计算机仿真;20150915(第09期);第225-229页 * |
Also Published As
Publication number | Publication date |
---|---|
CN111798864A (en) | 2020-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111798864B (en) | Echo cancellation method and device, electronic equipment and storage medium | |
US10827263B2 (en) | Adaptive beamforming | |
DE112009005469B4 (en) | Loudspeaker protection device and method therefor | |
US8265295B2 (en) | Method and apparatus for identifying feedback in a circuit | |
US8184828B2 (en) | Background noise estimation utilizing time domain and spectral domain smoothing filtering | |
CN111583949A (en) | Howling suppression method, device and equipment | |
JP2003534570A (en) | How to suppress noise in adaptive beamformers | |
CN113676815B (en) | Noise reduction method and device, earphone equipment and storage medium | |
US20060153404A1 (en) | Parametric equalizer method and system | |
CN111356058B (en) | Echo cancellation method and device and intelligent sound box | |
CN110248300B (en) | Howling suppression method based on autonomous learning and sound amplification system | |
EP1868414A1 (en) | Method and system for checking an audio connection | |
US6674863B2 (en) | Microphone-speaker apparatus | |
CN108600915B (en) | Audio output method and device, harmonic distortion filtering equipment and terminal | |
CN112037816A (en) | Voice signal frequency domain frequency correction, howling detection and suppression method and device | |
CN108810746A (en) | A kind of sound quality optimization method, feedback noise reduction system, earphone and storage medium | |
CN103929704B (en) | The method and system that a kind of adaptive acoustic feedback based on transform domain is eliminated | |
CN109360578B (en) | Echo cancellation method of audio device, audio device and readable storage medium | |
KR102517939B1 (en) | Capturing far-field sound | |
CN113593518A (en) | Howling suppression method and device, in-ear earphone and storage medium | |
CN111035323A (en) | Method, equipment and system for actively reducing noise of sweeping robot | |
CN112564655A (en) | Audio signal gain control method, device, equipment and storage medium | |
CN115620737A (en) | Voice signal processing device, method, electronic equipment and sound amplification system | |
CN114420153A (en) | Sound quality adjusting method, device, equipment and storage medium | |
CN115835092B (en) | Audio amplification feedback suppression method, system, computer and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |