CN111083297A - Echo cancellation method and electronic equipment - Google Patents

Echo cancellation method and electronic equipment Download PDF

Info

Publication number
CN111083297A
CN111083297A CN201911112801.6A CN201911112801A CN111083297A CN 111083297 A CN111083297 A CN 111083297A CN 201911112801 A CN201911112801 A CN 201911112801A CN 111083297 A CN111083297 A CN 111083297A
Authority
CN
China
Prior art keywords
signal
power spectrum
end signal
statistics
frequency band
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
CN201911112801.6A
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.)
Vivo Mobile Communication Hangzhou Co Ltd
Original Assignee
Vivo Mobile Communication Hangzhou 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 Vivo Mobile Communication Hangzhou Co Ltd filed Critical Vivo Mobile Communication Hangzhou Co Ltd
Priority to CN201911112801.6A priority Critical patent/CN111083297A/en
Publication of CN111083297A publication Critical patent/CN111083297A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M9/00Arrangements for interconnection not involving centralised switching
    • H04M9/08Two-way loud-speaking telephone systems with means for conditioning the signal, e.g. for suppressing echoes for one or both directions of traffic
    • H04M9/082Two-way loud-speaking telephone systems with means for conditioning the signal, e.g. for suppressing echoes for one or both directions of traffic using echo cancellers

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)

Abstract

The invention provides an echo cancellation method and electronic equipment, wherein the echo cancellation method comprises the following steps: acquiring a first near-end signal, a pre-estimated echo signal and an error signal; judging whether double talk exists according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the self-adaptive filter according to the judgment result to eliminate echo; the dual-speaker is used for acquiring a near-end signal and a far-end signal simultaneously by the electronic equipment. The technical scheme provided by the invention solves the problem of low voice communication quality of the existing electronic equipment.

Description

