CN107332998A - Call mode switching method, mobile terminal and readable storage medium storing program for executing - Google Patents

Call mode switching method, mobile terminal and readable storage medium storing program for executing Download PDF

Info

Publication number
CN107332998A
CN107332998A CN201710545011.1A CN201710545011A CN107332998A CN 107332998 A CN107332998 A CN 107332998A CN 201710545011 A CN201710545011 A CN 201710545011A CN 107332998 A CN107332998 A CN 107332998A
Authority
CN
China
Prior art keywords
ambient noise
value
call mode
call
distance
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.)
Withdrawn
Application number
CN201710545011.1A
Other languages
Chinese (zh)
Inventor
戴大为
张前程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tinno Mobile Technology Co Ltd
Shenzhen Tinno Wireless Technology Co Ltd
Original Assignee
Shenzhen Tinno Mobile Technology Co Ltd
Shenzhen Tinno Wireless Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tinno Mobile Technology Co Ltd, Shenzhen Tinno Wireless Technology Co Ltd filed Critical Shenzhen Tinno Mobile Technology Co Ltd
Priority to CN201710545011.1A priority Critical patent/CN107332998A/en
Publication of CN107332998A publication Critical patent/CN107332998A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • H04M1/6033Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
    • H04M1/6041Portable telephones adapted for handsfree use
    • H04M1/605Portable telephones adapted for handsfree use involving control of the receiver volume to provide a dual operational mode at close or far distance from the user
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality

Abstract

The invention discloses a kind of call mode switching method, mobile terminal and readable storage medium storing program for executing, the call mode switching method comprises the following steps:Under receiver call mode, the distance between mobile terminal and human ear are detected by range sensor;When the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, and calculate the decibel value of the ambient noise;Judge whether the decibel value of the ambient noise is more than default decibel value;When the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched into handsfree talk mode.The present invention can realize the automatic switchover between receiver call mode and handsfree talk mode, and user-friendly without user's manual switching, switch speed is very fast.

Description

