CN105187594B - A kind of method and apparatus for eliminating echo - Google Patents

A kind of method and apparatus for eliminating echo Download PDF

Info

Publication number
CN105187594B
CN105187594B CN201510450913.8A CN201510450913A CN105187594B CN 105187594 B CN105187594 B CN 105187594B CN 201510450913 A CN201510450913 A CN 201510450913A CN 105187594 B CN105187594 B CN 105187594B
Authority
CN
China
Prior art keywords
voice signal
parameter value
frequency point
echo
preset
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
Application number
CN201510450913.8A
Other languages
Chinese (zh)
Other versions
CN105187594A (en
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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510450913.8A priority Critical patent/CN105187594B/en
Publication of CN105187594A publication Critical patent/CN105187594A/en
Application granted granted Critical
Publication of CN105187594B publication Critical patent/CN105187594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephone Function (AREA)
  • Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)

Abstract

The present invention relates to a kind of method and apparatus for eliminating echo, belong to field of computer technology.The method includes:Preset first voice signal is played by local loud speaker, and determines the frequency response of each Frequency point in the first voice signal that local microphone detects;The frequency response of each Frequency point, determines corresponding parameter value to be used in the first voice signal detected according to the correspondence and the local microphone of the frequency response of pre-stored each Frequency point and the parameter value of echo cancellation parameters;During locally carrying out voice communication, according to the parameter value to be used and preset echo cancellation algorithm, to the voice communication during the voice signal that detects of local microphone carry out echo cancellation process.Using the present invention, the quality of call can be improved.

Description