Echo cancellation method and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an echo cancellation method and an electronic device.
Background
With the development of communication technology, communication modes and devices are constantly changing. During communication, a far-end signal (e.g., a sound emitted by a party dialing a call when a user answers the call) played by a speaker may be reflected by an environment and received by a microphone to form an echo, and the echo may be mixed with a local voice (e.g., a sound emitted by the user to the microphone when the user answers the call) and transmitted as a near-end signal to the far-end, so as to affect the receiving quality of the far-end signal.
The existing electronic equipment usually adopts a self-adaptive filter to perform acoustic echo cancellation, when local voice does not exist, the existing self-adaptive filtering algorithm can achieve a good echo cancellation effect, but when the local voice exists, the self-adaptive filter diverges to cause voice distortion, so that the voice communication quality is low.
Disclosure of Invention
The embodiment of the invention provides an echo cancellation method and electronic equipment, and aims to solve the problem that existing electronic equipment is low in voice communication quality.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an echo cancellation method applied to an electronic device, including:
acquiring a first near-end signal, a pre-estimated echo signal and an error signal;
judging whether double talk exists according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the self-adaptive filter according to the judgment result to eliminate echo;
the double-talk is that the electronic equipment acquires a near-end signal and a far-end signal simultaneously.
In a second aspect, an embodiment of the present invention further provides an electronic device, including:
the acquisition module is used for acquiring a first near-end signal, a pre-estimated echo signal and an error signal;
the echo cancellation module is used for judging whether double talk exists according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the adaptive filter according to the judgment result to perform echo cancellation;
the double-talk is that the electronic equipment acquires a near-end signal and a far-end signal simultaneously.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the echo cancellation method according to the first aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the echo cancellation method according to the first aspect.
In the embodiment of the invention, the electronic equipment acquires a first near-end signal, a pre-estimated echo signal and an error signal; and judging whether double talk exists or not according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the self-adaptive filter according to a judgment result to eliminate the echo. Therefore, the electronic equipment can adjust the working state of the adaptive filter in a targeted manner according to whether double talk exists or not so as to realize echo cancellation; and when judging that double-talk exists, the self-adaptive filter is effectively prevented from diverging during double-talk, and then the situations of voice signal distortion and unclean echo output by the electronic equipment can be avoided, so that the echo is more effectively eliminated, and the voice call quality of the electronic equipment is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart of an echo cancellation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an acoustic echo system in an electronic device to which the echo cancellation method provided in FIG. 1 is applied;
FIG. 3 is a block diagram of an electronic device according to an embodiment of the present invention;
fig. 4 is a block diagram of another electronic device provided in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. 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 invention.
Referring to fig. 1, fig. 1 is a flowchart of an echo cancellation method according to an embodiment of the present invention, where the echo cancellation method is applied to an electronic device. As shown in fig. 1, the echo cancellation method includes the following steps:
step 101, obtaining a first near-end signal, a pre-estimated echo signal and an error signal.
Illustratively, the electronic device typically includes an Acoustic echo cancellation system (AEC), which typically includes a far-end signal x (n), a near-end signal d (n), and a predicted echo signal
Figure BDA0002273225310000031
Error signals e (n), etc. For example, when the electronic device is in a scene of receiving a call, please refer to fig. 2, the far-end signal x (n) refers to a voice signal transmitted by a calling party, y (n) refers to a far-end signal x (n) which is played by a speaker and then reflected to re-enter a microphone of the electronic device, s (n) refers to a local voice, d (n) refers to an input signal of a near-end microphone, wherein d (n) is y (n) + s (n), e (n) is an error signal which is equal to d (n) of the near-end voice and an adaptive filter estimates echo
Figure BDA0002273225310000032
A difference of (i.e.
Figure BDA0002273225310000033
And the error signal e (n) is the speech signal output by the electronic device to the remote end.
In the embodiment of the present invention, the electronic device may obtain a frame of the first near-end signal, the estimated echo signal, and the error signal. For example, assume that the adaptive filter acquires the near-end signal of the l-th frame as
Figure BDA0002273225310000034
The error signal is
Figure BDA0002273225310000035
Estimate the echo signal as
Figure BDA0002273225310000036
I.e. the first near-end signal; wherein:
Figure BDA0002273225310000037
Figure BDA0002273225310000038
Figure BDA0002273225310000039
in the above formula, N is a frame duration of a frame signal, such as 60ms, 80ms, etc.; n is a variable and is a positive integer, such as 1, 2, 3, etc.; optionally, N is an integer multiple of N.
And 102, judging whether double talk exists or not according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the adaptive filter according to a judgment result to eliminate the echo.
The double-talk is that the electronic equipment acquires a near-end signal and a far-end signal simultaneously. For example, when the electronic device is in a state of answering a call, a sound emitted by a party of calling the call and played by a loudspeaker of the electronic device is a far-end signal, and the sound emitted by a microphone and an echo generated by the far-end signal are held by the electronic device to be a near-end signal. Simply, if the party making the call and the party receiving the call speak simultaneously, it is assumed that there is double talk.
As can be appreciated, the first and second electrodes,
Figure BDA0002273225310000041
that is, the error signal is the difference between the near-end signal and the estimated echo signal, and the near-end signal is the local speech and echoThe sum of the acoustic signals, when the near-end signal only includes the local voice, that is, there is no echo signal, or when the near-end signal only includes the echo signal and does not include the local voice, it can be determined that there is no double talk; if the near-end signal includes local speech and an echo signal, it can be determined that double talk exists. The electronic device can correspondingly adjust the working state of the adaptive filter according to whether the double talk exists or not so as to eliminate the echo.
Optionally, the determining whether a double talk exists according to the first near-end signal, the estimated echo signal, and the error signal includes:
respectively calculating power spectrums of the first near-end signal, the estimated echo signal and the error signal;
calculating a first cross-correlation parameter of a pre-estimated echo signal power spectrum and a first near-end signal power spectrum and a second cross-correlation parameter of the first near-end signal power spectrum and an error signal power spectrum;
and respectively calculating statistics of the first near-end signal power spectrum, the pre-estimated echo signal power spectrum, the error signal power spectrum, the first cross-correlation parameter and the second cross-correlation parameter in a preset frequency band to judge whether double talk exists.
In this embodiment, after obtaining a frame of the first near-end signal, the error signal, and the estimated echo signal, the power spectrums of the first near-end signal, the error signal, and the estimated echo signal are respectively calculated based on a power spectrum algorithm.
Alternatively, based on the block adaptive filter algorithm, the l-th frame contains N sample points, and FFT [ ] indicates that FFT (Fast Fourier transform) is performed on a frame of signals.
Defining the spectrum vector of the remote signal of the l frame
Figure BDA0002273225310000042
Figure BDA0002273225310000043
Defining the near-end signal spectrum of the l frameVector quantity
Figure BDA0002273225310000044
Figure BDA0002273225310000045
Defining a frame I error signal spectral vector
Figure BDA0002273225310000046
Figure BDA0002273225310000047
Figure BDA0002273225310000051
Defining the first frame to predict echo signal spectrum vector
Figure BDA0002273225310000052
Figure BDA0002273225310000053
And respectively calculating the power spectrums of the first near-end signal, the error signal and the estimated echo signal based on the defined spectrum vectors.
Calculating a first near-end signal power spectrum Pd(k,l):
Pd(k,l)=α·Pd(k,l-1)+β·|D(k,l)|2
Calculating error signal power spectrum Pe(k,l):
Pe(k,l)=α·Pe(k,l-1)+β·|E(k,l)|2
Calculating and estimating power spectrum of echo signal
Figure BDA0002273225310000054
Figure BDA0002273225310000055
Wherein l is a frame number, k is a spectrum number, k is 0,1, …, N/2+1, α and β are smoothing factors and are constants between 0 and 1, and usually α + β is 1.
Further, a first cross-correlation parameter of the power spectrum of the estimated echo signal and the power spectrum of the first near-end signal is calculated
Figure BDA0002273225310000056
And a second cross-correlation parameter P of the first near-end signal power spectrum and the error signal power spectrumde(k, l); specifically, the method comprises the following steps:
Figure BDA0002273225310000057
Figure BDA0002273225310000058
wherein l is a frame number, k is a spectrum number, k is 0,1, …, N/2+1, δ is a smoothing factor and is a constant between 0 and 1, and x is a complex number and a conjugate.
It should be noted that the echo characteristic of the speech signal is usually obvious in a certain frequency range, which is also the predetermined frequency band, and it is assumed that the frequency range of the predetermined frequency band is
Figure BDA0002273225310000059
For example, assume that the frequency range Fband ∈ [300Hz,1800Hz ] of the preset frequency band]. In this embodiment, it is assumed that after FFT conversion of each signal, the upper and lower spectrum indexes within the preset frequency band are klowAnd khighThe calculation formula of the correlation power spectrum is as follows:
statistics of the power spectrum of the first near-end signal in the preset frequency band
Figure BDA00022732253100000510
Statistics of error signal power spectrum in the preset frequency band
Figure BDA0002273225310000061
Predicting statistics of echo signal power spectrum in the preset frequency band
Figure BDA0002273225310000062
Statistics of a first cross-correlation parameter within the predetermined frequency band
Figure BDA0002273225310000063
Statistics of a second cross-correlation parameter within the predetermined frequency band
Figure BDA0002273225310000064
Wherein, in the above formulas, l is a frame number, k is a frequency spectrum number, and k ishighIs the highest frequency spectrum, k, of the predetermined frequency bandlowThe lowest frequency spectrum of the preset frequency band.
It is understood that after the above statistics are obtained by calculation, whether double talk exists may be determined based on the magnitude of the statistics, for example, whether the magnitude of each statistic is greater than a preset threshold, if so, the double talk exists may be determined, and if not, the double talk does not exist.
Optionally, the calculating statistics of the first near-end signal power spectrum, the estimated echo signal power spectrum, the error signal power spectrum, the first cross-correlation parameter, and the second cross-correlation parameter in a preset frequency band, respectively, to determine whether there is double talk may include:
obtaining a first numerical value according to the statistics of the power spectrum of the first near-end signal, the statistics of the power spectrum of the pre-estimated echo signal and the statistics of the first cross-correlation, and obtaining a second numerical value according to the statistics of the power spectrum of the first near-end signal, the statistics of the power spectrum of the error signal and the statistics of the second cross-correlation;
and judging whether double talk exists according to the first numerical value and the second numerical value.
In this embodiment, based on the statistics obtained by the above calculation, two statistics in the dual-threshold detection algorithm are calculated: pre-estimated echo signal and first near-end signal cross-correlation with preset frequency band normalization
Figure BDA0002273225310000065
Cross-correlation ρ of a preset band normalized first near-end signal and an error signalde(l) In that respect The specific calculation formula is as follows:
Figure BDA0002273225310000066
Figure BDA0002273225310000067
illustratively, the first value is
Figure BDA0002273225310000068
From the above formula, the first value
Figure BDA0002273225310000071
Statistics P in the preset frequency band through the power spectrum of the first near-end signald(l) Predicting the statistic of the power spectrum of the echo signal in the preset frequency band
Figure BDA0002273225310000072
Statistics of the first cross-correlation parameter within the predetermined frequency band
Figure BDA0002273225310000073
And (6) calculating. The second value is pde(l) The second value ρ can also be derived from the above formulade(l) Statistics P in the preset frequency band through the power spectrum of the first near-end signald(l) Statistic P of error signal power spectrum in the preset frequency bande(l) And the second cross-correlation parameter is within the preset frequency bandStatistic P ofde(l) And (6) calculating.
In this embodiment, after the first numerical value and the second numerical value are obtained through calculation, whether double talk exists is determined according to the magnitudes of the first numerical value and the second numerical value. For example, the first numerical value and the second numerical value may be compared with a preset threshold, if both the first numerical value and the second numerical value are greater than the preset threshold, it may be determined that there is double talk, and if the first numerical value is less than the preset threshold and/or the second numerical value is less than the preset threshold, it is determined that there is no double talk, and then the electronic device may adjust the adaptive filter to operate in different operating states according to whether there is double talk, so as to implement echo cancellation.
Optionally, the determining whether there is double talk according to the first numerical value and the second numerical value includes:
judging that double talk exists under the condition that the first numerical value is smaller than a first preset threshold value and the second numerical value is larger than a second preset threshold value;
and judging that the double talk does not exist under the condition that the first numerical value is greater than or equal to the first preset threshold value and/or the second numerical value is less than or equal to the second threshold value.
It should be noted that the first preset threshold and the second preset threshold are preset values of the electronic device, and the first preset threshold and the second preset threshold may be the same or different in value.
In the embodiment of the invention, if the first numerical value is smaller than the first preset threshold value and the second numerical value is larger than the second preset threshold value, the electronic equipment judges that the double-talk condition exists at the moment; if the first value is greater than or equal to a first preset threshold value, or the second value is less than or equal to a second preset threshold value, or the first value is greater than or equal to the first preset threshold value and the second value is less than or equal to the second preset threshold value, the electronic equipment judges that the double-talk condition does not exist at the moment; furthermore, the electronic device can adjust the working state of the adaptive filter based on whether the double talk exists or not, such as controlling the coefficient of the adaptive filter to be updated or not to be updated, so as to realize echo cancellation.
It should be noted that the first value and the second value are obtained by calculating for multiple times based on a frame of near-end signal, an estimated echo signal and an error signal obtained by the electronic device, and the magnitudes of the first value and the second value are the key for determining whether double talk exists, so that it can be understood that, in an acoustic echo cancellation system of the electronic device, the near-end signal, the estimated echo signal and the error signal are the key factors for determining whether double talk exists in the electronic device.
In the embodiment of the invention, the accuracy of the double-talk detection method and the robustness of the algorithm to noise interference can be effectively improved by judging the first numerical value and the second numerical value.
Optionally, the adjusting the working state of the adaptive filter according to the determination result to perform echo cancellation includes:
under the condition that double talk exists, filtering the first near-end signal collected by the microphone through the self-adaptive filter, and outputting a filtered error signal;
and under the condition that double-talk does not exist, filtering the first near-end signal acquired by the microphone through the adaptive filter, outputting a filtered error signal, updating the coefficient of the adaptive filter according to the filtered error signal, and filtering a second near-end signal acquired by the microphone by using the updated coefficient of the adaptive filter.
Illustratively, an adaptive filter is a filter that is capable of changing the adaptive filter coefficients according to a correlation algorithm (e.g., an adaptive algorithm). When the first near-end signal, the pre-estimated echo signal and the error signal based on the current frame are calculated to obtain a first numerical value and a second numerical value, and the electronic equipment is judged to have double talk through the first numerical value and the second numerical value, the electronic equipment stops updating of the coefficient of the self-adaptive filter, filters the first near-end signal of the current frame acquired by the microphone through the self-adaptive filter, outputs the filtered error signal, and further achieves echo cancellation under the condition of double talk. In this embodiment, under the condition that there is double-talk, by stopping updating of the adaptive filter coefficient, divergence of the adaptive filter during double-talk can be effectively prevented, and then the situations of distortion of the voice signal output by the electronic device and unclean echo can be avoided, so that echo is eliminated more effectively, and the voice call quality of the electronic device is improved.
When the first near-end signal, the pre-estimated echo signal and the error signal based on the current frame are calculated to obtain a first numerical value and a second numerical value, and the fact that the electronic equipment does not have double-talk is judged through the first numerical value and the second numerical value, the electronic equipment controls the self-adaptive filter to start coefficient updating, the first near-end signal of the current frame collected by the microphone is filtered through the self-adaptive filter, the filtered error signal is output, the self-adaptive filter can be updated according to the filtered error signal, and then the updated self-adaptive filter coefficient is used for filtering the second near-end signal of the next frame collected by the microphone, so that echo elimination when the double-talk does not exist is achieved.
According to the technical scheme provided by the embodiment of the invention, the electronic equipment acquires a first near-end signal, a pre-estimated echo signal and an error signal; and judging whether double talk exists or not according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the self-adaptive filter according to a judgment result to eliminate the echo. Therefore, the electronic equipment can adjust the working state of the adaptive filter in a targeted manner according to whether double talk exists or not so as to realize echo cancellation; and when judging that double-talk exists, the self-adaptive filter is effectively prevented from diverging during double-talk, and then the situations of voice signal distortion and unclean echo output by the electronic equipment can be avoided, so that the echo is more effectively eliminated, and the voice call quality of the electronic equipment is improved.
Referring to fig. 3, fig. 3 is a structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 3, the electronic device 300 includes:
an obtaining module 301, configured to obtain a first near-end signal, a pre-estimated echo signal, and an error signal;
an echo cancellation module 302, configured to determine whether a double talk exists according to the first near-end signal, the pre-estimated echo signal, and the error signal, and adjust a working state of the adaptive filter according to a determination result to perform echo cancellation;
the double-talk is that the electronic equipment acquires a near-end signal and a far-end signal simultaneously.
Optionally, the echo cancellation module 302 includes:
the first calculation submodule is used for calculating the power spectrums of the first near-end signal, the pre-estimated echo signal and the error signal respectively;
the second calculation submodule is used for calculating a first cross-correlation parameter of the power spectrum of the pre-estimated echo signal and the power spectrum of the first near-end signal and a second cross-correlation parameter of the power spectrum of the first near-end signal and the power spectrum of the error signal;
and the third calculation submodule is used for respectively calculating the statistics of the first near-end signal power spectrum, the pre-estimated echo signal power spectrum, the error signal power spectrum, the first cross-correlation parameter and the second cross-correlation parameter in a preset frequency band so as to judge whether double talk exists or not.
Optionally, the third computing submodule is further configured to:
acquiring a first value according to the statistics of the power spectrum of the first near-end signal in the preset frequency band, the statistics of the power spectrum of the pre-estimated echo signal in the preset frequency band and the statistics of the first cross-correlation parameter in the preset frequency band, and acquiring a second value according to the statistics of the power spectrum of the first near-end signal in the preset frequency band, the statistics of the power spectrum of the error signal in the preset frequency band and the statistics of the second cross-correlation parameter in the preset frequency band;
and judging whether double talk exists according to the first numerical value and the second numerical value.
Optionally, the third computing submodule is further configured to:
judging that double talk exists under the condition that the first numerical value is smaller than a first preset threshold value and the second numerical value is larger than a second preset threshold value;
and judging that the double talk does not exist under the condition that the first numerical value is greater than or equal to the first preset threshold value and/or the second numerical value is less than or equal to the second preset threshold value.
Optionally, the echo cancellation module 302 is further configured to:
under the condition that double talk exists, filtering the first near-end signal collected by the microphone through the self-adaptive filter, and outputting a filtered error signal;
and under the condition that double-talk does not exist, filtering the first near-end signal acquired by the microphone through the adaptive filter, outputting a filtered error signal, updating the coefficient of the adaptive filter according to the filtered error signal, and filtering a second near-end signal acquired by the microphone by using the updated coefficient of the adaptive filter.
It should be noted that the electronic device 300 can implement each process of the echo cancellation method embodiment shown in fig. 1, and can achieve the same technical effect, and for avoiding repetition, details are not described here again.
According to the technical scheme provided by the embodiment of the invention, the electronic equipment 300 acquires a first near-end signal, a pre-estimated echo signal and an error signal; and judging whether double talk exists or not according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the self-adaptive filter according to a judgment result to eliminate the echo. In this way, the electronic device 300 can adjust the working state of the adaptive filter in a targeted manner according to whether the double talk exists or not, so as to realize echo cancellation; and when judging that double-talk exists, the self-adaptive filter is effectively prevented from diverging during double-talk, so that the situations of voice signal distortion and unclean echo output by the electronic equipment 300 can be avoided, the echo is more effectively eliminated, and the voice call quality of the electronic equipment 300 is improved.
Referring to fig. 4, fig. 4 is a structural diagram of another electronic device for implementing the embodiment of the invention, and the electronic device 400 can implement each process of the embodiment of the echo cancellation method described in fig. 1 and achieve the same technical effect. As shown in fig. 4, electronic device 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, a pedometer, and the like.
Wherein, the processor 410 is configured to:
acquiring a first near-end signal, a pre-estimated echo signal and an error signal;
judging whether double talk exists according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the self-adaptive filter according to the judgment result to eliminate echo;
the double-talk is that the electronic equipment acquires a near-end signal and a far-end signal simultaneously.
Wherein, the processor 410 is further configured to:
respectively calculating power spectrums of the first near-end signal, the estimated echo signal and the error signal;
calculating a first cross-correlation parameter of a pre-estimated echo signal power spectrum and a first near-end signal power spectrum and a second cross-correlation parameter of the first near-end signal power spectrum and an error signal power spectrum;
and respectively calculating statistics of the first near-end signal power spectrum, the pre-estimated echo signal power spectrum, the error signal power spectrum, the first cross-correlation parameter and the second cross-correlation parameter in a preset frequency band to judge whether double talk exists.
Wherein, the processor 410 is further configured to:
acquiring a first value according to the statistics of the power spectrum of the first near-end signal in the preset frequency band, the statistics of the power spectrum of the pre-estimated echo signal in the preset frequency band and the statistics of the first cross-correlation parameter in the preset frequency band, and acquiring a second value according to the statistics of the power spectrum of the first near-end signal in the preset frequency band, the statistics of the power spectrum of the error signal in the preset frequency band and the statistics of the second cross-correlation parameter in the preset frequency band;
and judging whether double talk exists according to the first numerical value and the second numerical value.
Wherein, the processor 410 is further configured to:
judging that double talk exists under the condition that the first numerical value is smaller than a first preset threshold value and the second numerical value is larger than a second preset threshold value;
and judging that the double talk does not exist under the condition that the first numerical value is greater than or equal to the first preset threshold value and/or the second numerical value is less than or equal to the second preset threshold value.
Wherein, the processor 410 is further configured to:
under the condition that double talk exists, filtering the first near-end signal collected by the microphone through the self-adaptive filter, and outputting a filtered error signal;
and under the condition that double-talk does not exist, filtering the first near-end signal acquired by the microphone through the adaptive filter, outputting a filtered error signal, updating the coefficient of the adaptive filter according to the filtered error signal, and filtering a second near-end signal acquired by the microphone by using the updated coefficient of the adaptive filter.
In the embodiment of the present invention, the electronic device 400 obtains the first near-end signal, the pre-estimated echo signal and the error signal; and judging whether double talk exists or not according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the self-adaptive filter according to a judgment result to eliminate the echo. In this way, the electronic device 400 can adjust the operating state of the adaptive filter in a targeted manner according to whether or not there is double talk, so as to implement echo cancellation; and when judging that double-talk exists, the self-adaptive filter is effectively prevented from diverging during double-talk, so that the situations of voice signal distortion and unclean echo output by the electronic equipment 400 can be avoided, the echo is more effectively eliminated, and the voice call quality of the electronic equipment 400 is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The electronic device 400 provides the user with wireless broadband internet access via the network module 402, such as assisting the user in emailing, browsing web pages, and accessing streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the electronic apparatus 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still image or video obtained by an image capturing apparatus (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other computer-readable storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The electronic device 400 also includes at least one sensor 405, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 4041 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 4041 and/or the backlight when the electronic device 400 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4041, and the Display panel 4041 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device 400. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4041, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4041 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4041 are two independent components to implement the input and output functions of the electronic apparatus 400, in some embodiments, the touch panel 4071 and the display panel 4041 may be integrated to implement the input and output functions of the electronic apparatus 400, which is not limited herein.
The interface unit 408 is an interface for connecting an external device to the electronic apparatus 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 400 or may be used to transmit data between the electronic apparatus 400 and an external device.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the electronic device 400, connects various parts of the entire electronic device 400 using various interfaces and lines, and performs various functions of the electronic device 400 and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby performing overall monitoring of the electronic device 400. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The electronic device 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the electronic device 400 includes some functional modules that are not shown, and are not described in detail herein.
Optionally, an embodiment of the present invention further provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program, when executed by the processor, implements each process of the embodiment of the echo cancellation method, and can achieve the same technical effect, and details are not repeated here to avoid repetition.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned echo cancellation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, 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 like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An echo cancellation method applied to an electronic device, the method comprising:
acquiring a first near-end signal, a pre-estimated echo signal and an error signal;
judging whether double talk exists according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the self-adaptive filter according to the judgment result to eliminate echo;
the double-talk is that the electronic equipment acquires a near-end signal and a far-end signal simultaneously.
2. The method of claim 1, wherein said determining whether a double talk is present based on said first near-end signal, the estimated echo signal and the error signal comprises:
respectively calculating power spectrums of the first near-end signal, the estimated echo signal and the error signal;
calculating a first cross-correlation parameter of a pre-estimated echo signal power spectrum and a first near-end signal power spectrum and a second cross-correlation parameter of the first near-end signal power spectrum and an error signal power spectrum;
and respectively calculating statistics of the first near-end signal power spectrum, the pre-estimated echo signal power spectrum, the error signal power spectrum, the first cross-correlation parameter and the second cross-correlation parameter in a preset frequency band to judge whether double talk exists.
3. The method of claim 2, wherein the calculating statistics of the first near-end signal power spectrum, the estimated echo signal power spectrum, the error signal power spectrum, the first cross-correlation parameter, and the second cross-correlation parameter within a predetermined frequency band to determine whether double talk exists comprises:
acquiring a first value according to the statistics of the power spectrum of the first near-end signal in the preset frequency band, the statistics of the power spectrum of the pre-estimated echo signal in the preset frequency band and the statistics of the first cross-correlation parameter in the preset frequency band, and acquiring a second value according to the statistics of the power spectrum of the first near-end signal in the preset frequency band, the statistics of the power spectrum of the error signal in the preset frequency band and the statistics of the second cross-correlation parameter in the preset frequency band;
and judging whether double talk exists according to the first numerical value and the second numerical value.
4. The method of claim 3, wherein determining whether double talk is present based on the first value and the second value comprises:
judging that double talk exists under the condition that the first numerical value is smaller than a first preset threshold value and the second numerical value is larger than a second preset threshold value;
and judging that the double talk does not exist under the condition that the first numerical value is greater than or equal to the first preset threshold value and/or the second numerical value is less than or equal to the second preset threshold value.
5. The method of claim 1, wherein the adjusting the operating state of the adaptive filter according to the determination result to perform echo cancellation comprises:
under the condition that double talk exists, filtering the first near-end signal collected by the microphone through the self-adaptive filter, and outputting a filtered error signal;
and under the condition that double-talk does not exist, filtering the first near-end signal acquired by the microphone through the adaptive filter, outputting a filtered error signal, updating the coefficient of the adaptive filter according to the filtered error signal, and filtering a second near-end signal acquired by the microphone by using the updated coefficient of the adaptive filter.
6. An electronic device, comprising:
the acquisition module is used for acquiring a first near-end signal, a pre-estimated echo signal and an error signal;
the echo cancellation module is used for judging whether double talk exists according to the first near-end signal, the pre-estimated echo signal and the error signal, and adjusting the working state of the adaptive filter according to the judgment result to perform echo cancellation;
the double-talk is that the electronic equipment acquires a near-end signal and a far-end signal simultaneously.
7. The electronic device of claim 6, wherein the echo cancellation module comprises:
the first calculation submodule is used for calculating the power spectrums of the first near-end signal, the pre-estimated echo signal and the error signal respectively;
the second calculation submodule is used for calculating a first cross-correlation parameter of the power spectrum of the pre-estimated echo signal and the power spectrum of the first near-end signal and a second cross-correlation parameter of the power spectrum of the first near-end signal and the power spectrum of the error signal;
and the third calculation submodule is used for respectively calculating the statistics of the first near-end signal power spectrum, the pre-estimated echo signal power spectrum, the error signal power spectrum, the first cross-correlation parameter and the second cross-correlation parameter in a preset frequency band so as to judge whether double talk exists or not.
8. The electronic device of claim 7, wherein the third computing sub-module is further configured to:
acquiring a first value according to the statistics of the power spectrum of the first near-end signal in the preset frequency band, the statistics of the power spectrum of the pre-estimated echo signal in the preset frequency band and the statistics of the first cross-correlation parameter in the preset frequency band, and acquiring a second value according to the statistics of the power spectrum of the first near-end signal in the preset frequency band, the statistics of the power spectrum of the error signal in the preset frequency band and the statistics of the second cross-correlation parameter in the preset frequency band;
and judging whether double talk exists according to the first numerical value and the second numerical value.
9. An electronic device, comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the echo cancellation method according to any one of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the echo cancellation method according to any one of claims 1 to 5.
CN201911112801.6A 2019-11-14 2019-11-14 Echo cancellation method and electronic equipment Pending CN111083297A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911112801.6A CN111083297A (en) 2019-11-14 2019-11-14 Echo cancellation method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911112801.6A CN111083297A (en) 2019-11-14 2019-11-14 Echo cancellation method and electronic equipment

Publications (1)

Publication Number Publication Date
CN111083297A true CN111083297A (en) 2020-04-28

Family

ID=70310975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911112801.6A Pending CN111083297A (en) 2019-11-14 2019-11-14 Echo cancellation method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111083297A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111696569A (en) * 2020-06-29 2020-09-22 美的集团武汉制冷设备有限公司 Echo cancellation method for household appliance, terminal and storage medium
CN111883153A (en) * 2020-06-28 2020-11-03 厦门亿联网络技术股份有限公司 Microphone array-based double-talk state detection method and device
CN112017679A (en) * 2020-08-05 2020-12-01 海尔优家智能科技(北京)有限公司 Method, device and equipment for updating adaptive filter coefficient
CN113037939A (en) * 2021-02-01 2021-06-25 广州朗国电子科技有限公司 Echo path detection method, electronic device and storage medium
CN113345459A (en) * 2021-07-16 2021-09-03 北京融讯科创技术有限公司 Method and device for detecting double-talk state, computer equipment and storage medium
CN114650340A (en) * 2022-04-21 2022-06-21 深圳市中科蓝讯科技股份有限公司 Echo cancellation method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9613634B2 (en) * 2014-06-19 2017-04-04 Yang Gao Control of acoustic echo canceller adaptive filter for speech enhancement
CN108429994A (en) * 2017-02-15 2018-08-21 阿里巴巴集团控股有限公司 Audio identification, echo cancel method, device and equipment
CN108806713A (en) * 2018-05-22 2018-11-13 出门问问信息科技有限公司 A kind of double speaking state detection method and device
CN109547655A (en) * 2018-12-30 2019-03-29 广东大仓机器人科技有限公司 A kind of method of the echo cancellation process of voice-over-net call
CN110138990A (en) * 2019-05-14 2019-08-16 浙江工业大学 A method of eliminating mobile device voip phone echo

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9613634B2 (en) * 2014-06-19 2017-04-04 Yang Gao Control of acoustic echo canceller adaptive filter for speech enhancement
CN108429994A (en) * 2017-02-15 2018-08-21 阿里巴巴集团控股有限公司 Audio identification, echo cancel method, device and equipment
CN108806713A (en) * 2018-05-22 2018-11-13 出门问问信息科技有限公司 A kind of double speaking state detection method and device
CN109547655A (en) * 2018-12-30 2019-03-29 广东大仓机器人科技有限公司 A kind of method of the echo cancellation process of voice-over-net call
CN110138990A (en) * 2019-05-14 2019-08-16 浙江工业大学 A method of eliminating mobile device voip phone echo

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111883153A (en) * 2020-06-28 2020-11-03 厦门亿联网络技术股份有限公司 Microphone array-based double-talk state detection method and device
CN111883153B (en) * 2020-06-28 2024-02-23 厦门亿联网络技术股份有限公司 Microphone array-based double-end speaking state detection method and device
CN111696569A (en) * 2020-06-29 2020-09-22 美的集团武汉制冷设备有限公司 Echo cancellation method for household appliance, terminal and storage medium
CN111696569B (en) * 2020-06-29 2023-12-15 美的集团武汉制冷设备有限公司 Echo cancellation method for home appliance, terminal and storage medium
CN112017679A (en) * 2020-08-05 2020-12-01 海尔优家智能科技(北京)有限公司 Method, device and equipment for updating adaptive filter coefficient
CN112017679B (en) * 2020-08-05 2024-01-26 海尔优家智能科技(北京)有限公司 Method, device and equipment for updating adaptive filter coefficients
CN113037939A (en) * 2021-02-01 2021-06-25 广州朗国电子科技有限公司 Echo path detection method, electronic device and storage medium
CN113345459A (en) * 2021-07-16 2021-09-03 北京融讯科创技术有限公司 Method and device for detecting double-talk state, computer equipment and storage medium
CN113345459B (en) * 2021-07-16 2023-02-21 北京融讯科创技术有限公司 Method and device for detecting double-talk state, computer equipment and storage medium
CN114650340A (en) * 2022-04-21 2022-06-21 深圳市中科蓝讯科技股份有限公司 Echo cancellation method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN111083297A (en) Echo cancellation method and electronic equipment
CN109768810B (en) Signal processing circuit, terminal equipment and signal processing method
CN111524498B (en) Filtering method and device and electronic equipment
CN110035149B (en) Multi-antenna optimization method and mobile terminal
CN110855313B (en) Signal control method and electronic equipment
CN110012143B (en) Telephone receiver control method and terminal
CN108196815B (en) Method for adjusting call sound and mobile terminal
CN107785027B (en) Audio processing method and electronic equipment
CN109905812B (en) Input power control method and device and terminal equipment
CN111324235A (en) Screen refreshing frequency adjusting method and electronic equipment
CN111182118B (en) Volume adjusting method and electronic equipment
CN110602696A (en) Conversation privacy protection method and electronic equipment
CN108307123B (en) Exposure adjusting method and mobile terminal
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
CN108879856B (en) Charging method and terminal
CN111541975B (en) Audio signal adjusting method and electronic equipment
CN111328132B (en) Method for adjusting transmitting power and electronic equipment
CN110545351B (en) Incoming call processing method, electronic equipment and computer readable storage medium
CN110992973A (en) Signal time delay determination method and electronic equipment
CN108924319B (en) Proximity detection method and mobile terminal
CN109348366B (en) Method for adjusting volume by using electrical parameters and mobile terminal
CN108600566B (en) Interference processing method and mobile terminal
CN107743174B (en) Clipping judgment method of sound signal and mobile terminal
CN110839108A (en) Noise reduction method and electronic equipment
CN110728990B (en) Pitch detection method, apparatus, terminal device and 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200428

RJ01 Rejection of invention patent application after publication