CN111798864A - Echo cancellation method and device, electronic equipment and storage medium - Google Patents

Echo cancellation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111798864A
CN111798864A CN202010633748.0A CN202010633748A CN111798864A CN 111798864 A CN111798864 A CN 111798864A CN 202010633748 A CN202010633748 A CN 202010633748A CN 111798864 A CN111798864 A CN 111798864A
Authority
CN
China
Prior art keywords
signal
frequency
frequency response
echo
loudspeaker
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.)
Pending
Application number
CN202010633748.0A
Other languages
Chinese (zh)
Inventor
杨茜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202010633748.0A priority Critical patent/CN111798864A/en
Publication of CN111798864A publication Critical patent/CN111798864A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Processing of the speech or voice signal to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • G10L21/0208Noise filtering
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Processing of the speech or voice signal to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • G10L21/0208Noise filtering
    • G10L21/0216Noise filtering characterised by the method used for estimating noise
    • G10L21/0232Processing in the frequency domain
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Processing of the speech or voice signal to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • G10L21/0208Noise filtering
    • G10L2021/02082Noise filtering the noise being echo, reverberation of the speech

Abstract

The echo cancellation method, the echo cancellation device, the electronic device and the storage medium provided by the embodiment of the application can acquire signals played by a loudspeaker; pre-filtering a signal played by a loudspeaker according to a frequency response curve obtained by pre-calculation to obtain a reference signal; fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal; and eliminating the echo signal of the signal collected by the sound pick-up according to the analog echo signal. 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 eliminating the echo signal are improved.

Description