A kind of method and apparatus for eliminating echo
Technical field
The present invention relates to field of computer technology, especially with respect to a kind of method and apparatus for eliminating echo.
Background technology
With the development of mobile terminal technology, the application of mobile terminal also comes more extensive, and function is also stronger and stronger.It is mobile Loud speaker and microphone are usually provided in terminal, wherein microphone is typically provided with sealing structure, to prevent the sound of loud speaker Sound is passed in microphone and echogenicity.
In practice, due to production assembly is bad etc., it may appear that the sealing structure of the microphone of mobile terminal it is close The poor situation of envelope property, the sound that loud speaker plays can be passed in microphone, in this way, user uses the mobile terminal and other use When family is conversed, other side can hear the echo of himself.Therefore, echo cancellor calculation can be arranged in technical staff in the terminal Method, to eliminate the echo during passing through.When eliminating echo, if the dynamics for eliminating echo is excessive, other side can be not only eliminated Echo, the call sound of script can also be eliminated, so, microphone when technical staff would generally dispatch from the factory according to mobile terminal The sealing situation of sealing structure, the echo cancellor formula in echo cancellation algorithm is arranged, reasonably to eliminate echo.
In the implementation of the present invention, inventor has found to have at least the following problems:
User is during using mobile terminal, it may appear that the case where mobile terminal is dropped can lead to microphone in this way Sealing structure destroyed, the echo generated in mobile terminal also will increase, in this way, pre-set echo cancellation algorithm will Echo can not be eliminated, speech quality can be caused poor in this way.
Invention content
In order to overcome the problems, such as present in the relevant technologies, the present invention provides a kind of method and apparatus for eliminating echo.Institute It is as follows to state technical solution:
According to a first aspect of the embodiments of the present invention, a kind of method for eliminating echo is provided, the method includes:
Preset first voice signal is played by local loud speaker, and determines the first voice that local microphone detects The frequency response of each Frequency point in signal;
According to the correspondence of the frequency response of pre-stored each Frequency point and the parameter value of echo cancellation parameters, and The frequency response of each Frequency point, determines corresponding parameter value to be used in the first voice signal that the local microphone detects;
During locally carrying out voice communication, according to the parameter value to be used and preset echo cancellation algorithm, The voice signal that local microphone detects during to the voice communication carries out echo cancellation process.
Optionally, the frequency response according to pre-stored each Frequency point is corresponding with the parameter value of echo cancellation parameters The frequency response of each Frequency point in the first voice signal that relationship and the local microphone detect determines and corresponding waits making With parameter value, including:
It is closed according to the default Hz-KHz of pre-stored each Frequency point is corresponding with the parameter value of echo cancellation parameters Default frequency response model in the first voice signal that system and the local microphone detect belonging to the frequency response of each Frequency point It encloses, determines corresponding parameter value to be used.
Optionally, the frequency response according to pre-stored each Frequency point is corresponding with the parameter value of echo cancellation parameters The frequency response of each Frequency point in the first voice signal that relationship and the local microphone detect determines and corresponding waits making With parameter value, including:
Determine the frequency response of each Frequency point and respective frequencies point in the first voice signal that the local microphone detects Preset reference frequency response difference, and determine the maximum difference in the difference;
According to the correspondence of pre-stored maximum difference and the parameter value of echo cancellation parameters, and determine most Big difference determines corresponding parameter value to be used.
Optionally, the method further includes:
Preset second voice signal is played by local loud speaker, obtains the second voice letter that local microphone detects The signal strength values of target frequency point in number, if the signal strength values of target frequency point are less than preset signal strength threshold Value increases local Mike then according to the difference of the preset signal strength threshold value and the signal strength values of the target frequency point The gain of wind.
Optionally, described that preset first voice signal is played by local loud speaker, and determine local microphone detection To the first voice signal in each Frequency point frequency response, including:
When detect the variation of acceleration of itself meet it is preset drop condition when, show echo cancellor option;
When detecting the echo cancellor instruction triggered by the echo cancellor option, played by local loud speaker pre- If the first voice signal, and determine the frequency response of each Frequency point in the first voice signal for detecting of local microphone.
According to a second aspect of the embodiments of the present invention, a kind of device for eliminating echo is provided, described device includes:
First determining module for playing preset first voice signal by local loud speaker, and determines local Mike The frequency response of each Frequency point in the first voice signal that wind detects;
Second determining module is used for the parameter value of the frequency response and echo cancellation parameters according to pre-stored each Frequency point Correspondence and the first voice signal for detecting of the local microphone in each Frequency point frequency response, determine and correspond to Parameter value to be used;
Processing module, for during locally carrying out voice communication, according to the parameter value to be used and preset Echo cancellation algorithm, to the voice communication during the voice signal that detects of local microphone carry out at echo cancellor Reason.
Optionally, second determining module, is used for:
It is closed according to the default Hz-KHz of pre-stored each Frequency point is corresponding with the parameter value of echo cancellation parameters Default frequency response model in the first voice signal that system and the local microphone detect belonging to the frequency response of each Frequency point It encloses, determines corresponding parameter value to be used.
Optionally, second determining module, including:
First determination sub-module, for determining each Frequency point in the first voice signal that the local microphone detects Frequency response and respective frequencies point preset reference frequency response difference, and determine the maximum difference in the difference;
Second determination sub-module, for corresponding with the parameter value of echo cancellation parameters according to pre-stored maximum difference Relationship, and the maximum difference determined, determine corresponding parameter value to be used.
Optionally, described device further includes increasing module, is used for:
Preset second voice signal is played by local loud speaker, obtains the second voice letter that local microphone detects The signal strength values of target frequency point in number, if the signal strength values of target frequency point are less than preset signal strength threshold Value increases local Mike then according to the difference of the preset signal strength threshold value and the signal strength values of the target frequency point The gain of wind.
Optionally, first determining module, including:
Display sub-module, for when detect the variation of acceleration of itself meet it is preset drop condition when, show back Sound eliminates option;
Third determination sub-module, for when detecting the echo cancellor triggered by the echo cancellor option instruction, Preset first voice signal is played by local loud speaker, and is determined every in the first voice signal that local microphone detects The frequency response of a Frequency point.
According to a third aspect of the embodiments of the present invention, a kind of device for eliminating echo is provided, including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Preset first voice signal is played by local loud speaker, and determines the first voice that local microphone detects The frequency response of each Frequency point in signal;
According to the correspondence of the frequency response of pre-stored each Frequency point and the parameter value of echo cancellation parameters, Yi Jisuo The frequency response for stating each Frequency point in the first voice signal that local microphone detects, determines corresponding parameter value to be used;
During locally carrying out voice communication, according to the parameter value to be used and preset echo cancellation algorithm, The voice signal that local microphone detects during to the voice communication carries out echo cancellation process.
The technical solution that the embodiment of the present invention provides can include the following benefits:
In the embodiment of the present invention, preset first voice signal is played by local loud speaker, and determine local microphone The frequency response of each Frequency point, disappears according to the frequency response of pre-stored each Frequency point with echo in the first voice signal detected The frequency of each Frequency point in the first voice signal detected except the correspondence and local microphone of the parameter value of parameter It rings, determines corresponding parameter value to be used, during locally carrying out voice communication, according to parameter value to be used and preset Echo cancellation algorithm, to voice communication during the voice signal that detects of local microphone carry out echo cancellation process, this Sample, terminal are dropped, and after causing the sealing structure of microphone to be destroyed, the echo generated in terminal will increase, and terminal can With the first voice signal detected according to local microphone, chooses suitable parameter value to be used and carries out echo cancellation process, The case where can not eliminating echo can be avoided the occurrence of, so as to improve speech quality.
It should be understood that above general description and following detailed description is only exemplary and explanatory, not It can the limitation present invention.
Description of the drawings
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the present invention Example, and be used to explain the principle of the present invention together with specification.In the accompanying drawings:
Fig. 1 is a kind of flow chart of the method for elimination echo shown according to an exemplary embodiment;
Fig. 2 is a kind of structural schematic diagram of terminal shown according to an exemplary embodiment;
Fig. 3 is a kind of schematic diagram of the device of elimination echo shown according to an exemplary embodiment;
Fig. 4 is a kind of schematic diagram of the device of elimination echo shown according to an exemplary embodiment;
Fig. 5 is a kind of schematic diagram of the device of elimination echo shown according to an exemplary embodiment;
Fig. 6 is a kind of schematic diagram of the device of elimination echo shown according to an exemplary embodiment;
Fig. 7 is a kind of structural schematic diagram of terminal shown according to an exemplary embodiment.
Through the above attached drawings, it has been shown that the specific embodiment of the present invention will be hereinafter described in more detail.These attached drawings It is not intended to limit the scope of the inventive concept in any manner with verbal description, but is by referring to specific embodiments Those skilled in the art illustrate idea of the invention.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent and the consistent all embodiments of the present invention.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects being described in detail in claims, of the invention.
An exemplary embodiment of the invention provides a kind of method for eliminating echo, as shown in Figure 1, the processing stream of this method Journey may include following step:
In a step 101, preset first voice signal is played by local loud speaker, and determines local microphone detection To the first voice signal in each Frequency point frequency response.
In a step 102, according to pair of the frequency response of pre-stored each Frequency point and the parameter value of echo cancellation parameters Should be related to and the first voice signal that local microphone detects in each Frequency point frequency response, determine corresponding to be used Parameter value.
In step 103, during locally carrying out voice communication, disappeared according to parameter value to be used and preset echo Except algorithm, to voice communication during the voice signal that detects of local microphone carry out echo cancellation process.
In the embodiment of the present invention, preset first voice signal is played by local loud speaker, and determine local microphone The frequency response of each Frequency point, disappears according to the frequency response of pre-stored each Frequency point with echo in the first voice signal detected The frequency of each Frequency point in the first voice signal detected except the correspondence and local microphone of the parameter value of parameter It rings, determines corresponding parameter value to be used, during locally carrying out voice communication, according to parameter value to be used and preset Echo cancellation algorithm, to voice communication during the voice signal that detects of local microphone carry out echo cancellation process, this Sample, terminal are dropped, and after causing the sealing structure of microphone to be destroyed, the echo generated in terminal will increase, and terminal can With the first voice signal detected according to local microphone, chooses suitable parameter value to be used and carries out echo cancellation process, The case where can not eliminating echo can be avoided the occurrence of, so as to improve speech quality.
Another exemplary embodiment of the present invention provides a kind of method for eliminating echo, and this method can be used in terminal, Wherein, terminal can be the terminal for having function of voice communication, such as mobile phone or tablet computer mobile terminal.The terminal can be with Including loud speaker, for the loud speaker for playing voice signal, the voice signal can be preset first voice signal;Institute It may include microphone to state terminal, and the microphone is used to detect the voice signal that the loud speaker plays, and can will detect The transmitting voice signal arrived is to processor;The terminal may include processor, and the processor is determined for local wheat The frequency response of each Frequency point in the first voice signal that gram wind detects, according to the frequency response of pre-stored each Frequency point with return Each Frequency point in the first voice signal that sound eliminates the correspondence of the parameter value of parameter and local microphone detects Frequency response determines corresponding parameter value to be used, and during locally carrying out voice communication, the processor can be according to waiting making With parameter value and preset echo cancellation algorithm, to voice communication during the voice signal that detects of local microphone carry out Echo cancellation process;The terminal may include input unit, and the input unit can be button, can be touch screen, use Family can open the application program with echo cancellation performance by input unit;The terminal may include display unit, institute It can be liquid crystal display to state display unit, and display unit can show echo cancellor option.In addition, the terminal can also wrap Include the portions such as memory, sensor, voicefrequency circuit, bluetooth, WiFi (Wirelessfidelity, adopting wireless fidelity technology) and power supply Part.
Below in conjunction with embodiment, process flow shown in FIG. 1 is described in detail, content can be as follows:
In a step 101, preset first voice signal is played by local loud speaker, and determines local microphone detection To the first voice signal in each Frequency point frequency response.
In force, user can install the application program that have the function of eliminating echo in terminal, as desired couple of user When terminal carries out elimination echo, user can click the icon of the application program, and terminal can then receive the corresponding application program Icon click commands, then can open the application program, show the homepage of the application program.User can be at this In the homepage of application program, echo cancellor option is clicked, terminal can then detect the click commands of corresponding echo cancellor option, It may then pass through local loud speaker and play preset first voice signal, the first voice signal can be swept-frequency signal, frequency sweep The frequency range of signal can be from low to high, if the frequency range of swept-frequency signal is 300~10K.Swept-frequency signal can be with For octave signal, said frequencies point can be the Frequency point in octave signal.
Wherein, octave can be that frequency doubles spectrum space occupied by frequency spectrum, for different initial frequency points Frequency multiplication occupied by spectrum space be different, such as initial frequency point is 100HZ, then an octave be exactly from 100HZ~200HZ, if starting dot frequency is 200HZ, an octave is exactly from 200HZ~400HZ, if starting point Frequency is 400HZ, then an octave is exactly from 400HZ~800HZ ....1/N octave signals are i.e. at one 12 frequency points are arranged in octave, between each between be divided into 1/12 octave, specific calculation can be as follows:
Such as:From 100HZ~200HZ, and frequency interval is 1/12 octave, if first Frequency point is 1/12= Lgx/lg2, lgx=0.3010 × 1/12=0.025, x=1.055, the corresponding frequency of first Frequency point are 100HZ*1.055 =105.5HZ.For second Frequency point 2/12=lgx/lg2, lgx=0.3010 × 2/12=0.0501, x=1.122, The corresponding frequency of two Frequency points is 100HZ*1.122=112.2HZ, and so on.
After terminal plays preset first voice signal by local loud speaker, local microphone can detect the first language Sound signal, local microphone can be by the first transmitting voice signals detected to the processor of terminal, and the processor of terminal is then It can determine the frequency response of each Frequency point in the first voice signal that local microphone detects.Wherein, frequency response is referred to as Frequency response, for indicate the first voice signal the Frequency point signal magnitude.
In addition, the application program can be when reaching predetermined period, the prompt message that elimination echo is pushed to user (such as exists PUSH message is shown in notification bar), it, can be by clicking prompt letter after user receives the prompt message of the elimination echo Breath, or the icon for the application program for eliminating echo is clicked, to open the application program for eliminating echo, then carry out elimination echo Operation.
Optionally, the trigger condition for eliminating echo can be set, correspondingly, the processing procedure of step 101 can be as follows:When It is preset when dropping condition to detect that the variation of the acceleration of itself meets, shows echo cancellor option;When detect by return When sound eliminates the echo cancellor instruction of option triggering, preset first voice signal is played by local loud speaker, and determine this The frequency response of each Frequency point in the first voice signal that ground microphone detects.
In force, the sensor for detecting self-acceleration can be provided in terminal, it is whole such as acceleration induction device The condition of dropping can also be pre-set in end, i.e. the acceleration of terminal is first acceleration of gravity, keeps the side of becoming after a period of time To acceleration straight up, then become 0 in preset duration.Terminal can detect the acceleration of itself in real time, work as detection To the acceleration of itself variation meet it is preset drop condition when, can be shown in the prompting frame with display the prompt box Echo cancellor option, i.e., after terminal is dropped, can show include echo cancellor option prompting frame, user sees that this is carried After showing frame, the echo cancellor option in the prompting frame can be clicked, terminal can then receive the click of corresponding echo cancellor option Instruction (i.e. echo cancellor instructs) may then pass through local loud speaker and play preset first voice signal, and determines local The frequency response of each Frequency point in the first voice signal that microphone detects.
In a step 102, according to pair of the frequency response of pre-stored each Frequency point and the parameter value of echo cancellation parameters Should be related to and the first voice signal that local microphone detects in each Frequency point frequency response, determine corresponding to be used Parameter value.
In force, echo cancellation algorithm can be previously stored in terminal, echo cancellation algorithm may be used existing Echo cancellation algorithm can include several echo cancellation parameters in echo cancellation algorithm, as linear echo eliminates filter Length, linear echo eliminate dynamics and nonlinear echo elimination dynamics etc..Terminal eliminates the dynamics and echo cancellation parameters of echo Parameter value it is related.For example, when the dynamics for eliminating echo is weaker, the length that linear echo eliminates filter is 5, and linear echo disappears Except dynamics is 10, it is 15 that nonlinear echo, which eliminates dynamics,;When the dynamics of elimination echo is stronger, linear echo eliminates the length of filter Degree is 10, and it is 15 that linear echo, which eliminates dynamics, and it is 20 that nonlinear echo, which eliminates dynamics,.Corresponding to a certain elimination echo dynamics Echo cancellation parameters parameter value, be properly termed as the set of parameter value of echo cancellation parameters, can be prestored in terminal more Kind eliminates the parameter value of the corresponding echo cancellation parameters of echo dynamics, i.e. storing multiple sets parameter value, to be suitable for local microphone Different sealing situations.
Terminal can judge the power for needing to eliminate echo according to the frequency response for detecting each Frequency point in the first voice signal Degree determines the parameter value to be used of echo cancellation parameters.It can be with the frequency response of storing frequencies point and echo cancellation parameters in terminal Parameter value correspondence, then can be according to the parameter of the frequency response and echo cancellation parameters of pre-stored each Frequency point The frequency response of each Frequency point, determines corresponding in the first voice signal that the correspondence and local microphone of value detect Parameter value to be used.Determine that the mode of parameter value to be used can be diversified, following present two kinds of feasible modes.
Mode one:According to the default Hz-KHz of pre-stored each Frequency point and the parameter value of echo cancellation parameters Default frequency response in the first voice signal that correspondence and local microphone detect belonging to the frequency response of each Frequency point Range determines corresponding parameter value to be used.
In force, if the sealing situation of local Mike is different, the first voice signal that local Mike detects Frequency response is also different.For example, when the sealing situation of local microphone is preferable, in the first voice signal that local Mike detects, The frequency response of Frequency point a is -40dB, and the frequency response of Frequency point b is -20dB, and the frequency response of Frequency point c is -45dB, when local microphone When sealing situation is poor, in the first voice signal that local Mike detects, the frequency response of Frequency point a is -45dB, Frequency point b's Frequency response is -27dB, and the frequency response of Frequency point c is -50dB.For arbitrary a set of parameter value, there can be its applicable echo cancellor model It encloses, i.e., each Frequency point, which corresponds to every suit parameter value, can be arranged corresponding Hz-KHz (i.e. default Hz-KHz).For example, right In first set parameter value, the default Hz-KHz of Frequency point a is -25dB~-35dB, the default Hz-KHz of Frequency point b is - The default Hz-KHz of 30dB~-40dB, Frequency point c are -55dB~-60dB;For second set of parameter value, Frequency point a's is pre- If Hz-KHz is -35dB~-45dB, the default Hz-KHz of Frequency point b is -40dB~-50dB, the default frequency of Frequency point c Ring ranging from -60dB~-70dB.
Terminal determines in the first voice signal that local microphone detects after the frequency response of each Frequency point, it can be determined that every Default Hz-KHz belonging to the frequency response of a Frequency point, and then can be according to the default frequency response model of pre-stored each Frequency point Enclose each frequency in the first voice signal detected with the correspondence of the parameter value of echo cancellation parameters and local microphone Default Hz-KHz belonging to the frequency response of rate point determines corresponding parameter value to be used.For example, terminal detects Frequency point a's Frequency response is -27dB, and the frequency response of Frequency point b is -32dB, and the frequency response of Frequency point c is -58dB, then can determine corresponding to be used Parameter value is first set parameter value.
In addition, in the first voice signal that local microphone detects, the default Hz-KHz belonging to the frequency response of Frequency point More set parameter values may be corresponded to, at this moment, terminal, which can determine, often covers the number that parameter value corresponds to Frequency point, by corresponding frequency That the largest number of set parameter value of rate point are as parameter value to be used.For example, terminal detect Frequency point a frequency response be- The frequency response of 27dB, Frequency point b are -45dB, and the frequency response of Frequency point c is -68dB, then can determine that corresponding parameter value to be used is Second set of parameter value.Terminal can also determine that often set parameter value corresponds to a of higher frequency point (Frequency point of such as 3K or more) Number, using that the largest number of set parameter value of corresponding higher frequency point as parameter value to be used.
Mode two:Determine the frequency response of each Frequency point and respective frequencies in the first voice signal that local microphone detects The difference of the preset reference frequency response of point, and determine the maximum difference in difference;Disappeared with echo according to pre-stored maximum difference Except the correspondence of the parameter value of parameter, and the maximum difference determined, determine corresponding parameter value to be used.
In force, the corresponding preset reference frequency response of each Frequency point can be pre-set in terminal, technical staff can be with Preset first voice signal is played by the local loud speaker of terminal when terminal is dispatched from the factory, terminal can then determine local Mike The frequency response of each Frequency point, terminal can carry out multiple frequency response detection process, will detect in the first voice signal that wind detects The average value of the frequency response of obtained each Frequency point is as the corresponding preset reference frequency response of each Frequency point.
Terminal determines in the first voice signal that local microphone detects after the frequency response of each Frequency point, can use each The corresponding preset reference frequency response of Frequency point subtracts the frequency response of each Frequency point, obtains frequency response and the respective frequencies point of each Frequency point Preset reference frequency response difference, then can determine the maximum difference in these differences.Maximum can be prestored in terminal The correspondence of the parameter value of difference and echo cancellation parameters can store the often corresponding difference range of set parameter value in terminal, And may determine that the difference range belonging to the maximum difference being calculated, it then can determine that the corresponding echo of the difference range disappears Except the parameter value of parameter, parameter value to be used is obtained.For example, the corresponding difference range of first set parameter value is 0dB~5dB, the The corresponding difference range of two sets of parameter values is 6dB~10dB, and it is 11dB~15dB that third, which covers the corresponding difference range of parameter value, eventually The maximum difference that end calculates is 7dB, then can determine that second set of parameter value is parameter value to be used.
In step 103, during locally carrying out voice communication, disappeared according to parameter value to be used and preset echo Except algorithm, to voice communication during the voice signal that detects of local microphone carry out echo cancellation process.
In force, user is during using terminal, it is possible that the case where mobile terminal is dropped, can lead in this way The sealing structure of microphone is caused to be destroyed, the voice signal that loud speaker plays can be then passed to from terminal inner in microphone, To echogenicity, as shown in Figure 2.Terminal can bring the parameter value to be used determined into preset echo cancellation algorithm In, during locally carrying out voice communication, terminal can be right according to parameter value to be used and preset echo cancellation algorithm The voice signal that local microphone detects during voice communication carries out echo cancellation process.
Optionally, terminal can be adjusted the signal strength of voice signal, and corresponding processing procedure can be as follows:It is logical It crosses local loud speaker and plays preset second voice signal, obtain target frequency in the second voice signal that local microphone detects The signal strength values of rate point, if the signal strength values of target frequency point are less than preset signal strength threshold value, according to default letter The difference of number intensity threshold and the signal strength values of target frequency point, increases the gain of local microphone.
In force, terminal can play preset second voice signal by local loud speaker, the second voice signal Can include target frequency point in Frequency point, target frequency point can be the Frequency point that frequency is 1K.Second voice signal can be with It is identical as the first voice, it can also be different from the first voice signal.Terminal plays preset second voice by local loud speaker After signal, the second voice signal that local microphone can then detect, terminal can obtain second that local microphone detects The signal strength values of target frequency point in voice signal, the signal strength values can be the level value of target frequency point.Terminal can To judge whether the signal strength values of the target frequency point detected are less than preset signal strength threshold value, if target frequency point Signal strength values are less than preset signal strength threshold value, then terminal can calculate the letter of preset signal strength threshold value and target frequency point The gain of local microphone, then can be increased the difference decibel by the difference of number intensity value.For example, predetermined level threshold value Current gain for -25dB, local microphone is 10dB, and the level value of target frequency point is -30dB, then can determine that difference is Then the Gain tuning of local microphone can be 15dB by 5dB.After terminal increases the gain of local microphone, it can pass through Local loud speaker plays preset first voice signal, and determines each frequency in the first voice signal that local microphone detects The frequency response of rate point, and then the parameter value to be used of each echo cancellation parameters can be determined by above-mentioned processing, locally carrying out language During sound communicates, to voice communication during the voice signal that detects of local microphone carry out echo cancellation process.
In the embodiment of the present invention, preset first voice signal is played by local loud speaker, and determine local microphone The frequency response of each Frequency point, disappears according to the frequency response of pre-stored each Frequency point with echo in the first voice signal detected The frequency of each Frequency point in the first voice signal detected except the correspondence and local microphone of the parameter value of parameter It rings, determines corresponding parameter value to be used, during locally carrying out voice communication, according to parameter value to be used and preset Echo cancellation algorithm, to voice communication during the voice signal that detects of local microphone carry out echo cancellation process, this Sample, terminal are dropped, and after causing the sealing structure of microphone to be destroyed, the echo generated in terminal will increase, and terminal can With the first voice signal detected according to local microphone, chooses suitable parameter value to be used and carries out echo cancellation process, The case where can not eliminating echo can be avoided the occurrence of, so as to improve speech quality.
Another exemplary embodiment of the present invention provides a kind of device for eliminating echo, as shown in figure 3, the device includes: First determining module 310, the second determining module 320 and processing module 330.
First determining module 310 for playing preset first voice signal by local loud speaker, and determines local wheat The frequency response of each Frequency point in the first voice signal that gram wind detects;
Second determining module 320 is used for the ginseng of the frequency response and echo cancellation parameters according to pre-stored each Frequency point The frequency response of each Frequency point in the first voice signal that the correspondence of numerical value and the local microphone detect determines Corresponding parameter value to be used;
Processing module 330, for during locally carrying out voice communication, according to the parameter value to be used and presetting Echo cancellation algorithm, to the voice communication during the voice signal that detects of local microphone carry out at echo cancellor Reason.
Optionally, second determining module 320, is used for:
It is closed according to the default Hz-KHz of pre-stored each Frequency point is corresponding with the parameter value of echo cancellation parameters Default frequency response model in the first voice signal that system and the local microphone detect belonging to the frequency response of each Frequency point It encloses, determines corresponding parameter value to be used.
Optionally, as shown in figure 4, second determining module 320, including:
First determination sub-module 321, for determining each frequency in the first voice signal that the local microphone detects The difference of the frequency response of rate point and the preset reference frequency response of respective frequencies point, and determine the maximum difference in the difference;
Second determination sub-module 322, for according to pre-stored maximum difference and the parameter value of echo cancellation parameters Correspondence, and the maximum difference determined, determine corresponding parameter value to be used.
Optionally, it as shown in figure 5, described device further includes increasing module 340, is used for:
Preset second voice signal is played by local loud speaker, obtains the second voice letter that local microphone detects The signal strength values of target frequency point in number, if the signal strength values of target frequency point are less than preset signal strength threshold Value increases local Mike then according to the difference of the preset signal strength threshold value and the signal strength values of the target frequency point The gain of wind.
Optionally, as shown in fig. 6, first determining module 310, including:
Display sub-module 311, for when detect the variation of acceleration of itself meet it is preset drop condition when, display Echo cancellor option;
Third determination sub-module 312, for working as the echo cancellor instruction for detecting and being triggered by the echo cancellor option When, preset first voice signal is played by local loud speaker, and determine the first voice signal that local microphone detects In each Frequency point frequency response.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
In the embodiment of the present invention, preset first voice signal is played by local loud speaker, and determine local microphone The frequency response of each Frequency point, disappears according to the frequency response of pre-stored each Frequency point with echo in the first voice signal detected The frequency of each Frequency point in the first voice signal detected except the correspondence and local microphone of the parameter value of parameter It rings, determines corresponding parameter value to be used, during locally carrying out voice communication, according to parameter value to be used and preset Echo cancellation algorithm, to voice communication during the voice signal that detects of local microphone carry out echo cancellation process, In this way, terminal is dropped, after causing the sealing structure of microphone to be destroyed, the echo generated in terminal will increase, terminal The first voice signal that can be detected according to local microphone is chosen suitable parameter value to be used and is carried out at echo cancellor Reason can avoid the occurrence of the case where can not eliminating echo, so as to improve speech quality.
It should be noted that:The device for the elimination echo that above-described embodiment provides is when eliminating echo, only with above-mentioned each work( Can module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different functions Module is completed, i.e., the internal structure of equipment is divided into different function modules, described above all or part of to complete Function.In addition, the device for the elimination echo that above-described embodiment provides belongs to same design with the embodiment of the method for eliminating echo, Specific implementation process refers to embodiment of the method, and which is not described herein again.
The another exemplary embodiment of the present invention provides a kind of structural schematic diagram of terminal.The terminal can be mobile phone or put down The mobile terminals such as plate computer can be used for executing the method in above-described embodiment.
With reference to Fig. 7, terminal 800 may include following one or more components:Processing component 802, memory 804, power supply Component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, and Communication component 816.
The integrated operation of 802 usual control terminal 800 of processing component, such as with display, call, data communication, phase Machine operates and record operates associated operation.Processing element 802 may include that one or more processors 820 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more modules, just Interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, it is more to facilitate Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in terminal 800.These data are shown Example includes instruction for any application program or method that are operated in terminal 800, contact data, and telephone book data disappears Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Electric power assembly 806 provides electric power for the various assemblies of terminal 800.Electric power assembly 806 may include power management system System, one or more power supplys and other generated with for audio output apparatus 800, management and the associated component of distribution electric power.
Multimedia component 808 is included in the screen of one output interface of offer between the terminal 800 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 808 includes a front camera and/or rear camera.When terminal 800 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike Wind (MIC), when audio output apparatus 800 is in operation mode, when such as call model, logging mode and speech recognition mode, wheat Gram wind is configured as receiving external audio signal.The received audio signal can be further stored in memory 804 or warp It is sent by communication component 816.
I/O interfaces 812 provide interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor module 814 includes one or more sensors, and the state for providing various aspects for terminal 800 is commented Estimate.For example, sensor module 814 can detect the state that opens/closes of terminal 800, and the relative positioning of component, for example, it is described Component is the display and keypad of terminal 800, and sensor module 814 can be with 800 1 components of detection terminal 800 or terminal Position change, the existence or non-existence that user contacts with terminal 800,800 orientation of terminal or acceleration/deceleration and terminal 800 Temperature change.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between terminal 800 and other equipment.Eventually End 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or combination thereof.In an exemplary reality It applies in example, communication component 816 receives broadcast singal or the related letter of broadcast from external broadcasting management system via broadcast channel Breath.In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, to promote short distance logical Letter.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) can be based in NFC module Technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, terminal 800 can be believed by one or more application application-specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, it includes the non-transitorycomputer readable storage medium instructed, example to additionally provide a kind of Such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 820 of terminal 800 to complete the above method.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
Those skilled in the art will readily occur to its of the present invention after considering specification and putting into practice disclosure disclosed herein Its embodiment.This application is intended to cover the present invention any variations, uses, or adaptations, these modifications, purposes or Person's adaptive change follows the general principle of the present invention and includes undocumented common knowledge in the art of the invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the invention is not limited in the precision architectures for being described above and being shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (7)

1. a kind of method for eliminating echo, which is characterized in that the method includes:
When detect the variation of acceleration of itself meet it is preset drop condition when, show echo cancellor option;
When detecting the echo cancellor instruction triggered by the echo cancellor option, played by local loud speaker preset First voice signal, and determine the frequency response of each Frequency point in the first voice signal for detecting of local microphone;
According to the correspondence of the frequency response of pre-stored each Frequency point and the parameter value of echo cancellation parameters and described The frequency response of each Frequency point, determines corresponding parameter value to be used in the first voice signal that ground microphone detects;
During locally carrying out voice communication, according to the parameter value to be used and preset echo cancellation algorithm, to institute It states the voice signal that local microphone during voice communication detects and carries out echo cancellation process;
Preset second voice signal is played by local loud speaker, is obtained in the second voice signal that local microphone detects The signal strength values of target frequency point, if the signal strength values of target frequency point are less than preset signal strength threshold value, According to the difference of the preset signal strength threshold value and the signal strength values of the target frequency point, increase the increasing of local microphone Benefit.
2. according to the method described in claim 1, it is characterized in that, the frequency response according to pre-stored each Frequency point with Each frequency in the first voice signal that the correspondence of the parameter value of echo cancellation parameters and the local microphone detect The frequency response of rate point determines corresponding parameter value to be used, including:
According to the correspondence of the default Hz-KHz of pre-stored each Frequency point and the parameter value of echo cancellation parameters, with And the default Hz-KHz in the first voice signal for detecting of the local microphone belonging to the frequency response of each Frequency point, it determines Corresponding parameter value to be used.
3. according to the method described in claim 1, it is characterized in that, the frequency response according to pre-stored each Frequency point with Each frequency in the first voice signal that the correspondence of the parameter value of echo cancellation parameters and the local microphone detect The frequency response of rate point determines corresponding parameter value to be used, including:
Determine the pre- of the frequency response of each Frequency point and respective frequencies point in the first voice signal that the local microphone detects If the difference of benchmark frequency response, and determine the maximum difference in the difference;
According to the correspondence of pre-stored maximum difference and the parameter value of echo cancellation parameters, and the maximum determined is poor Value, determines corresponding parameter value to be used.
4. a kind of device for eliminating echo, which is characterized in that described device includes:
First determining module, first determining module include:
Display sub-module, for when detect the variation of acceleration of itself meet it is preset drop condition when, display echo disappear Except option;
Third determination sub-module, for when detecting the echo cancellor instruction triggered by the echo cancellor option, passing through Local loud speaker plays preset first voice signal, and determines each frequency in the first voice signal that local microphone detects The frequency response of rate point;
Second determining module is used for pair of the parameter value of the frequency response and echo cancellation parameters according to pre-stored each Frequency point Should be related to and the first voice signal that the local microphone detects in each Frequency point frequency response, determine corresponding wait for Use parameter value;
Processing module is used for during locally carrying out voice communication, according to the parameter value to be used and preset echo Elimination algorithm, to the voice communication during the voice signal that detects of local microphone carry out echo cancellation process;
Described device further includes increasing module, is used for:
Preset second voice signal is played by local loud speaker, is obtained in the second voice signal that local microphone detects The signal strength values of target frequency point, if the signal strength values of target frequency point are less than preset signal strength threshold value, According to the difference of the preset signal strength threshold value and the signal strength values of the target frequency point, increase the increasing of local microphone Benefit.
5. device according to claim 4, which is characterized in that second determining module is used for:
According to the correspondence of the default Hz-KHz of pre-stored each Frequency point and the parameter value of echo cancellation parameters, with And the default Hz-KHz in the first voice signal for detecting of the local microphone belonging to the frequency response of each Frequency point, it determines Corresponding parameter value to be used.
6. device according to claim 4, which is characterized in that second determining module, including:
First determination sub-module, the frequency for determining each Frequency point in the first voice signal that the local microphone detects The difference with the preset reference frequency response of respective frequencies point is rung, and determines the maximum difference in the difference;
Second determination sub-module, for being closed according to pre-stored maximum difference is corresponding with the parameter value of echo cancellation parameters It is, and the maximum difference determined, determines corresponding parameter value to be used.
7. a kind of device for eliminating echo, which is characterized in that including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
When detect the variation of acceleration of itself meet it is preset drop condition when, show echo cancellor option;
When detecting the echo cancellor instruction triggered by the echo cancellor option, played by local loud speaker preset First voice signal, and determine the frequency response of each Frequency point in the first voice signal for detecting of local microphone;
According to the correspondence of the frequency response of pre-stored each Frequency point and the parameter value of echo cancellation parameters and described The frequency response of each Frequency point, determines corresponding parameter value to be used in the first voice signal that ground microphone detects;
During locally carrying out voice communication, according to the parameter value to be used and preset echo cancellation algorithm, to institute It states the voice signal that local microphone during voice communication detects and carries out echo cancellation process;
Preset second voice signal is played by local loud speaker, is obtained in the second voice signal that local microphone detects The signal strength values of target frequency point, if the signal strength values of target frequency point are less than preset signal strength threshold value, According to the difference of the preset signal strength threshold value and the signal strength values of the target frequency point, increase the increasing of local microphone Benefit.
CN201510450913.8A 2015-07-28 2015-07-28 A kind of method and apparatus for eliminating echo Active CN105187594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510450913.8A CN105187594B (en) 2015-07-28 2015-07-28 A kind of method and apparatus for eliminating echo

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510450913.8A CN105187594B (en) 2015-07-28 2015-07-28 A kind of method and apparatus for eliminating echo

Publications (2)

Publication Number Publication Date
CN105187594A CN105187594A (en) 2015-12-23
CN105187594B true CN105187594B (en) 2018-09-04

Family

ID=54909432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510450913.8A Active CN105187594B (en) 2015-07-28 2015-07-28 A kind of method and apparatus for eliminating echo

Country Status (1)

Country Link
CN (1) CN105187594B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657110B (en) * 2016-02-26 2020-02-14 深圳Tcl数字技术有限公司 Echo cancellation method and device for voice communication
CN107452398B (en) * 2017-08-09 2021-03-16 深圳创维数字技术有限公司 Echo acquisition method, electronic device and computer readable storage medium
CN109068251A (en) * 2018-07-10 2018-12-21 深圳市亿鑫数字科技有限公司 A kind of automatic balancing method and system of intelligent hearing aid
CN110797048B (en) * 2018-08-01 2022-09-13 珠海格力电器股份有限公司 Method and device for acquiring voice information
WO2020097828A1 (en) * 2018-11-14 2020-05-22 深圳市欢太科技有限公司 Echo cancellation method, delay estimation method, echo cancellation apparatus, delay estimation apparatus, storage medium, and device
CN109360562B (en) * 2018-12-07 2022-06-28 深圳创维-Rgb电子有限公司 Echo cancellation method, device, medium, and voice wake-up method and device
CN109788399A (en) * 2019-01-30 2019-05-21 珠海迈科智能科技股份有限公司 A kind of echo cancel method and system of speaker
CN109979469B (en) * 2019-04-03 2021-04-23 北京小米智能科技有限公司 Signal processing method, apparatus and storage medium
CN110246515B (en) * 2019-07-19 2023-10-24 腾讯科技(深圳)有限公司 Echo cancellation method and device, storage medium and electronic device
CN111182435B (en) * 2020-01-13 2021-11-09 北京小米松果电子有限公司 Testing method and device of voice equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101313483A (en) * 2005-11-17 2008-11-26 微软公司 Configuration of echo cancellation
CN202602769U (en) * 2012-02-29 2012-12-12 青岛海信移动通信技术股份有限公司 Conversation type electronic product with echo inhibition function
CN103999478A (en) * 2011-12-16 2014-08-20 高通股份有限公司 Optimizing audio processing functions by dynamically compensating for variable distances between speaker(s) and microphone(s) in an accessory device
CN104519212A (en) * 2013-09-27 2015-04-15 华为技术有限公司 An echo cancellation method and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9100466B2 (en) * 2013-05-13 2015-08-04 Intel IP Corporation Method for processing an audio signal and audio receiving circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101313483A (en) * 2005-11-17 2008-11-26 微软公司 Configuration of echo cancellation
CN103999478A (en) * 2011-12-16 2014-08-20 高通股份有限公司 Optimizing audio processing functions by dynamically compensating for variable distances between speaker(s) and microphone(s) in an accessory device
CN202602769U (en) * 2012-02-29 2012-12-12 青岛海信移动通信技术股份有限公司 Conversation type electronic product with echo inhibition function
CN104519212A (en) * 2013-09-27 2015-04-15 华为技术有限公司 An echo cancellation method and apparatus