Call mode switching method, mobile terminal and readable storage medium storing program for executing
Technical field
The present invention relates to the technical field of mobile terminal, more particularly to a kind of call mode switching method, mobile terminal and Readable storage medium storing program for executing.
Background technology
With the popularization of mobile terminal, mobile terminal plays important role in daily life.In order to allow user to exist Good speech quality and requirement are kept under different environment, mobile terminal possesses two kinds of call modes, and respectively receiver is conversed Pattern and handsfree talk mode.
In general, the call mode of mobile terminal is receiver call mode, if to be switched to hand-free call mould Formula is, it is necessary to which user controls switching manually.In handoff procedure, because switching needs user's manual switching, it is necessary to the regular hour, Being easily caused part call voice can not be answered by user, lose part dialog context, cause speech quality to decline, if with The part dialog context for obtaining loss is wanted, it is necessary to re-prompt partner in family, and Consumer's Experience is poor.
Therefore, there is speech quality decline, be not easy to the problem of user uses in existing call mode switching method.
The above is only used for auxiliary and understands technical scheme, does not represent and recognizes that the above is existing skill Art.
The content of the invention
It is a primary object of the present invention to provide a kind of call mode switching method, mobile terminal and readable storage medium storing program for executing, Existing call mode switching method is aimed to solve the problem that, speech quality declines, and is not easy to the technical problem that user uses.
To achieve the above object, the present invention provides a kind of call mode switching method, the call mode switching method bag Include following steps:
Under receiver call mode, the distance between mobile terminal and human ear are detected by range sensor;
When the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, and calculate the ambient noise Decibel value;
Judge whether the decibel value of the ambient noise is more than default decibel value;
When the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched into hand-free call mould Formula.
Alternatively, the ambient noise of the collection surrounding environment, and wrapping the step of calculate the decibel value of the ambient noise Include:
The ambient noise of surrounding environment is gathered by microphone, and obtains the sound amplitude of the ambient noise;
The decibel value of the ambient noise is calculated according to the sound amplitude and preset formula.
Alternatively, it is described after the step of whether decibel value for judging the ambient noise is more than default decibel value Call mode switching method also includes:
When the decibel value of the ambient noise is less than or equal to default decibel value, record the ambient noise it is lasting when It is long;
When the duration is more than or equal to preset duration, mobile terminal kill-call is controlled.
Alternatively, it is described the step of receiver call mode is switched into handsfree talk mode after, the call mode is cut Changing method also includes:
The call mode switching command of external trigger is received, and current talking is switched according to the call mode switching command Pattern.
Alternatively, it is described the step of detect the distance between mobile terminal and human ear by range sensor after, it is described Call mode switching method also includes:
When the distance is less than or equal to pre-determined distance, the adjusted value of In Call, and root are determined according to the distance Current talking volume is adjusted according to the adjusted value.
Alternatively, the adjusted value that In Call is determined according to the distance, and adjust current according to the adjusted value The step of In Call, includes:
Obtain the incidence relation between the distance and In Call adjusted value;
The adjusted value of In Call is determined according to the incidence relation, and current talking sound is adjusted according to the adjusted value Amount.
Alternatively, it is described the step of receiver call mode is switched into handsfree talk mode after, the call mode is cut Changing method also includes:
The ambient noise is sampled, and the sampled result and preset formula according to the ambient noise calculate call The adjusted value of volume;
Current talking volume is adjusted according to the adjusted value.
Alternatively, it is described that the ambient noise is sampled, and the sampled result according to the ambient noise and default The step of formula calculates the adjusted value of In Call includes:
The ambient noise volume in the ambient noise is obtained, and according to preset sample frequency to the ambient noise volume Sampled;
The average value and maximum of the ambient noise volume are calculated according to the sampled result of the ambient noise volume;
Weighting bottom is calculated according to the average value of the ambient noise volume, maximum and the first preset formula to make an uproar value;
The adjusted value of In Call is calculated according to make an uproar value and the second preset formula of the weighting bottom.
In addition, to achieve the above object, the present invention also provides a kind of mobile terminal, and mobile terminal includes:Memory, processing Device and the call mode changeover program that can be run on the memory and on the processor is stored in, the call mode is cut Following steps are realized when changing program by the computing device:
Under receiver call mode, the distance between mobile terminal and human ear are detected by range sensor;
When the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, and calculate the ambient noise Decibel value;
Judge whether the decibel value of the ambient noise is more than default decibel value;
When the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched into hand-free call mould Formula.
The present invention also provides the call that is stored with a kind of computer-readable recording medium, the computer-readable recording medium Mode switching program, the call mode changeover program realizes following steps when being executed by processor:
Under receiver call mode, the distance between mobile terminal and human ear are detected by range sensor;
When the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, and calculate the ambient noise Decibel value;
Judge whether the decibel value of the ambient noise is more than default decibel value;
When the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched into hand-free call mould Formula.
The present invention detects the distance between mobile terminal and human ear under receiver call mode by range sensor, and When the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, while calculating the decibel value of the ambient noise, so Afterwards, judge whether the decibel value of the ambient noise is more than default decibel value, be more than default decibel in the decibel value of the ambient noise During value, receiver call mode is switched into handsfree talk mode, this programme can be under receiver call mode, with reference to mobile terminal Realized with the ambient noise of the distance between human ear and surrounding environment automatic between receiver call mode and handsfree talk mode Switching, user-friendly without user's manual switching, switch speed is very fast, also more accurate, while it is logical to lose part Content is talked about, effectively ensures speech quality.
Brief description of the drawings
Fig. 1 is the terminal structure schematic diagram for the hardware running environment that scheme of the embodiment of the present invention is related to;
Fig. 2 is the schematic flow sheet of call mode switching method first embodiment of the present invention;
Fig. 3 is the ambient noise that surrounding environment is gathered described in Fig. 2, and calculate the decibel value step of the ambient noise Refine schematic flow sheet;
Fig. 4 is the schematic flow sheet of call mode switching method second embodiment of the present invention;
Fig. 5 is the schematic flow sheet of call mode switching method 3rd embodiment of the present invention;
Fig. 6 is the adjusted value for determining In Call described in Fig. 5 according to the distance, and worked as according to adjusted value adjustment The refinement schematic flow sheet of preceding In Call step;
Fig. 7 is the schematic flow sheet of call mode switching method fourth embodiment of the present invention;
Fig. 8 be Fig. 7 described in the ambient noise is sampled, and the sampled result according to the ambient noise and in advance If formula calculates the refinement schematic flow sheet of the adjusted value step of In Call.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are:Under receiver call mode, detected and moved by range sensor The distance between terminal and human ear, and when the distance is more than pre-determined distance, gathers the ambient noise of surrounding environment, calculate simultaneously The decibel value of the ambient noise, then, judges whether the decibel value of the ambient noise is more than default decibel value, in the ambient noise Decibel value when being more than default decibel value, receiver call mode is switched into handsfree talk mode.
Because in general, the call mode of mobile terminal is receiver call mode, if to be switched to hands-free logical Words pattern is, it is necessary to which user controls switching manually.In handoff procedure, because switching needs user's manual switching, it is necessary to certain Time, being easily caused part call voice can not be answered by user, lose part dialog context, there is speech quality decline, It is not easy to the problem of user uses.
The present invention provides a solution, and this programme can be under receiver call mode, with reference to mobile terminal and human ear The distance between realize automatic switchover between receiver call mode and handsfree talk mode, nothing with the ambient noise of surrounding environment User's manual switching is needed, user-friendly, switch speed is very fast, it is also more accurate, while part dialog context will not be lost, It is effective to ensure speech quality.
As shown in figure 1, Fig. 1 is the terminal structure schematic diagram for the hardware running environment that scheme of the embodiment of the present invention is related to.
Terminal of the embodiment of the present invention can be PC or smart mobile phone, tablet personal computer, pocket computer etc. with aobvious Show the packaged type terminal device of function.
As shown in figure 1, the terminal can include:Processor 1001, such as CPU, communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is used to realize the connection communication between these components. User interface 1003 can include display screen (Display), input block such as keyboard (Keyboard), optional user interface 1003 can also include wireline interface, the wave point of standard.Network interface 1004 can optionally connect including the wired of standard Mouth, wave point (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory or stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 storage device.
Alternatively, terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio Circuit, WiFi module etc..Wherein, sensor ratio such as optical sensor, motion sensor and other sensors.Specifically, light Sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can according to the light and shade of ambient light come The brightness of display screen is adjusted, proximity transducer can close display screen and/or backlight when mobile terminal is moved in one's ear.As One kind of motion sensor, gravity accelerometer can detect in all directions the size of (generally three axles) acceleration, quiet Size and the direction of gravity are can detect that when only, application (such as horizontal/vertical screen switching, correlation available for identification mobile terminal posture Game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Certainly, mobile terminal can also match somebody with somebody The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared ray sensor are put, be will not be repeated here.
It will be understood by those skilled in the art that the restriction of the terminal structure shown in Fig. 1 not structure paired terminal, can be wrapped Include than illustrating more or less parts, either combine some parts or different parts arrangement.
As shown in figure 1, leading to as operating system, network can be included in a kind of memory 1005 of computer-readable storage medium Believe module, Subscriber Interface Module SIM and call mode changeover program.
In the terminal shown in Fig. 1, network interface 1004 is mainly used in connecting background server, is carried out with background server Data communication;User interface 1003 is mainly used in connection client (user terminal), and row data communication is entered with client;And processor 1001 can be used for calling the call mode changeover program stored in memory 1005, and perform following steps:
Under receiver call mode, the distance between mobile terminal and human ear are detected by range sensor;
When the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, and calculate the ambient noise Decibel value;
Judge whether the decibel value of the ambient noise is more than default decibel value;
When the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched into hand-free call mould Formula.
Further, the ambient noise of the collection surrounding environment, and the step of calculate the decibel value of the ambient noise Including:
The ambient noise of surrounding environment is gathered by microphone, and obtains the sound amplitude of the ambient noise;
The decibel value of the ambient noise is calculated according to the sound amplitude and preset formula.
Further, processor 1001 can call the call mode changeover program stored in memory 1005, also perform Following steps:
When the decibel value of the ambient noise is less than or equal to default decibel value, record the ambient noise it is lasting when It is long;
When the duration is more than or equal to preset duration, mobile terminal kill-call is controlled.
Further, processor 1001 can call the call mode changeover program stored in memory 1005, also perform Following steps:
The call mode switching command of external trigger is received, and current talking is switched according to the call mode switching command Pattern.
Further, processor 1001 can call the call mode changeover program stored in memory 1005, also perform Following steps:
When the distance is less than or equal to pre-determined distance, the adjusted value of In Call, and root are determined according to the distance Current talking volume is adjusted according to the adjusted value.
Further, the adjusted value that In Call is determined according to the distance, and being worked as according to adjusted value adjustment The step of preceding In Call, includes:
Obtain the incidence relation between the distance and In Call adjusted value;
The adjusted value of In Call is determined according to the incidence relation, and current talking sound is adjusted according to the adjusted value Amount.
Further, processor 1001 can call the call mode changeover program stored in memory 1005, also perform Following steps:
The ambient noise is sampled, and the sampled result and preset formula according to the ambient noise calculate call The adjusted value of volume;
Current talking volume is adjusted according to the adjusted value.
Further, it is described that the ambient noise is sampled, and the sampled result according to the ambient noise and pre- If the step of formula calculates the adjusted value of In Call includes:
The ambient noise volume in the ambient noise is obtained, and according to preset sample frequency to the ambient noise volume Sampled;
The average value and maximum of the ambient noise volume are calculated according to the sampled result of the ambient noise volume;
Weighting bottom is calculated according to the average value of the ambient noise volume, maximum and the first preset formula to make an uproar value;
The adjusted value of In Call is calculated according to make an uproar value and the second preset formula of the weighting bottom.
The basic phase of each specific embodiment of the specific embodiment of mobile terminal of the present invention and following call mode switching methods Together, therefore not to repeat here.
The present invention provides a kind of call mode switching method.
Reference picture 2, Fig. 2 is the schematic flow sheet of call mode switching method first embodiment of the present invention.
In the present embodiment, the call mode switching method includes:
Step S101, under receiver call mode, the distance between mobile terminal and human ear are detected by range sensor;
The call mode switching method is applied to mobile terminal, and the mobile terminal includes smart mobile phone and tablet personal computer etc., The mobile terminal possesses two kinds of call modes, respectively receiver call mode and handsfree talk mode, certainly also logical including earphone Words pattern.In general, mobile terminal is when answering call or caller call, and current call mode is conversed for receiver Pattern.
Mobile terminal is in receiver call mode, if now user removes mobile terminal by ear, triggers distance The distance measuring instruction of sensor, the distance-sensor to human ear project the distance between infrared detection mobile terminal and human ear (away from The distance between mobile terminal and human ear can be judged by detecting luminous intensity that infrared reflection returns from sensor) it is mobile The distance between terminal and human ear.In specific implementation, when mobile terminal is in call, the work of triggering range sensor refers to Order, distance of the range sensor in whole communication process in real time between detection mobile terminal and human ear.
Step S102, when the distance is more than pre-determined distance, gathers the ambient noise of surrounding environment, and calculate the back of the body The decibel value of scape noise;
When the mobile terminal detects the distance between mobile terminal and human ear more than pre-determined distance by range sensor, The ambient noise of surrounding environment is gathered by microphone, and calculates the decibel value of the ambient noise, the pre-determined distance can be 1 li Rice, 2 centimetres or 3 centimetres etc..
Specifically, reference picture 3, Fig. 3 is the refinement schematic flow sheet of step S102 described in Fig. 2, and step S102 includes:
Step S1021, the ambient noise of surrounding environment is gathered by microphone, and obtains the sound width of the ambient noise Degree;
Step S1022, the decibel value of the ambient noise is calculated according to the sound amplitude and preset formula.
The mobile terminal gathers the ambient noise of surrounding environment by microphone, and obtains the sound width of the ambient noise Degree, i.e., shaken the sound amplitude for obtaining ambient noise by eardrum, then calculate the back of the body according to the sound amplitude and preset formula The decibel value of scape noise, if it is B that decibel value, which is A, sound amplitude, then the preset formula is A=20logB, for example, passing through Mike The sound amplitude for the ambient noise that elegance collection is obtained is 10, then the decibel value of the ambient noise is 20 decibels.
Step S103, judges whether the decibel value of the ambient noise is more than default decibel value;
Step S104, when the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched to Handsfree talk mode.
The mobile terminal judges whether the decibel value of the ambient noise is big after calculating obtains the decibel value of the ambient noise In default decibel value, if the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched to hands-free Call mode.The default decibel value can be 15 decibels, 18 decibels or 20 decibels etc..
In specific implementation, the image information of object in communication process, can also be obtained, when recognizing in image information Object be human ear shape when, keep receiver call mode.If in addition, present talk mode is handsfree talk mode, incited somebody to action Call mode switches to receiver call mode.Specifically, the monitoring of range sensor is first turned on when mobile terminal call starts Function, monitoring is close either with or without object, if object is close, then obtains the distance between object and mobile terminal information, such as Fruit range information is less than the threshold value of setting, then the front camera for activating mobile terminal is taken pictures, to obtain front camera The image information of shooting, and recognize whether the object of image information is human ear shape, if the object recognized in image is behaved Ear shape, then keep receiver call mode or call mode switched into receiver call mode;
In another specific implementation, the automatic switchover of call mode can also be controlled by gravity sensor, specifically, moving Dynamic terminal obtains gravitation information by gravity sensor, whether mobile terminal is judged according to the gravitation information in communication process In plumbness, if mobile terminal is not at plumbness, activation camera is shot, to obtain range information And/or image information, if the distance indicated by the range information is more than first threshold, and/or indicated by described image information Image definition be more than Second Threshold, then the call mode of mobile terminal is switched to handsfree talk mode.In addition, also may be used To combine the automatic switchover that gravity sensor, range sensor and microphone realize call mode.
In the present embodiment, the present invention detects mobile terminal and human ear under receiver call mode by range sensor The distance between, and when the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, while calculating the ambient noise Decibel value, then, judge whether the decibel value of the ambient noise is more than default decibel value, it is big in the decibel value of the ambient noise When default decibel value, receiver call mode is switched into handsfree talk mode, this programme can be tied under receiver call mode The ambient noise for closing the distance between mobile terminal and human ear and surrounding environment realizes receiver call mode and handsfree talk mode Between automatic switchover, user-friendly without user's manual switching, switch speed is very fast, also more accurate, while will not Part dialog context is lost, effectively ensures speech quality.
Further, reference picture 4, second based on above-mentioned first embodiment proposition call mode switching method of the present invention is real Example is applied, the difference with previous embodiment is, after the step S103, the call mode switching method also includes:
Step S105, when the decibel value of the ambient noise is less than or equal to default decibel value, records the background and makes an uproar The duration of sound;
Step S106, when the duration is more than or equal to preset duration, controls mobile terminal kill-call.
The mobile terminal is by judging that the decibel value for obtaining the ambient noise is less than or equal to default decibel value, then record should The duration of ambient noise, i.e. decibel value are less than or equal to the duration of default decibel value, and judge that the duration is It is no to be more than or equal to preset duration, if the duration is more than or equal to preset duration, mobile terminal kill-call is controlled, If the decibel value that the duration is less than preset duration, i.e. ambient noise is more than default decibel value, then by receiver call mode Switch to handsfree talk mode.
In the present embodiment, the present invention can be less than or equal to default decibel value in the decibel value of ambient noise, and continue When duration is more than preset duration, call is automatically hung up, economic loss of the user caused by forgetting to hang up the telephone is prevented, user is lifted Experience.
Further, user also can manual switching call mode, specifically, mobile terminal receive external trigger call mould Formula switching command, and present talk mode is switched according to the call mode switching command, so as to realize manual switching.
Further, reference picture 5, call mode switching method of the present invention is proposed based on above-mentioned first or second embodiments 3rd embodiment, the difference with previous embodiment is, after the step S101, and the call mode switching method is also wrapped Include:
Step S107, when the distance is less than or equal to pre-determined distance, the tune of In Call is determined according to the distance Whole value, and current talking volume is adjusted according to the adjusted value.
When distance between mobile terminal and human ear is less than or equal to pre-determined distance, mobile terminal is determined according to the distance The adjusted value of In Call, and current talking volume is adjusted according to the adjusted value.
Specifically, reference picture 6, Fig. 6 is the refinement schematic flow sheet of step S107 described in Fig. 5, the step S107 bags Include:
Step S1071, obtains the incidence relation between the distance and In Call adjusted value;
Step S1072, the adjusted value of In Call is determined according to the incidence relation, and work as according to adjusted value adjustment Preceding In Call.
User is when hand-held mobile terminal is conversed, the ear or face of the top half of mobile terminal close to user, Can be real by following preferred embodiment according to the In Call of the distance between mobile terminal and ear adjustment mobile terminal It is existing, according to the distance between mobile terminal and ear, it is determined that with this apart from corresponding adjusted value, according to adjusted value adjust it is mobile eventually The current talking volume at end.Dmax is set in mobile terminal software as range sensor and the maximum range value of human ear, such as 6cm, is the triggering that mobile terminal starts talking state switching flow;Dmin is set as the minimum between range sensor and human ear Distance value, such as 1cm, set D and detect the distance between human ear in real time as range sensor.
Mobile terminal after the distance between mobile terminal and ear is obtained, obtain the distance between adjusted value and ear with Incidence relation between adjusted value, the adjusted value of In Call is then obtained according to the incidence relation and with the distance, that is, works as shifting When the distance between dynamic terminal and ear are less than or equal to the first pre-determined distance, adjusted value is zero, when mobile terminal and ear it Between distance when being more than the second pre-determined distance, adjusted value is default adjusted value, when the distance between mobile terminal and ear are in When between the first pre-determined distance and the second pre-determined distance, the adjusted value is between the distance between mobile terminal and ear and 1 Difference, first pre-determined distance is the lowest distance value between Dmin, i.e. range sensor and human ear, and the second pre-determined distance is Dmax, i.e. range sensor and human ear maximum range value.
In the present embodiment, the present invention automatically adjusts working as mobile terminal according to the distance between mobile terminal and ear Preceding In Call, current talking volume is manually adjusted without user.
Further, reference picture 7, call mode switching of the present invention is proposed based on above-mentioned first, second or third embodiment The fourth embodiment of method, the difference with previous embodiment is, after the step S104, the call mode switching method Also include:
Step S108, samples to the ambient noise, and the sampled result according to the ambient noise and default public affairs Formula calculates the adjusted value of In Call;
Step S109, current talking volume is adjusted according to the adjusted value.
The mobile terminal is sampled to the ambient noise collected, and is calculated according to sampled result and preset formula The adjusted value of In Call, then adjusts current talking volume according to the adjusted value, and the sample frequency of the ambient noise is 100Hz, i.e., 100 are time per second, that is to say, that mobile terminal recorded an ambient noise every 0.01 second.
Specifically, reference picture 8, Fig. 8 is the refinement schematic flow sheet of step S108 described in Fig. 7, the step S108 bags Include:
Step S1081, obtains the ambient noise volume in the ambient noise, and according to preset sample frequency to the back of the body Scape noise ration is sampled;
Step S1082, the average value of the ambient noise volume is calculated according to the sampled result of the ambient noise volume And maximum;
Step S1083, weighting bottom is calculated according to the average value of the ambient noise volume, maximum and the first preset formula Make an uproar value;
Step S1084, the adjusted value of made an uproar according to the weighting bottom value and the second preset formula calculating In Call.
Mobile terminal obtains the ambient noise volume in the ambient noise after the ambient noise of surrounding environment is collected, And the ambient noise volume is sampled according to preset sample frequency, then according to the sampled result meter of the ambient noise volume The average value and maximum of the ambient noise volume are calculated, and it is pre- according to the average value of the ambient noise volume, maximum and first The value if formula calculating weighting bottom is made an uproar.The preset sample frequency is that 100Hz, i.e., 100 are time per second, and mobile terminal was recorded every 0.01 second Ambient noise volume, first preset formula is made an uproar the calculation formula of value for weighting bottom, if weighting bottom is made an uproar, value is y, and background is made an uproar The average value of amount of sound is that A, maximum are B, then weights the make an uproar calculation formula of value of bottom and be represented by y=0.7A+0.3B.The background The average value A and maximum B of noise ration specific calculating process are as follows:After preset time, acquisition is adopted in preset time The ambient noise volume of sample, and the ambient noise volume of the sampling in preset time is added summed, then by summed result with Number of samples is divided by, so that the average value A of ambient noise volume is obtained, while counting the ambient noise of the sampling in preset time The maximum B of maximum in volume, as ambient noise volume, finally substitutes into formula y=by average value A and maximum B 0.7A+0.3B, makes an uproar value y so as to obtain weighting bottom.
Mobile terminal obtains weighting bottom in calculating and made an uproar after value, is made an uproar value and the calculating call of the second preset formula according to the weighting bottom The Environmental enrichment value of volume, if Environmental enrichment value is C, then the second preset formula is represented by Environmental enrichment value C=(y-60)/6, Obtained Environmental enrichment value is calculated, 0.01dB is can be as accurate as, the Environmental enrichment value can be postiive gain value, or be negative Yield value, the calculating frequency of the Environmental enrichment value is identical with sample frequency, i.e., an ambient noise volume of often sampling, and just calculates one Secondary environment yield value.For example, it is assumed that weighting bottom is made an uproar, value is 66, then it is 1dB to calculate obtained Environmental enrichment value.The Environmental enrichment value Span be [- 5,5] dB, be more than 5dB or during less than -5dB when calculating obtained Environmental enrichment value, take the Environmental enrichment value to be 5dB or -5dB.
In specific implementation, mobile terminal is often sampled an ambient noise volume, just calculates ambient noise volume Average value and maximum, make an uproar value while calculating weighting bottom to calculate frequency with sample frequency identical so that weight bottom make an uproar value with Sample frequency updates, it is necessary to which explanation, for ease of the calculating of average value and maximum, sets a buffer area, the buffer area energy The data enough cached are limited, when beyond caching limit, delete the data cached at first, and store the number of newest caching According to the ambient noise volume that will be sampled is cached to buffer area, when the ambient noise volume of caching reaches predetermined number, is carried out The spilling of ambient noise volume, while the average value A and maximum B of ambient noise volume in current cache area are calculated, for example, false If the ambient noise volume that buffer area can be stored is 5, it is respectively according to the ambient noise volume of time order and function order buffer 1dB, 3dB, 2dB, 4dB and 5dB, the average value for calculating obtained ambient noise volume is 3dB and maximum is 5dB, weights bottom Value of making an uproar is 3.6dB, when sampling obtains the 6th ambient noise volume for 6dB, the 1dB of caching is deleted, the 6th background is made an uproar Amount of sound 6dB is cached, that is, the ambient noise volume cached is updated to 3dB, 2dB, 4dB, 5dB and 6dB, then ambient noise volume Average value and maximum are respectively 4dB and 6dB, and value is made an uproar for 4.6dB in weighting bottom.
In the present embodiment, this programme is sampled by the ambient noise to surrounding environment, and according to sampled result, One preset formula and the second preset formula calculate the adjusted value of In Call, then adjust current talking sound according to the adjusted value Amount so that In Call can carry out dynamic adjustment in real time with the change of the ambient noise of surrounding environment, manual without user In Call is adjusted, while improving speech quality, Consumer's Experience is improved.
In addition, the embodiment of the present invention also proposes a kind of computer-readable recording medium, the computer-readable recording medium On be stored with call mode changeover program, the call mode changeover program realizes following steps when being executed by processor:
Under receiver call mode, the distance between mobile terminal and human ear are detected by range sensor;
When the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, and calculate the ambient noise Decibel value;
Judge whether the decibel value of the ambient noise is more than default decibel value;
When the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched into hand-free call mould Formula.
Further, the ambient noise of the collection surrounding environment, and the step of calculate the decibel value of the ambient noise Including:
The ambient noise of surrounding environment is gathered by microphone, and obtains the sound amplitude of the ambient noise;
The decibel value of the ambient noise is calculated according to the sound amplitude and preset formula.
Further, when the call mode changeover program is executed by processor, following steps are also realized:
When the decibel value of the ambient noise is less than or equal to default decibel value, record the ambient noise it is lasting when It is long;
When the duration is more than or equal to preset duration, mobile terminal kill-call is controlled.
Further, when the call mode changeover program is executed by processor, following steps are also realized:
The call mode switching command of external trigger is received, and current talking is switched according to the call mode switching command Pattern.
Further, when the call mode changeover program is executed by processor, following steps are also realized:
When the distance is less than or equal to pre-determined distance, the adjusted value of In Call, and root are determined according to the distance Current talking volume is adjusted according to the adjusted value.
Further, the adjusted value that In Call is determined according to the distance, and being worked as according to adjusted value adjustment The step of preceding In Call, includes:
Obtain the incidence relation between the distance and In Call adjusted value;
The adjusted value of In Call is determined according to the incidence relation, and current talking sound is adjusted according to the adjusted value Amount.
Further, when the call mode changeover program is executed by processor, following steps are also realized:
The ambient noise is sampled, and the sampled result and preset formula according to the ambient noise calculate call The adjusted value of volume;
Current talking volume is adjusted according to the adjusted value.
Further, it is described that the ambient noise is sampled, and the sampled result according to the ambient noise and pre- If the step of formula calculates the adjusted value of In Call includes:
The ambient noise volume in the ambient noise is obtained, and according to preset sample frequency to the ambient noise volume Sampled;
The average value and maximum of the ambient noise volume are calculated according to the sampled result of the ambient noise volume;
Weighting bottom is calculated according to the average value of the ambient noise volume, maximum and the first preset formula to make an uproar value;
The adjusted value of In Call is calculated according to make an uproar value and the second preset formula of the weighting bottom.
Each specific reality of the specific embodiment of computer-readable recording medium of the present invention and above-mentioned call mode switching method Apply example essentially identical, therefore not to repeat here.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property is included, so that process, method, article or system including a series of key elements not only include those key elements, and And also including other key elements being not expressly set out, or also include for this process, method, article or system institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Also there is other identical element in process, method, article or the system of key element.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Understood based on such, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, Computer, server, air conditioner, or network equipment etc.) perform method described in each of the invention embodiment.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair Equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of call mode switching method, it is characterised in that the call mode switching method comprises the following steps:
Under receiver call mode, the distance between mobile terminal and human ear are detected by range sensor;
When the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, and calculate the decibel of the ambient noise Value;
Judge whether the decibel value of the ambient noise is more than default decibel value;
When the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched into handsfree talk mode.
2. call mode switching method as claimed in claim 1, it is characterised in that the background of the collection surrounding environment is made an uproar Sound, and include the step of calculate the decibel value of the ambient noise:
The ambient noise of surrounding environment is gathered by microphone, and obtains the sound amplitude of the ambient noise;
The decibel value of the ambient noise is calculated according to the sound amplitude and preset formula.
3. call mode switching method as claimed in claim 1, it is characterised in that the decibel of the judgement ambient noise After the step of whether value is more than default decibel value, the call mode switching method also includes:
When the decibel value of the ambient noise is less than or equal to default decibel value, the duration of the ambient noise is recorded;
When the duration is more than or equal to preset duration, mobile terminal kill-call is controlled.
4. call mode switching method as claimed in claim 1, it is characterised in that described switch to receiver call mode is exempted from After the step of carrying call mode, the call mode switching method also includes:
The call mode switching command of external trigger is received, and current talking mould is switched according to the call mode switching command Formula.
5. the call mode switching method as any one of claim 1-4, it is characterised in that described to pass through Distance-sensing After the step of device detects the distance between mobile terminal and human ear, the call mode switching method also includes:
When the distance is less than or equal to pre-determined distance, the adjusted value of In Call is determined according to the distance, and according to institute State adjusted value adjustment current talking volume.
6. call mode switching method as claimed in claim 5, it is characterised in that described that conversation voice is determined according to the distance The adjusted value of amount, and included according to the step of adjusted value adjustment current talking volume:
Obtain the incidence relation between the distance and In Call adjusted value;
The adjusted value of In Call is determined according to the incidence relation, and current talking volume is adjusted according to the adjusted value.
7. the call mode switching method as any one of claim 1-4, it is characterised in that described that receiver is conversed mould After the step of formula switches to handsfree talk mode, the call mode switching method also includes:
The ambient noise is sampled, and the sampled result and preset formula according to the ambient noise calculate In Call Adjusted value;
Current talking volume is adjusted according to the adjusted value.
8. call mode switching method as claimed in claim 7, it is characterised in that described to be adopted to the ambient noise Sample, and sampled result according to the ambient noise and preset formula include the step of calculate the adjusted value of In Call:
The ambient noise volume in the ambient noise is obtained, and the ambient noise volume is carried out according to preset sample frequency Sampling;
The average value and maximum of the ambient noise volume are calculated according to the sampled result of the ambient noise volume;
Weighting bottom is calculated according to the average value of the ambient noise volume, maximum and the first preset formula to make an uproar value;
The adjusted value of In Call is calculated according to make an uproar value and the second preset formula of the weighting bottom.
9. a kind of mobile terminal, it is characterised in that the mobile terminal includes:Memory, processor and it is stored in the storage On device and the call mode changeover program that can run on the processor, the call mode changeover program is by the processor Following steps are realized during execution:
Under receiver call mode, the distance between mobile terminal and human ear are detected by range sensor;
When the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, and calculate the decibel of the ambient noise Value;
Judge whether the decibel value of the ambient noise is more than default decibel value;
When the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched into handsfree talk mode.
10. a kind of computer-readable recording medium, it is characterised in that be stored with call mould on the computer-readable recording medium Formula changeover program, the call mode changeover program realizes following steps when being executed by processor:
Under receiver call mode, the distance between mobile terminal and human ear are detected by range sensor;
When the distance is more than pre-determined distance, the ambient noise of surrounding environment is gathered, and calculate the decibel of the ambient noise Value;
Judge whether the decibel value of the ambient noise is more than default decibel value;
When the decibel value of the ambient noise is more than default decibel value, receiver call mode is switched into handsfree talk mode.
CN201710545011.1A 2017-07-05 2017-07-05 Call mode switching method, mobile terminal and readable storage medium storing program for executing Withdrawn CN107332998A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710545011.1A CN107332998A (en) 2017-07-05 2017-07-05 Call mode switching method, mobile terminal and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710545011.1A CN107332998A (en) 2017-07-05 2017-07-05 Call mode switching method, mobile terminal and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN107332998A true CN107332998A (en) 2017-11-07

Family

ID=60195817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710545011.1A Withdrawn CN107332998A (en) 2017-07-05 2017-07-05 Call mode switching method, mobile terminal and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN107332998A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109618052A (en) * 2018-12-11 2019-04-12 努比亚技术有限公司 A kind of call audio switching method and device, mobile terminal and readable storage medium storing program for executing
CN110913069A (en) * 2019-11-14 2020-03-24 维沃移动通信有限公司 Call mode switching method and terminal equipment
CN112911053A (en) * 2021-01-19 2021-06-04 武汉凡鱼科技有限公司 Automatic voice call switching method, device, equipment and storage medium
WO2022110778A1 (en) * 2020-11-25 2022-06-02 中兴通讯股份有限公司 Switching method and apparatus for call answering mode, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050128106A1 (en) * 2003-11-28 2005-06-16 Fujitsu Ten Limited Navigation apparatus
CN201369757Y (en) * 2008-11-26 2009-12-23 宇龙计算机通信科技(深圳)有限公司 Automatic sound volume regulating device for mobile terminal and mobile terminal
CN106303091A (en) * 2016-10-19 2017-01-04 广东小天才科技有限公司 The method and device of mobile terminal loudspeaker status switching
CN106657588A (en) * 2016-09-30 2017-05-10 努比亚技术有限公司 Method and device for hanging up call

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050128106A1 (en) * 2003-11-28 2005-06-16 Fujitsu Ten Limited Navigation apparatus
CN201369757Y (en) * 2008-11-26 2009-12-23 宇龙计算机通信科技(深圳)有限公司 Automatic sound volume regulating device for mobile terminal and mobile terminal
CN106657588A (en) * 2016-09-30 2017-05-10 努比亚技术有限公司 Method and device for hanging up call
CN106303091A (en) * 2016-10-19 2017-01-04 广东小天才科技有限公司 The method and device of mobile terminal loudspeaker status switching

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109618052A (en) * 2018-12-11 2019-04-12 努比亚技术有限公司 A kind of call audio switching method and device, mobile terminal and readable storage medium storing program for executing
CN110913069A (en) * 2019-11-14 2020-03-24 维沃移动通信有限公司 Call mode switching method and terminal equipment
WO2022110778A1 (en) * 2020-11-25 2022-06-02 中兴通讯股份有限公司 Switching method and apparatus for call answering mode, device and storage medium
CN112911053A (en) * 2021-01-19 2021-06-04 武汉凡鱼科技有限公司 Automatic voice call switching method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109511037A (en) Earpiece volume adjusting method, device and computer readable storage medium
CN107332998A (en) Call mode switching method, mobile terminal and readable storage medium storing program for executing
CN108495056A (en) Photographic method, mobile terminal and computer readable storage medium
CN107562406B (en) Volume adjusting method, mobile terminal and computer readable storage medium
CN108282575B (en) Volume control method, mobile terminal and computer readable storage medium
CN107454342A (en) A kind of control method, mobile terminal and computer-readable recording medium
CN108259659A (en) A kind of pick-up control method, flexible screen terminal and computer readable storage medium
CN103929522A (en) Control method and control apparatus of electronic device, and electronic device
CN112004174B (en) Noise reduction control method, device and computer readable storage medium
CN107484081A (en) A kind of method of adjustment of audio signal, device, terminal and computer-readable recording medium
CN108566510A (en) Flexible screen control method, mobile terminal and readable storage medium storing program for executing
CN108540638A (en) Screen intensity adjusts control method, terminal and computer storage media
CN110225195B (en) Voice communication method and terminal
CN110035176A (en) A kind of brightness adjusting method of mobile terminal, mobile terminal and storage medium
CN109842725A (en) A kind of method for controlling volume of mobile terminal, mobile terminal and storage medium
CN108200267A (en) A kind of terminal control method, terminal and computer readable storage medium
CN108965589A (en) A kind of screen brightness control method, terminal and computer readable storage medium
CN108958695A (en) Audio-frequency inputting method, device and computer readable storage medium
CN108052352A (en) Control method, terminal and the computer readable storage medium of screen on-off state
CN108052304B (en) Volume adjusting method, volume adjusting equipment and computer storage medium
CN111182118B (en) Volume adjusting method and electronic equipment
CN107231471A (en) In Call method of adjustment, mobile terminal and storage medium
CN109616081A (en) Display lightness regulating method, flexible screen terminal and computer readable storage medium
CN108924355A (en) Signal frequency method of adjustment, mobile terminal and computer readable storage medium
CN110708475B (en) Exposure parameter determination method, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20171107

WW01 Invention patent application withdrawn after publication