CN105657110B - Echo cancellation method and device for voice communication - Google Patents
Echo cancellation method and device for voice communication Download PDFInfo
- Publication number
- CN105657110B CN105657110B CN201610109677.8A CN201610109677A CN105657110B CN 105657110 B CN105657110 B CN 105657110B CN 201610109677 A CN201610109677 A CN 201610109677A CN 105657110 B CN105657110 B CN 105657110B
- Authority
- CN
- China
- Prior art keywords
- signal
- far
- voice signal
- echo cancellation
- frequency
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M19/00—Current supply arrangements for telephone systems
- H04M19/08—Current supply arrangements for telephone systems with current supply sources at the substations
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L21/00—Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
- G10L21/02—Speech enhancement, e.g. noise reduction or echo cancellation
- G10L21/0208—Noise filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/02—Constructional features of telephone sets
- H04M1/19—Arrangements of transmitters, receivers, or complete sets to prevent eavesdropping, to attenuate local noise or to prevent undesired transmission; Mouthpieces or receivers specially adapted therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/02—Constructional features of telephone sets
- H04M1/20—Arrangements for preventing acoustic feed-back
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L21/00—Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
- G10L21/02—Speech enhancement, e.g. noise reduction or echo cancellation
- G10L21/0208—Noise filtering
- G10L2021/02082—Noise filtering the noise being echo, reverberation of the speech
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computational Linguistics (AREA)
- Quality & Reliability (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Telephone Function (AREA)
- Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)
Abstract
The invention discloses an echo cancellation method for voice communication, which comprises the following steps: when near-end equipment receives a far-end voice signal transmitted by far-end equipment, playing the received far-end voice signal, and acquiring a frequency point with the largest occurrence frequency in the far-end voice signal; the near-end equipment collects near-end sound to form a near-end voice signal; and performing echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence frequency, and sending the near-end voice signal subjected to echo cancellation to the far-end equipment. The invention also provides an echo cancellation device for voice communication. The invention eliminates the echo generated in the voice communication process and improves the communication voice quality.
Description
Technical Field
The present invention relates to the field of voice communication technologies, and in particular, to a method and an apparatus for echo cancellation in voice communication.
Background
With the development of mobile terminal technology, the application of mobile terminals is becoming more extensive and the functions are becoming more and more powerful. A speaker and a microphone are generally provided in a mobile terminal, wherein the microphone is generally provided with a sealing structure to prevent sound of the speaker from being transmitted into the microphone to cause echo at an opposite end. However, in practical use, due to reasons such as poor production and assembly, the sealing performance of the sealing structure of the microphone of the mobile terminal is poor, so that the sound transmitted from the far end played by the loudspeaker is transmitted into the microphone, and thus, when a user uses the mobile terminal to perform voice communication with other users, the other party can hear the speaking sound of the other party, so that acoustic echo is formed, if the echo is not processed, the communication quality and the user experience are affected, more seriously, vibration is also formed, howling is generated, and the communication voice quality is seriously reduced.
Disclosure of Invention
The invention provides an echo cancellation method and device for voice communication, which mainly aim at eliminating echo generated in the voice communication process and improving the communication voice quality.
In order to achieve the above object, the present invention provides an echo cancellation method for voice communication, including:
when near-end equipment receives a far-end voice signal transmitted by far-end equipment, playing the received far-end voice signal, and acquiring a frequency point with the largest occurrence frequency in the far-end voice signal;
the near-end equipment collects near-end sound to form a near-end voice signal;
and performing echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence frequency, and sending the near-end voice signal subjected to echo cancellation to the far-end equipment.
Preferably, the step of acquiring the frequency point with the largest frequency of occurrence in the far-end voice signal includes:
performing band-pass filtering processing on the far-end voice signal according to a preset cut-off frequency interval to obtain a human voice signal, wherein the preset cut-off frequency interval is a human voice frequency range;
and counting the frequency points with the most occurrence times in the voice signals.
Preferably, before the step of performing echo cancellation on the near-end speech signal according to the obtained frequency point with the largest occurrence number, the echo cancellation method for speech communication further includes the steps of:
judging whether the near-end sound collected by the near-end equipment contains sound generated by playing the far-end voice signal;
when the near-end sound collected by the near-end equipment contains sound generated by playing the far-end voice signal, executing a step of performing echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence frequency;
and when the near-end sound collected by the near-end equipment does not contain the sound generated by playing the far-end voice signal, sending the collected near-end voice signal to the far-end equipment.
Preferably, before the step of performing echo cancellation on the near-end speech signal according to the obtained frequency point with the largest occurrence number, the echo cancellation method for speech communication further includes the steps of:
judging whether the signal intensity of the far-end voice signal is greater than a first preset signal intensity or not and whether the signal intensity of the near-end voice signal is greater than a second preset signal intensity or not;
and when the signal intensity of the far-end voice signal is greater than the first preset signal intensity and the signal intensity of the near-end voice signal is greater than the second preset signal intensity, executing the step of performing echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence frequency, otherwise, sending the collected near-end voice signal to the far-end equipment.
Preferably, the step of determining whether the signal strength of the far-end speech signal is greater than a first preset signal strength includes:
after windowing the far-end voice signal, carrying out Fourier transform to obtain a frequency domain power spectrum of the far-end voice signal, and dividing the frequency domain power spectrum into a plurality of sub-frequency bands;
and when the power spectrums of the sub-frequency bands with preset number are larger than a preset threshold value, judging that the signal intensity of the far-end voice signal is larger than a first preset signal intensity, otherwise, judging that the signal intensity of the far-end voice signal is smaller than the first preset signal intensity.
Further, to achieve the above object, the present invention provides an echo cancellation device for voice communication, including:
the voice playing module is used for playing the received far-end voice signal when receiving the far-end voice signal transmitted by the far-end equipment;
the device comprises a frequency point acquisition module, a frequency point acquisition module and a processing module, wherein the frequency point acquisition module is used for acquiring a frequency point with the largest occurrence frequency in a far-end voice signal when the far-end voice signal transmitted by far-end equipment is received;
the signal acquisition module is used for acquiring near-end sound to form a near-end voice signal;
the echo cancellation module is used for carrying out echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence frequency;
and the signal sending module is used for sending the near-end voice signal subjected to echo cancellation to the far-end equipment.
Preferably, the frequency point obtaining module includes:
the signal filtering unit is used for carrying out band-pass filtering processing on the far-end voice signal according to a preset cut-off frequency interval to obtain a human voice signal, wherein the preset cut-off frequency interval is a human voice frequency range;
and the frequency point counting unit is used for counting the frequency points with the largest occurrence frequency in the voice signals.
Preferably, the echo cancellation device for voice communication further includes:
the judging module is used for judging whether the near-end sound collected by the near-end equipment contains sound generated by playing the far-end voice signal;
the echo cancellation module is further configured to perform echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence frequency when the near-end sound collected by the near-end device includes sound generated by playing the far-end voice signal;
the signal sending module is further configured to send the collected near-end voice signal to the far-end device when the near-end sound collected by the near-end device does not contain sound generated by playing the far-end voice signal.
Preferably, the echo cancellation device for voice communication further includes:
the signal judgment module is used for judging whether the signal intensity of the far-end voice signal is greater than a first preset signal intensity or not and whether the signal intensity of the near-end voice signal is greater than a second preset signal intensity or not;
the echo cancellation module is further configured to perform echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence number when the signal intensity of the far-end voice signal is greater than the first preset signal intensity and the signal intensity of the near-end voice signal is greater than the second preset signal intensity;
the signal sending module is further configured to send the collected near-end voice signal to the far-end device when the signal strength of the far-end voice signal is less than or equal to the first preset signal strength or the signal strength of the near-end voice signal is less than or equal to the second preset signal strength.
Preferably, the signal determination module includes:
the signal processing unit is used for performing windowing processing on the far-end voice signal, performing Fourier transform to obtain a frequency domain power spectrum of the far-end voice signal, and dividing the frequency domain power spectrum into a plurality of sub-frequency bands;
and the signal judging unit is used for judging that the signal intensity of the far-end voice signal is greater than a first preset signal intensity when the power spectrums of the sub-frequency bands with preset number are greater than a preset threshold value, and otherwise, judging that the signal intensity of the far-end voice signal is less than the first preset signal intensity.
The invention provides an echo cancellation method and device for voice communication, when a near-end device receives a far-end voice signal transmitted by a far-end device, the far-end voice signal is played, a frequency point with the maximum occurrence frequency in the far-end voice signal is obtained, a microphone of the near-end device acquires near-end sound to form a near-end voice signal while the near-end device plays the far-end voice signal, then echo cancellation is carried out on the near-end voice signal according to the frequency point with the maximum occurrence frequency, the near-end voice signal after echo cancellation is sent to the far-end device, because the acquired near-end sound possibly comprises the sound of the far-end voice signal played by a near-end device loudspeaker, the near-end voice signal is subjected to echo cancellation processing, the sound generated when the far-end voice signal is played by the near-end device loudspeaker included in the near-end, the method and the device avoid that the near-end equipment acquires the played far-end voice signal and then sends the far-end equipment to form echo at the far-end equipment, and improve the voice quality in voice communication.
Drawings
FIG. 1 is a flowchart of a first embodiment of a method for echo cancellation in voice communications according to the present invention;
FIG. 2 is a schematic diagram illustrating a detailed flow of the frequency point obtaining step in the first embodiment of the echo cancellation method for voice communication according to the present invention;
FIG. 3 is a functional block diagram of an echo cancellation device for voice communication according to a first embodiment of the present invention;
FIG. 4 is a schematic diagram of a detailed functional module of a frequency point obtaining module in a first embodiment of an echo cancellation device for voice communication according to the present invention;
FIG. 5 is a functional block diagram of an echo cancellation device for voice communication according to a second embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides an echo cancellation method for voice communication.
Referring to fig. 1, a flowchart of a first embodiment of an echo cancellation method for voice communication according to the present invention is shown.
In a first embodiment, the method for echo cancellation for voice communications includes:
step S10, when near-end equipment receives a far-end voice signal transmitted by far-end equipment, the near-end equipment plays the received far-end voice signal and acquires a frequency point with the largest occurrence frequency in the far-end voice signal;
the near-end device and the far-end device in this embodiment may be terminals capable of performing real-time voice communication, such as terminals of a mobile phone, a tablet computer, and the like, and the terminals may include speakers for playing voice signals; the terminal may include a microphone for detecting a sound signal, wherein the sound signal includes a voice signal played by the speaker. It should be noted that the near-end device, the far-end device, the near-end voice signal, and the far-end voice signal described below are only relative and not absolute, for example, when the user a uses a mobile phone to perform a voice call with the user B, the mobile phone used by the user B is the near-end device, the mobile phone used by the user a is the far-end device, and the mobile phone used by the user a is the near-end device, and the mobile phone used by the user B is the far-end device.
The method comprises the steps that a near-end device plays a received far-end voice signal when receiving a far-end voice signal transmitted by a far-end device in the process of carrying out voice communication with the far-end device, and meanwhile, the near-end device analyzes the far-end voice signal to obtain a frequency point with the largest occurrence frequency in the far-end voice signal, namely a main frequency of a voice in the far-end voice signal, and the frequency point is used as a reference frequency for carrying out echo cancellation subsequently.
Further, in order to accurately acquire the frequency point with the largest frequency of occurrence in the far-end speech signal, as shown in fig. 2, step S10 may include the following refinement steps:
step S11, performing band-pass filtering processing on the far-end voice signal according to a preset cut-off frequency interval to obtain a human voice signal, wherein the preset cut-off frequency interval is a human voice frequency range;
and step S12, counting the frequency points with the most frequency in the voice signals.
In an embodiment, the band-pass filter may perform band-pass filtering on the far-end voice signal to filter out noise except for voice in the signal, so as to obtain a voice signal, so as to obtain more accurate frequency point information, and the preset cut-off frequency section of the band-pass filter may be a voice frequency range, that is, a voice frequency range that a person can send out, or a general voice frequency range when the person speaks, for example, may be 50-5000Hz, or 500-5000Hz, and the like. And after the voice signals are obtained, counting the frequency points with the largest occurrence frequency in the voice signals.
Further, the preset cut-off frequency interval may be a cut-off frequency interval set in real time after being analyzed by the voice of the remote user.
Step S20, the near-end equipment collects near-end sound to form a near-end voice signal;
and step S30, performing echo cancellation on the near-end voice signal according to the frequency point with the maximum occurrence frequency, and sending the near-end voice signal after echo cancellation to the far-end equipment.
The microphone of the near-end device collects near-end sound to form a near-end voice signal while the near-end device plays a far-end voice signal, wherein the sound played in the loudspeaker of the near-end device may be collected.
The near-end speech signal is subjected to echo cancellation, and a signal corresponding to the frequency point with the largest occurrence frequency in the near-end speech signal is cancelled, for example, a signal corresponding to the frequency point with the largest occurrence frequency in the far-end speech signal in the near-end speech signal can be cancelled by a band-pass filter to perform echo cancellation. Or carrying out echo cancellation on the near-end voice signal according to the acquired frequency point, the far-end voice signal and the echo cancellation algorithm.
Since the near-end device does not collect the far-end voice signal played by its speaker at each voice call, further, before step S30, the echo cancellation method for voice communication further includes the following steps:
judging whether the near-end sound collected by the near-end equipment contains sound generated by playing the far-end voice signal;
when the near-end sound collected by the near-end device includes the sound generated by playing the far-end voice signal, executing step S30;
and when the near-end sound collected by the near-end equipment does not contain the sound generated by playing the far-end voice signal, sending the collected near-end voice signal to the far-end equipment.
Before performing echo cancellation, it is determined whether there is sound generated by a far-end speech signal played by a near-end device in sound collected by the near-end device, for example, comparing a spectrogram of the far-end speech signal with a spectrogram of the collected near-end speech signal to perform determination, if yes, performing step S30, and if not, directly sending the collected near-end speech signal to the far-end device.
Further, an echo cancellation mode may be set for the device, and when the user turns on the mode, the above steps S10-S30 are performed, and when echo cancellation is not required, the mode is turned off.
In the echo cancellation method for voice communication provided in this embodiment, when a near-end device receives a far-end voice signal transmitted by a far-end device, the far-end voice signal is played, and a frequency point with the largest occurrence frequency in the far-end voice signal is obtained, while the near-end device plays the far-end voice signal, a microphone thereof collects near-end sound to form a near-end voice signal, then echo cancellation is performed on the near-end voice signal according to the frequency point with the largest occurrence frequency, and the near-end voice signal after echo cancellation is sent to the far-end device, because the collected near-end sound may include sound generated when a near-end device speaker plays the far-end voice signal, the invention removes sound generated when the near-end device speaker plays the far-end voice signal included in the near-end voice signal by performing echo cancellation processing on the near-end voice signal, so as to avoid that the near-end device collects the played far-end voice signal and then, echo is formed at the far-end device, improving voice quality in voice communications.
The first embodiment of the echo cancellation method based on voice communication of the present invention proposes a second embodiment of the echo cancellation method of voice communication of the present invention. In the present embodiment, the method is different from the first embodiment in that, before step S30, the echo cancellation method for voice communication further includes the steps of:
judging whether the signal intensity of the far-end voice signal is greater than a first preset signal intensity or not and whether the signal intensity of the near-end voice signal is greater than a second preset signal intensity or not;
and when the signal intensity of the far-end voice signal is greater than the first preset signal intensity and the signal intensity of the near-end voice signal is greater than the second preset signal intensity, executing the step of performing echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence frequency, otherwise, sending the collected near-end voice signal to the far-end equipment.
When the signal strength of the far-end voice signal is judged, the following steps can be carried out:
after windowing the far-end voice signal, carrying out Fourier transform to obtain a frequency domain power spectrum of the far-end voice signal, and dividing the frequency domain power spectrum into a plurality of sub-frequency bands;
and when the power spectrums of the sub-frequency bands with preset number are larger than a preset threshold value, judging that the signal intensity of the far-end voice signal is larger than a first preset signal intensity, otherwise, judging that the signal intensity of the far-end voice signal is smaller than the first preset signal intensity.
Windowing is carried out on a far-end voice signal, such as Hanning window, then Fourier transformation is carried out, the far-end voice signal is converted from a time domain to a frequency domain, so as to obtain a frequency domain power spectrum of the far-end voice signal, the frequency domain power spectrum is divided into a plurality of sub-bands, preferably, in the embodiment, the frequency domain power spectrum is divided into 32 sub-bands, wherein the number of the sub-bands can be set according to the requirements of a user, and if the sub-bands are divided into 32 sub-bands, the power spectrum value of each sub-band can be represented by one bit, and 32 bits are needed in total, the frequency spectrum value of the voice signal can be represented by one 32-bit data type. And comparing the power spectrum of each sub-frequency band with a preset threshold value, wherein the preset threshold value and the preset number can be set by a user, preferably 10-100db, when the power spectrum of the sub-frequency bands with the preset number is greater than the preset threshold value, the signal intensity of the far-end voice signal is judged to be greater than the first preset signal intensity, otherwise, the signal intensity of the far-end voice signal is judged to be less than the first preset signal intensity.
The determination of the signal strength of the near-end speech signal can be performed in the same manner as the above steps, and is not described herein again.
In the echo cancellation method for voice communication provided in this embodiment, before performing echo cancellation, the signal strength of a near-end voice signal of a far-end voice signal is determined, when the signal strengths of the far-end voice signal and the near-end voice signal are both relatively high, echo cancellation processing is performed on the near-end signal, if the signal strength of one party is relatively low (please confirm whether echo cancellation is needed when the near-end voice signal is relatively low and the far-end voice signal is relatively high), the influence of echo on the call quality is relatively low, and echo cancellation may not be performed, so as to save resources.
The invention also provides an echo cancellation device for voice communication.
Referring to fig. 3, a functional block diagram of an echo cancellation device for voice communication according to a first embodiment of the present invention is shown.
In this embodiment, the echo cancellation device for voice communication includes:
the voice playing module 10 is configured to play a received far-end voice signal when receiving the far-end voice signal transmitted by a far-end device;
the frequency point acquisition module 20 is configured to acquire a frequency point with the largest occurrence frequency in a far-end voice signal when the far-end voice signal transmitted by a far-end device is received;
the near-end device and the far-end device in this embodiment may be terminals capable of performing real-time voice communication, such as terminals of a mobile phone, a tablet computer, and the like, and the terminals may include speakers for playing voice signals; the terminal may include a microphone for detecting a sound signal, wherein the sound signal includes a voice signal played by the speaker. It should be noted that the near-end device, the far-end device, the near-end voice signal, and the far-end voice signal described below are only relative and not absolute, for example, when the user a uses a mobile phone to perform a voice call with the user B, the mobile phone used by the user B is the near-end device, the mobile phone used by the user a is the far-end device, and the mobile phone used by the user a is the near-end device, and the mobile phone used by the user B is the far-end device.
In the process of performing a voice call with a far-end device, when the near-end device receives a far-end voice signal transmitted by the far-end device, the voice playing module 10 plays the received far-end voice signal, and meanwhile, the frequency point obtaining module 20 analyzes the far-end voice signal to obtain a frequency point with the largest occurrence frequency in the far-end voice signal, that is, a dominant frequency of a voice in the far-end voice signal, which is used as a reference frequency for performing echo cancellation subsequently.
Further, in order to accurately acquire the frequency point with the largest frequency appearing in the far-end voice signal, referring to fig. 4, the frequency point acquiring module 20 may include the following refining units:
the signal filtering unit 21 is configured to perform band-pass filtering processing on the far-end voice signal according to a preset cut-off frequency interval to obtain a human voice signal, where the preset cut-off frequency interval is a human voice frequency range;
and the frequency point counting unit 22 is configured to count the frequency point with the largest occurrence frequency in the human voice signal.
In an embodiment, the signal filtering unit 21 may perform band-pass filtering processing on the far-end voice signal through a band-pass filter to filter noise except for voice in the signal, so as to obtain a voice signal, so as to obtain more accurate frequency point information, and the preset cut-off frequency interval of the band-pass filter may be a voice frequency range, that is, a voice frequency range that a person can send out, or a general voice frequency range when the person speaks, for example, may be 50-5000Hz, or 500-5000Hz, and the like. And after the voice signals are obtained, counting the frequency points with the largest occurrence frequency in the voice signals.
Further, the preset cut-off frequency interval may be a cut-off frequency interval set in real time after being analyzed by the voice of the remote user.
The signal acquisition module 30 is used for acquiring near-end sound to form a near-end voice signal;
the echo cancellation module 40 is configured to perform echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence frequency;
a signal sending module 50, configured to send the near-end speech signal after echo cancellation to the far-end device.
While the near-end device plays the far-end voice signal, the signal acquisition module 30 thereof also acquires near-end sound to form a near-end voice signal, wherein the sound played in the near-end device speaker may be acquired.
The echo cancellation module 40 performs echo cancellation on the near-end voice signal, and cancels a signal corresponding to the frequency point with the largest occurrence frequency in the near-end voice signal, for example, a signal corresponding to the frequency point with the largest occurrence frequency in the far-end voice signal in the near-end voice signal may be cancelled by a band-pass filter to perform echo cancellation. Or carrying out echo cancellation on the near-end voice signal according to the acquired frequency point, the far-end voice signal and the echo cancellation algorithm.
Since the near-end device does not collect the far-end voice signal played by its speaker during each voice call, further, the echo cancellation device for voice communication further includes the following modules:
the judging module is used for judging whether the near-end sound collected by the near-end equipment contains sound generated by playing the far-end voice signal;
the echo cancellation module 40 is further configured to perform echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence number when the near-end sound collected by the near-end device includes sound generated by playing the far-end voice signal;
the signal sending module 50 is further configured to send the collected near-end voice signal to the far-end device when the near-end sound collected by the near-end device does not include sound generated by playing the far-end voice signal.
Before performing echo cancellation, the determining module first determines whether there is sound generated by a far-end speech signal played by a near-end device in sound collected by the near-end device, for example, compares the collected near-end speech signal with a spectrogram of the far-end speech signal to determine, if yes, the echo cancellation module 40 performs echo cancellation, and if not, the signal sending module 50 directly sends the collected near-end speech signal to the far-end device.
Furthermore, an echo cancellation mode can be set for the device, when the mode is turned on by the user, the process of echo cancellation is performed on the collected near-end voice signal, and when the echo cancellation is not needed, the mode is turned off.
In the echo cancellation device for voice communication provided in this embodiment, when a near-end device receives a far-end voice signal transmitted by a far-end device, the far-end voice signal is played, and a frequency point with the largest occurrence frequency in the far-end voice signal is obtained, while the near-end device plays the far-end voice signal, a microphone thereof collects near-end sound to form a near-end voice signal, then echo cancellation is performed on the near-end voice signal according to the frequency point with the largest occurrence frequency, and the near-end voice signal after echo cancellation is sent to the far-end device, because the collected near-end sound may include sound generated when a near-end device speaker plays the far-end voice signal, the invention performs echo cancellation processing on the near-end voice signal to remove sound generated when the near-end device speaker plays the far-end voice signal, so as to avoid that the near-end device collects the played far-end voice signal and then sends the far-end signal to the, echo is formed at the far-end device, improving voice quality in voice communications.
Referring to fig. 5, a first embodiment of an echo cancellation device for voice communication according to the present invention is a second embodiment of an echo cancellation device for voice communication according to the present invention. In this embodiment, the apparatus is different from the first embodiment in that the echo cancellation apparatus for voice communication further includes the following modules:
a signal determining module 60, configured to determine whether the signal strength of the far-end voice signal is greater than a first preset signal strength, and whether the signal strength of the near-end voice signal is greater than a second preset signal strength;
the echo cancellation module 40 is further configured to perform echo cancellation on the near-end voice signal according to the obtained frequency point with the largest occurrence number when the signal intensity of the far-end voice signal is greater than the first preset signal intensity and the signal intensity of the near-end voice signal is greater than the second preset signal intensity;
the signal sending module 50 is further configured to send the collected near-end voice signal to the far-end device when the signal strength of the far-end voice signal is less than or equal to the first preset signal strength or the signal strength of the near-end voice signal is less than or equal to the second preset signal strength.
In one embodiment, the signal determining module 60 may include the following units:
the signal processing unit is used for performing windowing processing on the far-end voice signal, performing Fourier transform to obtain a frequency domain power spectrum of the far-end voice signal, and dividing the frequency domain power spectrum into a plurality of sub-frequency bands;
and the signal judging unit is used for judging that the signal intensity of the far-end voice signal is greater than a first preset signal intensity when the power spectrums of the sub-frequency bands with preset number are greater than a preset threshold value, and otherwise, judging that the signal intensity of the far-end voice signal is less than the first preset signal intensity.
The signal processing unit performs windowing processing, such as hanning window, on the far-end speech signal, and then performs fourier transform to convert the far-end speech signal from time domain to frequency domain, so as to obtain a frequency domain power spectrum of the far-end speech signal, and divides the frequency domain power spectrum into a plurality of sub-bands, preferably, in this embodiment, the frequency domain power spectrum is divided into 32 sub-bands, wherein the number of sub-bands can be set according to the requirements of a user, and if the sub-bands are divided into 32 sub-bands, the power spectrum value of each sub-band can be represented by one bit, and 32 bits are required in total, the frequency spectrum value of the speech signal can be represented by one 32-bit data type. The signal judging unit compares the power spectrum of each sub-band with a preset threshold, wherein the preset threshold and the preset number can be set by a user, preferably 10-100db, when the power spectrum of the sub-bands with the preset number is greater than the preset threshold, the signal strength of the far-end voice signal is judged to be greater than the first preset signal strength, otherwise, the signal strength of the far-end voice signal is judged to be less than the first preset signal strength.
The determination of the signal strength of the near-end speech signal can be performed in the same manner as the above process, and is not described herein again.
The echo cancellation device for voice communication provided in this embodiment determines the signal strength of a near-end voice signal of a far-end voice signal before performing echo cancellation, performs echo cancellation processing on the near-end signal when the signal strength of both the far-end voice signal and the near-end voice signal is relatively high, and if the signal strength of one of the far-end voice signal and the near-end voice signal is relatively low, the influence of echo on the call quality is relatively small, and echo cancellation may not be performed, so as to save resources.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A method for echo cancellation in voice communication, the method comprising:
when a near-end device receives a far-end voice signal transmitted by a far-end device, playing the received far-end voice signal, and acquiring a frequency point with the largest occurrence frequency in the far-end voice signal, wherein the frequency point is the main frequency of voice in the far-end voice signal;
the near-end equipment collects near-end sound to form a near-end voice signal;
and performing echo cancellation on signals corresponding to the frequency points in the near-end voice signals, and sending the near-end voice signals subjected to echo cancellation to the far-end equipment.
2. The method according to claim 1, wherein the step of obtaining the frequency point with the largest frequency occurrence in the far-end speech signal comprises:
performing band-pass filtering processing on the far-end voice signal according to a preset cut-off frequency interval to obtain a human voice signal, wherein the preset cut-off frequency interval is a human voice frequency range;
and counting the frequency points with the most occurrence times in the voice signals.
3. The echo cancellation method for voice communication according to claim 1 or 2, wherein before the step of performing echo cancellation on the signal corresponding to the frequency point in the near-end voice signal, the echo cancellation method for voice communication further comprises the steps of:
judging whether the near-end sound collected by the near-end equipment contains sound generated by playing the far-end voice signal;
when the near-end sound collected by the near-end equipment contains sound generated by playing the far-end voice signal, executing a step of performing echo cancellation on the signal corresponding to the frequency point in the near-end voice signal;
and when the near-end sound collected by the near-end equipment does not contain the sound generated by playing the far-end voice signal, sending the collected near-end voice signal to the far-end equipment.
4. The echo cancellation method for voice communication according to claim 1, wherein before the step of performing echo cancellation on the signals corresponding to the frequency points in the near-end voice signal, the echo cancellation method for voice communication further comprises the steps of:
judging whether the signal intensity of the far-end voice signal is greater than a first preset signal intensity or not and whether the signal intensity of the near-end voice signal is greater than a second preset signal intensity or not;
and when the signal intensity of the far-end voice signal is greater than the first preset signal intensity and the signal intensity of the near-end voice signal is greater than the second preset signal intensity, executing the step of performing echo cancellation on the signal corresponding to the frequency point in the near-end voice signal, otherwise, sending the collected near-end voice signal to the far-end equipment.
5. The method of claim 4, wherein the step of determining whether the signal strength of the far-end speech signal is greater than a first predetermined signal strength comprises:
after windowing the far-end voice signal, carrying out Fourier transform to obtain a frequency domain power spectrum of the far-end voice signal, and dividing the frequency domain power spectrum into a plurality of sub-frequency bands;
and when the power spectrums of the sub-frequency bands with preset number are larger than a preset threshold value, judging that the signal intensity of the far-end voice signal is larger than a first preset signal intensity, otherwise, judging that the signal intensity of the far-end voice signal is smaller than the first preset signal intensity.
6. An echo cancellation device for voice communication, comprising:
the voice playing module is used for playing the received far-end voice signal when receiving the far-end voice signal transmitted by the far-end equipment;
the device comprises a frequency point acquisition module, a frequency point acquisition module and a frequency point processing module, wherein the frequency point acquisition module is used for acquiring a frequency point with the largest occurrence frequency in a far-end voice signal when the far-end voice signal transmitted by far-end equipment is received, and the frequency point is the main frequency of voice in the far-end voice signal;
the signal acquisition module is used for acquiring near-end sound to form a near-end voice signal;
the echo cancellation module is used for performing echo cancellation on the signals corresponding to the frequency points in the near-end voice signals;
and the signal sending module is used for sending the near-end voice signal subjected to echo cancellation to the far-end equipment.
7. The apparatus for echo cancellation in voice communication according to claim 6, wherein the frequency point obtaining module comprises:
the signal filtering unit is used for carrying out band-pass filtering processing on the far-end voice signal according to a preset cut-off frequency interval to obtain a human voice signal, wherein the preset cut-off frequency interval is a human voice frequency range;
and the frequency point counting unit is used for counting the frequency points with the largest occurrence frequency in the voice signals.
8. The apparatus according to claim 6 or 7, wherein the apparatus further comprises:
the judging module is used for judging whether the near-end sound collected by the near-end equipment contains sound generated by playing the far-end voice signal;
the echo cancellation module is further configured to perform echo cancellation on a signal corresponding to the frequency point in the near-end voice signal when the near-end sound acquired by the near-end device includes sound generated by playing the far-end voice signal;
the signal sending module is further configured to send the collected near-end voice signal to the far-end device when the near-end sound collected by the near-end device does not contain sound generated by playing the far-end voice signal.
9. The apparatus for echo cancellation for voice communication according to claim 6, further comprising:
the signal judgment module is used for judging whether the signal intensity of the far-end voice signal is greater than a first preset signal intensity or not and whether the signal intensity of the near-end voice signal is greater than a second preset signal intensity or not;
the echo cancellation module is further configured to perform echo cancellation on a signal corresponding to the frequency point in the near-end voice signal when the signal strength of the far-end voice signal is greater than the first preset signal strength and the signal strength of the near-end voice signal is greater than the second preset signal strength;
the signal sending module is further configured to send the collected near-end voice signal to the far-end device when the signal strength of the far-end voice signal is less than or equal to the first preset signal strength or the signal strength of the near-end voice signal is less than or equal to the second preset signal strength.
10. The apparatus for echo cancellation in voice communication according to claim 9, wherein the signal determining module comprises:
the signal processing unit is used for performing windowing processing on the far-end voice signal, performing Fourier transform to obtain a frequency domain power spectrum of the far-end voice signal, and dividing the frequency domain power spectrum into a plurality of sub-frequency bands;
and the signal judging unit is used for judging that the signal intensity of the far-end voice signal is greater than a first preset signal intensity when the power spectrums of the sub-frequency bands with preset number are greater than a preset threshold value, and otherwise, judging that the signal intensity of the far-end voice signal is less than the first preset signal intensity.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610109677.8A CN105657110B (en) | 2016-02-26 | 2016-02-26 | Echo cancellation method and device for voice communication |
PCT/CN2016/084688 WO2017143690A1 (en) | 2016-02-26 | 2016-06-03 | Echo cancellation method and device for use in voice communication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610109677.8A CN105657110B (en) | 2016-02-26 | 2016-02-26 | Echo cancellation method and device for voice communication |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105657110A CN105657110A (en) | 2016-06-08 |
CN105657110B true CN105657110B (en) | 2020-02-14 |
Family
ID=56491877
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610109677.8A Active CN105657110B (en) | 2016-02-26 | 2016-02-26 | Echo cancellation method and device for voice communication |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105657110B (en) |
WO (1) | WO2017143690A1 (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105957520B (en) * | 2016-07-04 | 2019-10-11 | 北京邮电大学 | A Speech State Detection Method Applicable to Echo Cancellation System |
CN109637552A (en) * | 2018-11-29 | 2019-04-16 | 河北远东通信系统工程有限公司 | A kind of method of speech processing for inhibiting audio frequency apparatus to utter long and high-pitched sounds |
CN112491443B (en) * | 2019-09-11 | 2022-10-28 | 瑞昱半导体股份有限公司 | Electronic system with echo cancellation power-saving mechanism and related echo cancellation method |
CN111524532B (en) * | 2020-04-29 | 2022-12-13 | 展讯通信(上海)有限公司 | Echo suppression method, device, equipment and storage medium |
CN112201268B (en) * | 2020-09-09 | 2024-07-09 | 北京小米松果电子有限公司 | Echo cancellation method, echo cancellation device and storage medium |
CN114639389B (en) * | 2020-12-15 | 2024-06-25 | 中国电信股份有限公司 | Method, equipment and system for eliminating echo of voice communication |
CN113689872A (en) * | 2021-08-16 | 2021-11-23 | 广州朗国电子科技股份有限公司 | Acoustic echo cancellation device |
CN113838473B (en) * | 2021-09-26 | 2024-07-05 | 科大讯飞股份有限公司 | Voice processing method and device of equipment and equipment |
CN115579016B (en) * | 2022-12-07 | 2023-03-21 | 成都海普迪科技有限公司 | Method and system for eliminating acoustic echo |
CN117238312B (en) * | 2023-08-28 | 2024-05-03 | 深蓝感知(杭州)物联科技有限公司 | Law enforcement recorder background sound amplification method and system |
CN118366488B (en) * | 2024-06-14 | 2024-09-13 | 宁波菊风系统软件有限公司 | Recording system and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07297887A (en) * | 1994-04-25 | 1995-11-10 | Fujitsu Ltd | Mobile communication terminal |
CN1719516A (en) * | 2005-07-15 | 2006-01-11 | 北京中星微电子有限公司 | Adaptive filter device and adaptive filtering method |
CN102196109A (en) * | 2010-03-01 | 2011-09-21 | 联芯科技有限公司 | Residual echo detection method and system |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101346895B (en) * | 2005-10-26 | 2012-02-22 | 日本电气株式会社 | Echo suppressing method and device |
JP4702372B2 (en) * | 2005-10-26 | 2011-06-15 | 日本電気株式会社 | Echo suppression method and apparatus |
CN102118530B (en) * | 2010-01-06 | 2013-08-14 | 杭州华三通信技术有限公司 | Method and device for echo cancellation |
CN102316200A (en) * | 2010-07-07 | 2012-01-11 | 英业达股份有限公司 | Handheld electronic device bell adjustment method and handheld electronic device using the same |
CN104519212B (en) * | 2013-09-27 | 2017-06-20 | 华为技术有限公司 | A kind of method and device for eliminating echo |
CN103491488A (en) * | 2013-09-30 | 2014-01-01 | 天脉聚源(北京)传媒科技有限公司 | Echo cancellation method and device for microphone |
CN105187594B (en) * | 2015-07-28 | 2018-09-04 | 小米科技有限责任公司 | A kind of method and apparatus for eliminating echo |
-
2016
- 2016-02-26 CN CN201610109677.8A patent/CN105657110B/en active Active
- 2016-06-03 WO PCT/CN2016/084688 patent/WO2017143690A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07297887A (en) * | 1994-04-25 | 1995-11-10 | Fujitsu Ltd | Mobile communication terminal |
CN1719516A (en) * | 2005-07-15 | 2006-01-11 | 北京中星微电子有限公司 | Adaptive filter device and adaptive filtering method |
CN102196109A (en) * | 2010-03-01 | 2011-09-21 | 联芯科技有限公司 | Residual echo detection method and system |
Also Published As
Publication number | Publication date |
---|---|
CN105657110A (en) | 2016-06-08 |
WO2017143690A1 (en) | 2017-08-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105657110B (en) | Echo cancellation method and device for voice communication | |
US10186276B2 (en) | Adaptive noise suppression for super wideband music | |
US8972251B2 (en) | Generating a masking signal on an electronic device | |
CN105979197B (en) | Teleconference control method and device based on sound automatic identification of uttering long and high-pitched sounds | |
US9343056B1 (en) | Wind noise detection and suppression | |
US20180350381A1 (en) | System and method of noise reduction for a mobile device | |
CN107360530B (en) | Echo cancellation testing method and device | |
WO2016078369A1 (en) | Mobile terminal conversation voice noise reduction method and apparatus and storage medium | |
US9491545B2 (en) | Methods and devices for reverberation suppression | |
US11380312B1 (en) | Residual echo suppression for keyword detection | |
EP3005362B1 (en) | Apparatus and method for improving a perception of a sound signal | |
US7519347B2 (en) | Method and device for noise detection | |
CN111667844A (en) | Microphone array-based low-operand speech enhancement device | |
WO2015058484A1 (en) | Noise reducing earphone and noise reducing method thereof | |
US20120197635A1 (en) | Method for generating an audio signal | |
CN111063363A (en) | Voice acquisition method, audio equipment and device with storage function | |
CN103514876A (en) | Method and device for eliminating noise and mobile terminal | |
CN106534461B (en) | The noise reduction system and its noise-reduction method of earphone | |
CN103093758A (en) | Electronic device and method for receiving voice signal thereof | |
CN103002094B (en) | Method and device for suppressing environmental noise | |
US20200099793A1 (en) | Receive-path signal gain operations | |
CN114093380B (en) | Voice enhancement method, electronic equipment, chip system and readable storage medium | |
CN108564961A (en) | A kind of voice de-noising method of mobile communication equipment | |
CN107819964B (en) | Method, device, terminal and computer readable storage medium for improving call quality | |
RU2771296C2 (en) | Sound processing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |