Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer; To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, intactly description; Obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Fig. 1 is the process flow diagram of In Call Automatic adjustment method embodiment one of the present invention, and as shown in Figure 1, this method comprises:
Step 101, through the total speech data of microphone collection, and calculate the energy of total speech data; This total speech data comprises user voice data and environmental noise data.
The method that the embodiment of the invention provides can be when the user uses various mobile phones or other mobile communication equipment to converse, the volume of regulating the conversation that plays out in the receiver automatically.Present embodiment is that example describes with the mobile phone.Wherein this mobile phone can be the mobile phone of any standards such as GSM, CDMA, WCDMA, TDS-CDMA.
Use in the process that mobile phone converses the user; No matter whether the user speaks; Can collect the sound signal of the total voice in the communication process through the microphone of mobile phone, when the user spoke, the total voice that collect comprised user's self voice and environmental noise always; When the user was in quiet period, the total voice that collect mainly comprised environmental noise; Sound signal that then will these total voice is carried out analog to digital conversion; Convert PCM (Pulse Code Modulation to; Pulse-code modulation recording) total speech data of form, this total speech data comprise the environmental noise data of user's self speech data and the said environment of user; This process can utilize the call function of mobile phone self to accomplish together.Then, calculate the energy of this total speech data.
Step 102, according to the autocorrelation of user voice data, obtain the energy of user voice data.
Each user's voice spectrum itself has its uniqueness, and just the correlativity of each user self speech data is higher, and the user speech distance microphone has only several centimetres distance usually.And the source of user's environmental noise of environment of living in through process has many-side, for example other people, other sound source such as automobile or machine of periphery.The distance of these environmental noise distance microphones has closely to be had far, but this distance all is far longer than the distance of user speech distance microphone usually, and the voice superposition of these environmental noises and user self is in the same place.Total voice after the superposition are at random.Utilize the autocorrelation between the user voice data; Calculate total speech data of PCM form through methods such as for example convolution superposition, maximum likelihood, nonlinear fitting or multistage latitude conversion; The autocorrelation of user voice data can be calculated, thereby the energy of user voice data can be got access to through calculating.
Step 103, the energy of total speech data and the energy of user voice data are subtracted each other, obtain the energy of environmental noise data.
According to the energy of the total speech data that obtains in step 101 and the step 102 and the energy of user voice data, can calculate the energy of environmental noise data.In the process that the user converses; Generally speaking, the user is speaking or mourning in silence (listening the other side to speak), the method that provides through the embodiment of the invention; No matter whether the user speaks; Still be between quiet period, can calculate the energy of environmental noise according to the autocorrelation characteristics of user speech.
Step 104, according to the energy of environmental noise data, regulate In Call.
The energy of the environmental noise data that obtain according to aforementioned calculation, the size that can regulate In Call.When environmental noise is bigger, with In Call regulate bigger, when environmental noise is smaller, with In Call regulate less.Concrete, regulate In Call and can use absolute value or relative value to regulate, also can use the more merogenesis adjusting of intelligence.Wherein, absolute value is regulated and can is: the speech volume of regulating the receiver broadcast is greater than fixed value of environmental noise, until reaching the max volume restriction; Adjustment can be relatively: the speech volume of regulating the receiver broadcast accounts for this speech volume and fixing ratio of environmental noise energy sum; Merogenesis is regulated and can is: consider the comfort level that the user uses, according to the size of the energy of environmental noise data, merogenesis is regulated the speech volume that receiver is play.Acquire the regulated value of required In Call through said method after,, the speech data of PCM form through digital-to-analog conversion, is converted to simulating signal and plays back through receiver PCM decoder and digital to analog converter in this regulated value notice mobile phone; Wherein when carrying out digital-to-analog conversion, regulate In Call.
The In Call Automatic adjustment method of the embodiment of the invention; Microphone through using user terminal self is gathered user's voice and environmental noise; And according to the randomness of the autocorrelation and the environmental noise of user speech; From total speech data that microphone collects, obtain the energy of environmental noise data, regulate In Call automatically according to the energy of these environmental noise data then, realized regulating automatically accurately In Call.
Fig. 2 is the process flow diagram of In Call Automatic adjustment method embodiment two of the present invention, and as shown in Figure 2 on the basis of the inventive method embodiment one, this method comprises:
Step 201, every separated Preset Time pass through the total speech data of microphone collection at interval, and calculate the energy of total speech data; This total speech data comprises user voice data and environmental noise data.
Concrete, the time and the time interval of conversation connection set up in record, in the very first time section of setting up after conversation connects, whenever passes through the total speech data of microphone collection at interval at a distance from first Preset Time, and calculate the energy of total speech data; In second time period of setting up after conversation connects, whenever pass through the total speech data of microphone collection at interval, and calculate the energy of total speech data at a distance from second Preset Time; Second time period was positioned at after the very first time section, and second Preset Time at interval greater than first Preset Time at interval.
Because the noise level of the residing environment of cellphone subscriber possibly be in the variation that does not stop, in order to ensure self-regulating real-time of In Call and accuracy, periodically computing environment noise level and periodically adjusting In Call.Common situation is that in a period of time that conversation has just been set up, the cellphone subscriber is in order to select a suitable conversation environment, the environment that the selection that may not stop is new.Thus, in order to improve user's comfort level, in a period of time that conversation has just been set up, computing environment noise level and the cycle of regulating In Call can lack, and promptly can whenever pass through the total speech data of microphone collection at interval at a distance from a Preset Time of lacking; After a period of time is set up in conversation, the computing environment noise level and regulate cycle of In Call can be longer, promptly can be whenever at a distance from long Preset Time at interval through the total speech data of microphone collection.
Step 202, according to convolution superposition, maximum likelihood, nonlinear fitting or multistage latitude transform method, calculate the autocorrelation of user voice data; According to the autocorrelation of user voice data, obtain the energy of user voice data.
Wherein, the time span of calculating the user voice data autocorrelation can be an empirical value, also can be to obtain through the analog simulation test.The time of calculating the user voice data autocorrelation is long more, calculating accurate more, simultaneously, also can be big more to influences such as power consumptions.Thus, only rule of thumb value or analog simulation test findings select a rational time span to get final product.
Be example with the convolution rate addition method below, the concrete implementation procedure of this step is described.The word speed that the user speaks is generally 5/second; Be each word 200ms generally arranged time in other words the user in 200ms, say a word; In this 200ms, user voice signal is except signal intensity has certain variation, and frequency characteristic remains unchanged basically; In this process, voice signal is carried out sampling processing, can carry out differentiation in a way to user voice signal and noise signal to a certain extent; Wherein, this 200ms is the time span of above-mentioned calculating user voice data autocorrelation.This step specifically can for:
Suppose that the voice signal of user in communication process is: x (t), (t: the time, unit is a millisecond); Noise signal is N (t); The total voice signal that then collects through microphone is x (t)+N (t).
Suppose to carry out 1600 samplings (sampling rate is 8khz) in the time at 200ms; 1600 sampled datas are divided into 10 groups, and every group of 160 sampled datas are expressed as: a [10] [160]; Obtaining data in each sampling period is a [10], a [i] [j]=x [i*20+j*t0]+N [i*20+j*t0]; I={0,1,2,3 ... 9}, j={0,1,2,3......159}, t0 can adjust according to the actual sample rate situation for the sampling basic cycle.Can be according to sampled value through the energy of root mean square algorithm computation current demand signal.
Because the stationary problem that needs consideration sampling and user to speak; The rarest 5 groups is to be in same pronunciation state (comprising silent status) in these 10 groups, supposes that a in sampling process [1], a [2], a [3], a [4], a [5] (wherein a [1] representation vector { a [1] [0] a [1] [1] a [1] [2] a [1] [3] ... a [1] [159] }) are user's same pronunciation samplings.Calculate
If
Think that then a [i] is the efficiently sampling data.Can calculate the energy of user voice signal in this time period through b [i].
Step 203, the energy of total speech data and the energy of user voice data are subtracted each other, obtain the energy of environmental noise data.
Step 204, according to the energy of environmental noise data, obtain first volume corresponding with the energy of environmental noise data.
Wherein, According to the adjusting needs, the energy that can pre-configured environmental noise data and the corresponding relation of volume, the bigger volume of energy correspondence of higher environmental noise data; The volume that the energy of lower environmental noise data is corresponding less is regulated In Call according to this volume then.The volume of sound and the energy of sound are linear relationship under perfect condition, can change through simple calculating each other, and the embodiment of the invention also can be through the first corresponding volume of energy that calculates the environmental noise data thus.
Step 205, according to first volume, regulate In Call.
Regulate In Call and can use absolute value or relative value to regulate, also can use the more merogenesis adjusting of intelligence, concrete control method can adopt following method:
Absolute value is regulated: according to first volume, regulate In Call, make In Call equal first volume and a preset value sum.Regulate more corresponding than the energy of the current environment noise data all the time preset value that gives great volume of In Call that makes the receiver broadcast through absolute value.
Relative value is regulated: according to first volume, regulate In Call, the ratio that makes In Call and In Call and the first volume sum is a preset ratio.Regulate through relative value, the In Call that makes receiver play accounts for corresponding preset ratio of volume sum of energy of this In Call and current environment noise data all the time.
Merogenesis is regulated and can be applied among absolute value or the relative value adjusting; When using merogenesis to regulate; Preset value during absolute value or relative value are regulated or preset ratio are not definite values just, but according to preset adjusting step-length, increase along with the increase of the energy of environmental noise data.Concrete merogenesis regulate can for: according to the energy level grade of environmental noise data; The adjusting step-length of selecting volume to regulate; Higher when the energy level grade of environmental noise data, just when environmental noise is big, select the adjusting step-length bigger; When the energy level grade of environmental noise data is hanged down, select the adjusting step-length less.For example: can be divided into 5 grades to the energy level of environmental noise data, each grade is regulated step-length to it should be arranged, and is as shown in table 1, and wherein the corresponding adjusting step-length of each grade can be preset as fixing value.
Table 1
Environmental noise is described |
The energy level grade of environmental noise data |
Regulate step-length |
Unusual noisy environment |
1 grade |
Big/as generally to adjust step-length |
Than noisy environment |
2 grades |
General adjustment step-length |
General environment |
3 grades |
Less adjustment step-length |
Quiet environment |
4 grades |
Do not adjust |
Quiet environment |
5 grades |
Do not adjust |
The In Call Automatic adjustment method of the embodiment of the invention; Microphone through using user terminal self is gathered user's voice and environmental noise; And according to the randomness of the autocorrelation and the environmental noise of user speech; From total speech data that microphone collects, obtain the energy of environmental noise data, regulate In Call automatically according to the energy of these environmental noise data then, realized regulating automatically accurately In Call.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be accomplished through the relevant hardware of programmed instruction; Aforesaid program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
Fig. 3 is the structural drawing of In Call self-checking device embodiment one of the present invention, and as shown in Figure 3, this device comprises: first computing module 31, acquisition module 33, second computing module 35 and adjustment module 37.
First computing module 31 is used for through the total speech data of microphone collection, and calculates the energy of total speech data; Total speech data comprises user voice data and environmental noise data.Acquisition module 33 is used for the autocorrelation according to user voice data, obtains the energy of user voice data.Second computing module 35 is used for the energy of total speech data and the energy of user voice data are subtracted each other, and obtains the energy of environmental noise data.Adjustment module 37 is used for the energy according to the environmental noise data, regulates In Call.
The principle of work of each module in the present embodiment and workflow referring to the description among each method embodiment of the present invention, repeat no more at this.
The In Call self-checking device of the embodiment of the invention; Microphone through using user terminal self is gathered user's voice and environmental noise; And according to the randomness of the autocorrelation and the environmental noise of user speech; From total speech data that microphone collects, obtain the energy of environmental noise data, regulate In Call automatically according to the energy of these environmental noise data then, realized regulating automatically accurately In Call.
Fig. 4 is the structural drawing of In Call self-checking device embodiment two of the present invention, and as shown in Figure 4 on the basis of apparatus of the present invention embodiment one, first computing module 31 comprises the timing unit 311 and first computing unit 313; Acquisition module 33 comprises second computing unit 331 and acquiring unit 333; Adjustment module 37 comprises volume acquiring unit 371, and first regulon 373 and/or second regulon 375.First computing unit 313 further comprises: first subelement and second subelement.
Timing unit 311 is used for writing time at interval.First computing unit 313 is used for every separated Preset Time at interval through the total speech data of microphone collection, and calculates the energy of total speech data.
First subelement is used in the very first time section of setting up after conversation connects, whenever passing through the total speech data of microphone collection at interval at a distance from first Preset Time, and calculates the energy of total speech data.Second subelement is used in second time period of setting up after conversation connects, whenever passing through the total speech data of microphone collection at interval at a distance from second Preset Time, and calculates the energy of total speech data.Second time period was positioned at after the very first time section, and second Preset Time at interval greater than first Preset Time at interval.
Second computing unit 331 is used for according to convolution superposition, maximum likelihood, nonlinear fitting or multistage latitude transform method, calculates the autocorrelation of user voice data.Acquiring unit 333 is used for the autocorrelation according to user voice data, obtains the energy of user voice data.
Volume acquiring unit 371 is used for the energy according to the environmental noise data, obtains first volume.First regulon 373 is used for according to first volume, regulates In Call, makes In Call equal first volume and a preset value sum.Second regulon 375 is used for according to first volume, regulates In Call, and the ratio that makes In Call and In Call and the first volume sum is a preset ratio.
The principle of work of each module in the present embodiment and workflow referring to the description among each method embodiment of the present invention, repeat no more at this.
The In Call self-checking device of the embodiment of the invention; Microphone through using user terminal self is gathered user's voice and environmental noise; And according to the randomness of the autocorrelation and the environmental noise of user speech; From total speech data that microphone collects, obtain the energy of environmental noise data, regulate In Call automatically according to the energy of these environmental noise data then, realized regulating automatically accurately In Call.
The embodiment of the invention also provides a kind of user terminal, and this user terminal comprises arbitrary In Call self-checking device that the microphone and the embodiment of the invention provide.
The principle of work of each module in the present embodiment and workflow referring to the description among each method embodiment of the present invention, repeat no more at this.
The user terminal that the embodiment of the invention provides; Can gather user's voice and environmental noise through the microphone of himself; And according to the randomness of the autocorrelation and the environmental noise of user speech; From total speech data that microphone collects, obtain the energy of environmental noise data, regulate In Call automatically according to the energy of these environmental noise data then, realized regulating automatically accurately In Call.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these are revised or replacement, do not make the spirit and the scope of the essence disengaging various embodiments of the present invention technical scheme of relevant art scheme.