Echo cancellation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of information technology, and in particular, to an echo cancellation method and apparatus, an electronic device, and a storage medium.
Background
Currently, it has become common to communicate over a network, such as a web conference or the like. However, when a network conference is performed, it is necessary to play a sound signal from the opposite end of the network by using a sound amplification device such as a speaker. Echo is generated due to factors such as the surrounding environment, and therefore the collected sound signals of the sound pickup often include echo.
At present, generally, frequency compensation is performed on signals collected by a sound pickup through the obtained frequency difference between the current equipment and the preset equipment, so that echo cancellation is performed, frequency compensation is performed on the signals after the echo cancellation, and finally the signals are output. However, due to the uncertainty of the frequency difference between the current device and the preset device, the distortion of the sound signal can be easily caused, thereby affecting the accuracy of echo cancellation.
Summary of the invention
An object of the embodiments of the present application is to provide an echo cancellation method, apparatus, electronic device, and storage medium, so as to improve 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 a signal played by a loudspeaker according to a frequency response curve obtained by pre-calculation 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 the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal;
and eliminating the echo signal according to the signal collected by the sound pick-up by the analog echo signal.
Optionally, the pre-filtering the signal played by the speaker according to the pre-calculated frequency response curve to obtain a reference signal, includes:
configuring a preset equalization filter according to a frequency response curve obtained by pre-calculation;
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 of which the frequency response obtained through the judgment of the frequency response curve is greater than a preset threshold value.
Optionally, the configuring of the preset equalization filter according to the pre-calculated frequency response curve includes:
acquiring a center frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in a frequency response curve obtained by pre-calculation, wherein the gain coefficient is the mean value of frequency responses divided by the peak value of frequency responses corresponding to the frequency points with larger frequency response differences;
and configuring a preset equalization filter according to the center frequency, the bandwidth and the gain.
Optionally, the method further includes:
playing a frequency sweeping signal through a loudspeaker, wherein the frequency sweeping signal comprises signals corresponding to a plurality of frequency sweeping points;
receiving a frequency sweeping signal played by a loudspeaker through a sound pick-up to obtain a frequency sweeping signal received by the sound pick-up;
calculating the frequency response of each sweep frequency point through a preset response function according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the sound pick-up;
and normalizing the frequency response to obtain a frequency response curve.
Optionally, normalizing the frequency response to obtain a frequency response curve, including:
selecting a frequency response corresponding to the maximum frequency response value of each scanning frequency point as a reference frequency response according to the frequency response of each scanning frequency point;
and 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, fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal, including:
and obtaining an analog echo signal through iterative updating of the adaptive filter according to the reference signal and a signal acquired by the pre-acquired sound pickup.
Optionally, the echo signal is eliminated from the signal collected by the sound pickup according to the analog echo signal, including:
and subtracting the analog echo signal from the signal collected by the sound pick-up to obtain the audio signal with the echo eliminated.
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 a signal played by the loudspeaker according to a frequency response curve obtained through pre-calculation 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;
the echo fitting module is used for fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal;
and the echo cancellation module is used for carrying out echo signal cancellation on the signal collected by the sound pickup according to the analog echo signal.
Optionally, the pre-filtering module includes:
the filtering configuration submodule is used for configuring a preset equalization filter according to a frequency response curve obtained through pre-calculation;
and the signal adjusting submodule is used for amplifying or reducing a target frequency point in a signal played by the loudspeaker through the configured equalizing filter to obtain a reference signal, wherein the target frequency point is a frequency point of which the frequency response obtained through the judgment of the frequency response curve is greater than a preset threshold value.
Optionally, the filtering configuration sub-module includes:
the parameter acquisition unit is used for acquiring a center frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in a frequency response curve obtained by pre-calculation, wherein the gain coefficient is the average value of frequency responses divided by the peak value of the frequency responses corresponding to the frequency points with larger frequency response differences;
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 comprises:
the device comprises a sweep frequency signal module, a frequency conversion module and a frequency conversion module, wherein the sweep frequency signal module is used for playing a sweep frequency signal through a loudspeaker, and the sweep frequency signal comprises signals corresponding to a plurality of sweep frequency points;
the frequency sweep receiving module is used for receiving the frequency sweep signal played by the loudspeaker through the sound pick-up to obtain the frequency sweep signal received by the sound pick-up;
the frequency response module is used for calculating the frequency response of each sweep frequency point through a preset response function according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the sound pick-up;
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 submodule is used for selecting the frequency response corresponding to the maximum frequency response value of each scanning frequency point as the reference frequency response according to the frequency response of each scanning frequency point;
and the curve acquisition submodule 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 submodule is used for obtaining the analog echo signal through the iteration updating of the adaptive filter according to the reference signal and the signal acquired by the pre-acquired sound pickup.
Optionally, the echo cancellation module includes:
and the signal subtracting submodule is used for subtracting the analog echo signal from the signal collected by the sound pick-up to obtain the audio signal with the echo eliminated.
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 mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing any of the above method steps when executing the computer program stored in the memory.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements any of the method steps described above.
The echo cancellation method, the echo cancellation device, the electronic device and the storage medium provided by the embodiment of the application can acquire signals played by a loudspeaker; pre-filtering a signal played by a loudspeaker according to a frequency response curve obtained by pre-calculation to obtain a reference signal; fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal; and eliminating the echo signal according to the signal collected by the sound pick-up by the analog echo signal. 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 eliminating the echo signal are improved. Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
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 illustrating 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 disclosure;
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 flowchart 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 technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of an echo cancellation method according to an embodiment of the present application, including:
and S11, acquiring signals played by the loudspeaker.
The signal played by the speaker may be a signal played by the speaker, such as sound or music from an opposite end of the network, for example, in the process of a network conference, when the local sound pickup collects the local signal, the signal collected by the sound pickup may include an echo signal.
The echo cancellation method according to the embodiment of the present application is directed to echoes generated by a sound system, and thus may be performed by the sound system, and specifically, the sound system may include a speaker, a sound pickup, and the like.
And 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 relation between the frequency and the loudness of the current loudspeaker. The frequency response curve can be used to obtain frequency points of frequency response anomaly, see fig. 2, fig. 2 is a graph of frequency response of the embodiment of the present application, in which distinct peaks exist at 3000hz and 6500hz, so that pre-filtering processing can be performed according to the frequency response curve. Specifically, the pre-filtering process for the peak values 3000hz and 6500hz may be that, a mean ave _ h of the frequency response corresponding to each frequency point h (n) is obtained through the frequency response curve, because there are obvious peak values at 3000hz and 6500hz, the frequency responses h (n) corresponding to the 2375hz point and 3500hz point near the mean value 3000hz can be obtained by comparing the left and right side values of the peak value point with the mean value, and the average level is reached, and the bandwidth 1125hz corresponding to the peak value 3000hz is obtained by subtracting the two values; the peak value and the bandwidth corresponding to the peak value 6500hz can be obtained by the same method. Thereby obtaining the relevant parameters for reference points 3000hz and 6500 hz.
And S13, fitting the echo signal according to the reference signal and the signal acquired by the pre-acquired sound pickup to obtain a simulated 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 the echo signal according to the reference signal and the signal acquired by the pre-acquired sound pickup to obtain a simulated echo signal. The fitting of the echo signal may be performed by using a reference signal and a signal acquired by a pre-acquired sound pickup, and performing iterative update estimation on the adaptive filter to obtain a simulated echo signal, specifically, the fitting of the echo signal may be performed by using the reference signal and a signal acquired by the pre-acquired sound pickup, and the reference signal and a signal acquired by the pre-acquired sound pickup may be subjected to linear transformation by using a pre-trained network model to obtain the simulated echo signal. For example, a reference signal is amplified by a times, a signal acquired by a sound pickup in advance is amplified by b times, and then the two groups of signals are combined to obtain an 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.
And S14, eliminating the echo signal according to the analog echo signal.
The echo signal is cancelled from the signal collected by the sound pickup according to the analog echo signal, and the echo-cancelled signal may be obtained by subtracting the analog echo signal from the current sound signal. In the actual use process, when the signal obtained after echo signal cancellation still cannot meet the requirement of the present solution, the step may return to step S13 to re-fit the analog echo signal, and perform echo signal cancellation according to the re-fitted analog echo signal.
Therefore, by the method of the embodiment of the application, the signal played by the loudspeaker can be acquired; pre-filtering a signal played by a loudspeaker according to a frequency response curve obtained by pre-calculation to obtain a reference signal; fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal; and eliminating the echo signal according to the signal collected by the sound pick-up by the analog echo signal. 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 eliminating the echo signal are improved.
In a possible implementation, referring to fig. 5, the pre-filtering the signal played by the speaker according to the pre-calculated frequency response curve to obtain the reference signal includes:
and S121, configuring a preset equalization filter according to the frequency response curve obtained by pre-calculation.
Optionally, the configuring of the preset equalization filter according to the pre-calculated frequency response curve includes: acquiring a center frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in a frequency response curve obtained by pre-calculation, wherein the gain coefficient is the mean value of frequency responses divided by the peak value of frequency responses corresponding to the frequency points with larger frequency response differences; 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 frequency response according to an embodiment of the present application, a mean ave _ h of h (n) array can be calculated through a frequency response curve, and meanwhile, it can be detected that there are distinct peaks at 3000hz and 6500hz, by comparing left and right side values of a peak point with the mean, it can be obtained that a frequency response h (n) corresponding to a 2375hz point and 3500hz point near the mean 3000hz reaches a mean level, and a bandwidth 1125hz is obtained by subtracting the two values, and meanwhile, a gain coefficient is obtained by dividing a value h (n) corresponding to the peak 3000hz by the mean ave _ h, so that an equalization filter corresponding to the peak can be configured according to a center frequency of 3000hz, and a bandwidth and a gain of 1125 hz; similarly we can get 6500hz equalization filter.
And S122, amplifying or reducing the target frequency point in the signal played by the loudspeaker through the configured equalization filter to obtain a reference signal.
And the target frequency point is a frequency point of which the frequency response obtained by judging through the frequency response curve is greater than a preset threshold value.
Since the frequency response of the target frequency point in the frequency response curve is far greater than that of the other frequency points possibly caused by resonance of the equipment, the signal amplification or reduction through the target frequency point can reduce the nonlinear influence caused by external equipment, and a reference signal is obtained.
In one possible embodiment, referring to fig. 6, the method further comprises:
and S21, playing the frequency sweep signal through a loudspeaker.
The sweep frequency signals comprise signals corresponding to a plurality of sweep frequency points. The frequency sweep signal is generated, for example, based on the frequency resolution of the echo cancellation algorithm or a higher resolution than this resolution. If the resolution of echo cancellation is 125hz, a total of N single frequency signals of 125hz, 250hz, …. N × 125hz ….8000hz are generated to constitute the frequency sweep signal. Referring to fig. 7, fig. 7 is a schematic diagram of a method for acquiring a frequency response curve according to an embodiment of the present application:
and S22, receiving the frequency sweep signal played by the loudspeaker through the sound pick-up, and obtaining the frequency sweep signal received by the sound pick-up.
And S23, calculating the frequency response of each sweep frequency point through a preset response function according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the sound pick-up.
For example, the frequency sweep signal is sent to a loudspeaker for playing, and is collected through a sound collector. Sending the collected signals and the original sweep frequency signals into a calculation response function H (f), and calculating the frequency response H (n) of each sweep frequency point:
Figure BDA0002566968420000081
wherein, the range of 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, and y (N) is the amplitude of the nth single-frequency signal in the sweep frequency signal collected by the sound pickup, so as to obtain the frequency response H (N) of each sweep frequency point.
And S24, normalizing the frequency response to obtain a frequency response curve.
Optionally, normalizing the frequency response to obtain a frequency response curve, including: selecting a frequency response corresponding to the maximum frequency response value of each scanning frequency point as a reference frequency response according to the frequency response of each scanning frequency point; and 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.
Therefore, by the method for acquiring the frequency response curve, the sweep frequency signal can be played through the loudspeaker; receiving a frequency sweeping signal played by a loudspeaker through a sound pick-up to obtain a frequency sweeping signal received by the sound pick-up; calculating the frequency response of each sweep frequency point through a preset response function according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the sound pick-up; and normalizing the frequency response to obtain a frequency response curve. Therefore, the preset equalization filter can be conveniently configured 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:
and S21, playing the frequency sweep signal through a loudspeaker.
The sweep frequency signals comprise signals corresponding to a plurality of sweep frequency points.
And S22, receiving the frequency sweep signal played by the loudspeaker through the sound pick-up, and obtaining the frequency sweep signal received by the sound pick-up.
And S23, calculating the frequency response of each sweep frequency point through a preset response function according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the sound pick-up.
And S24, normalizing the frequency response to obtain a frequency response curve.
Optionally, normalizing the frequency response to obtain a frequency response curve, including: selecting a frequency response corresponding to the maximum frequency response value of each scanning frequency point as a reference frequency response according to the frequency response of each scanning frequency point; and 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.
And S11, acquiring signals played by the loudspeaker.
And 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 relation between the frequency and the loudness of the current loudspeaker. Optionally, the pre-filtering the signal played by the speaker according to the pre-calculated frequency response curve to obtain a reference signal, includes: configuring a preset equalization filter according to a frequency response curve obtained by pre-calculation; 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 of which the frequency response obtained through the judgment of the frequency response curve is greater than a preset threshold value.
Optionally, the configuring of the preset equalization filter according to the pre-calculated frequency response curve includes: acquiring a center frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in a frequency response curve obtained by pre-calculation, wherein the gain coefficient is the mean value of frequency responses divided by the peak value of frequency responses corresponding to the frequency points with larger frequency response differences; and configuring a preset equalization filter according to the center frequency, the bandwidth and the gain.
And S13, fitting the echo signal according to the reference signal and the signal acquired by the pre-acquired sound pickup to obtain a simulated echo signal.
Optionally, fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal, including: and obtaining an analog echo signal through iterative updating of the adaptive filter according to the reference signal and a signal acquired by the pre-acquired sound pickup.
Optionally, before fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain the analog echo signal, the method further includes: playing a frequency sweeping signal through a loudspeaker, wherein the frequency sweeping signal comprises signals corresponding to a plurality of frequency sweeping points; receiving a frequency sweeping signal played by a loudspeaker through a sound pick-up to obtain a frequency sweeping signal received by the sound pick-up; calculating the frequency response of each sweep frequency point through a preset response function according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the sound pick-up; and normalizing the frequency response to obtain a frequency response curve.
And S14, eliminating the echo signal according to the analog echo signal.
Optionally, the echo signal is eliminated from the signal collected by the sound pickup according to the analog echo signal, including: and subtracting the analog echo signal from the signal collected by the sound pick-up to obtain the audio signal with the echo eliminated.
Therefore, by the method of the embodiment of the application, the signal played by the loudspeaker can be acquired; pre-filtering a signal played by a loudspeaker according to a frequency response curve obtained by pre-calculation to obtain a reference signal; fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal; and eliminating the echo signal according to the signal collected by the sound pick-up by the analog echo signal. 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 eliminating the echo signal are improved.
Referring to fig. 9, fig. 9 is a structural diagram of an echo cancellation device according to an embodiment of the present application, including:
a signal obtaining module 101, configured to obtain a signal played by a speaker;
the pre-filtering module 102 is configured to perform pre-filtering processing on a signal played by a speaker according to a frequency response curve obtained through pre-calculation to obtain a reference signal, where the frequency response curve is used to represent a relationship between a frequency and a loudness of a current speaker;
the echo fitting module 103 is configured to perform fitting on an echo signal according to a reference signal and a signal acquired by a pre-acquired sound pickup to obtain an analog echo signal;
and the echo cancellation module 104 is configured to perform echo cancellation on the signal collected by the sound pickup according to the analog echo signal.
Optionally, the pre-filtering module 102 includes:
the filtering configuration submodule is used for configuring a preset equalization filter according to a frequency response curve obtained through pre-calculation;
and the signal adjusting submodule is used for amplifying or reducing a target frequency point in a signal played by the loudspeaker through the configured equalizing filter to obtain a reference signal, wherein the target frequency point is a frequency point of which the frequency response obtained through the judgment of the frequency response curve is greater than a preset threshold value.
Optionally, the filtering configuration sub-module includes:
the parameter acquisition unit is used for acquiring a center frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in a frequency response curve obtained by pre-calculation, wherein the gain coefficient is the average value of frequency responses divided by the peak value of the frequency responses corresponding to the frequency points with larger frequency response differences;
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 comprises:
the device comprises a sweep frequency signal module, a frequency conversion module and a frequency conversion module, wherein the sweep frequency signal module is used for playing a sweep frequency signal through a loudspeaker, and the sweep frequency signal comprises signals corresponding to a plurality of sweep frequency points;
the frequency sweep receiving module is used for receiving the frequency sweep signal played by the loudspeaker through the sound pick-up to obtain the frequency sweep signal received by the sound pick-up;
the frequency response module is used for calculating the frequency response of each sweep frequency point through a preset response function according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the sound pick-up;
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 submodule is used for selecting the frequency response corresponding to the maximum frequency response value of each scanning frequency point as the reference frequency response according to the frequency response of each scanning frequency point;
and the curve acquisition submodule 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 submodule is used for obtaining the analog echo signal through the iteration updating of the adaptive filter according to the reference signal and the signal acquired by the pre-acquired sound pickup.
Optionally, the echo cancellation module 104 includes:
and the signal subtracting submodule is used for subtracting the analog echo signal from the signal collected by the sound pick-up to obtain the audio signal with the echo eliminated.
Therefore, the device can acquire the signal played by the loudspeaker; pre-filtering a signal played by a loudspeaker according to a frequency response curve obtained by pre-calculation to obtain a reference signal; fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal; and eliminating the echo signal according to the signal collected by the sound pick-up by the analog echo signal. 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 eliminating the echo signal are improved.
The embodiment of the present application further provides an electronic device, as shown in fig. 10, which includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, where the processor 111, the communication interface 112, and the memory 113 complete mutual communication through the communication bus 114,
a memory 113 for storing a computer program;
the processor 111, when executing the program stored in the memory 113, implements the following steps:
acquiring a signal played by a loudspeaker;
pre-filtering a signal played by a loudspeaker according to a frequency response curve obtained by pre-calculation 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 the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal;
and eliminating the echo signal according to the signal collected by the sound pick-up by the analog echo signal.
Optionally, when the processing is used to execute a program stored in a memory, the echo cancellation method may also be implemented.
The communication bus mentioned in the electronic device may be a PCI (Peripheral component interconnect) bus, an EISA (Extended Industry standard architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a RAM (Random Access Memory) or an 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 processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the echo cancellation method are implemented.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (10)

1. An echo cancellation method, comprising:
acquiring a signal played by a loudspeaker;
pre-filtering a signal played by the loudspeaker according to a frequency response curve obtained by pre-calculation 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 the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal;
and eliminating the echo signal of the signal collected by the sound pickup according to the simulated echo signal.
2. The method of claim 1, wherein pre-filtering the signal played by the speaker according to the pre-computed frequency response curve to obtain a reference signal comprises:
configuring a preset equalization filter according to a frequency response curve obtained by pre-calculation;
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 of which the frequency response obtained through the judgment of the frequency response curve is greater than a preset threshold value.
3. The method of claim 2, wherein the configuring the pre-determined equalization filter according to the pre-calculated frequency response curve comprises:
acquiring a center frequency, a bandwidth and a gain coefficient corresponding to a target frequency point in a frequency response curve obtained by pre-calculation, wherein the gain coefficient is the average value of frequency responses divided by the peak value of the frequency responses corresponding to the frequency points with larger frequency response difference;
and configuring the preset equalization filter according to the central frequency, the bandwidth and the gain.
4. The method of claim 1, further comprising:
playing a sweep frequency signal through a loudspeaker, wherein the sweep frequency signal comprises signals corresponding to a plurality of sweep frequency points;
receiving the frequency sweep signal played by the loudspeaker through a sound pick-up to obtain the frequency sweep signal received by the sound pick-up;
calculating the frequency response of each sweep frequency point through a preset response function according to the sweep frequency signal played by the loudspeaker and the sweep frequency signal received by the sound pick-up;
and normalizing the frequency response to obtain a frequency response curve.
5. The method of claim 4, wherein said normalizing the frequency response to obtain a frequency response curve comprises:
selecting a frequency response corresponding to the maximum frequency response value of each scanning frequency point as a reference frequency response according to the frequency response of each scanning frequency point;
and 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.
6. The method of claim 1, wherein fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired microphone to obtain an analog echo signal comprises:
and obtaining an analog echo signal through iterative updating of a self-adaptive filter according to the reference signal and the signal acquired by the pre-acquired sound pickup.
7. The method of claim 1, wherein the canceling of the echo signal from the analog echo signal for the signal collected by the microphone comprises:
and subtracting the analog echo signal from the signal collected by the sound pick-up to obtain an audio signal with echo eliminated.
8. 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 signal played by the loudspeaker according to a frequency response curve obtained through pre-calculation 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;
the echo fitting module is used for fitting the echo signal according to the reference signal and a signal acquired by a pre-acquired sound pickup to obtain a simulated echo signal;
and the echo cancellation module is used for carrying out echo signal cancellation on the signal collected by the sound pickup according to the analog echo signal.
9. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-7 when executing the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202010633748.0A 2020-07-02 2020-07-02 Echo cancellation method and device, electronic equipment and storage medium Pending CN111798864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010633748.0A CN111798864A (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 CN111798864A (en) 2020-07-02 2020-07-02 Echo cancellation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111798864A true CN111798864A (en) 2020-10-20

Family

ID=72811156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010633748.0A Pending CN111798864A (en) 2020-07-02 2020-07-02 Echo cancellation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111798864A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112397080A (en) * 2020-10-30 2021-02-23 浙江大华技术股份有限公司 Echo cancellation method and apparatus, voice device, and computer-readable storage medium
CN112863534A (en) * 2020-12-31 2021-05-28 思必驰科技股份有限公司 Noise audio eliminating method and voice recognition method
CN113613143A (en) * 2021-07-08 2021-11-05 北京小唱科技有限公司 Audio processing method and device suitable for mobile terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112397080A (en) * 2020-10-30 2021-02-23 浙江大华技术股份有限公司 Echo cancellation method and apparatus, voice device, and computer-readable storage medium
CN112863534A (en) * 2020-12-31 2021-05-28 思必驰科技股份有限公司 Noise audio eliminating method and voice recognition method
CN112863534B (en) * 2020-12-31 2022-05-10 思必驰科技股份有限公司 Noise audio eliminating method and voice recognition method
CN113613143A (en) * 2021-07-08 2021-11-05 北京小唱科技有限公司 Audio processing method and device suitable for mobile terminal and storage medium

Similar Documents

Publication Publication Date Title
CN111798864A (en) Echo cancellation method and device, electronic equipment and storage medium
US10827263B2 (en) Adaptive beamforming
CN110809211B (en) Method for actively reducing noise of earphone, active noise reduction system and earphone
US9154874B2 (en) Howling detection device, howling suppressing device and method of detecting howling
CN108540895A (en) Intelligent equalization device design method and noise cancelling headphone with intelligent equalization device
US6674863B2 (en) Microphone-speaker apparatus
CN112509595A (en) Audio data processing method, system and storage medium
CN110956973A (en) Echo cancellation method and device and intelligent terminal
CN111356058B (en) Echo cancellation method and device and intelligent sound box
CN108810746A (en) A kind of sound quality optimization method, feedback noise reduction system, earphone and storage medium
KR102517939B1 (en) Capturing far-field sound
CN104518746A (en) Electronic device and gain control method
CN113012709A (en) Echo cancellation method and device
CN111035323A (en) Method, equipment and system for actively reducing noise of sweeping robot
CN104754465B (en) A kind of adaptive signal enhancement method and system
CN114420153A (en) Sound quality adjusting method, device, equipment and storage medium
CN115410593A (en) Audio channel selection method, device, equipment and storage medium
CN113676815A (en) Noise reduction method and device, earphone equipment and storage medium
CN112822610A (en) DSP-based stereo power amplifier no-signal automatic muting method and system
CN115835092B (en) Audio amplification feedback suppression method, system, computer and storage medium
CN113870882A (en) Howling suppression method, system, storage medium and earphone device
CN114724576B (en) Method, device and system for updating threshold in howling detection in real time
CN113573205B (en) Signal processing method, apparatus and computer storage medium
JP2848285B2 (en) Echo canceller circuit
CN115312071A (en) Voice data processing method and device, electronic equipment 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