Also Published As

Publication number Publication date
CN105187594A (en) 2015-12-23

Similar Documents

Publication Publication Date Title
CN105187594B (en) A kind of method and apparatus for eliminating echo
EP3163748B1 (en) Method, device and terminal for adjusting volume
CN105117211B (en) The method and device of prompting message
US20170034336A1 (en) Event prompting method and device
US11743355B2 (en) Prompting method and device
CN104902059A (en) Call reminding method and device
CN106095401A (en) Informing message treatment method and device
CN104636110B (en) Control the method and device of volume
CN103024630A (en) Volume regulating method of first electronic equipment and first electronic equipment
CN108040171A (en) Voice operating method, apparatus and computer-readable recording medium
CN105281993B (en) Play the method and device of multimedia file
CN105451056B (en) Audio and video synchronization method and device
CN106453032B (en) Information-pushing method and device, system
CN105101013A (en) Method and device for playing voice signals
CN104702756A (en) Detecting method and detecting device for soundless call
CN104333641B (en) Call method and device
CN106231072B (en) Control method, device and the terminal device of prompting message
CN105185396B (en) A kind of method and apparatus of playing audio signal
CN105611172B (en) The reminding method and device that countdown is taken pictures
CN105450861B (en) Information cuing method and device
CN104298576B (en) terminal test method and device
CN109769191B (en) Audio output detection method and device and electronic equipment
CN108600503A (en) The control method and device of voice communication
CN105635916A (en) Audio processing method and apparatus
CN106101372B (en) Using prompting setting method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant