Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 shows the flow chart of the voice interactive method that the embodiment of the present invention provides.
S101: when mobile terminal display Voice command startup interface, detect mobile terminal and whether occur effectively to rock;
In step S101, Voice command startup interface is shown (such as on the screen of mobile terminal, dial or contact person interface) time, initial corresponding data value in the initialization of Voice command startup interface, the position data of the mobile terminal detected according to gravity sensor again before and after rocking and the time interval, calculate mobile terminal and rock velocity amplitude in process, then according to described velocity amplitude, judge whether mobile terminal occurs effectively to rock, particularly: its system time t before rocking of acquisition for mobile terminal, and utilize gravity sensor to obtain coordinate position X in the three dimensions rocking residing for it, Y, Z, then acquisition for mobile terminal its system time t ' after rocking and coordinate position X ', Y ', Z ', then mobile terminal calculates it at the coordinate position side-play amount Dx rocking front and back, Dy, Dz and the time interval Dt before and after rocking, and according to mathematical formulaecalculate the velocity amplitude in the process of rocking, the velocity amplitude calculated and the threshold speed preserved in advance can compare, to judge whether mobile terminal occurs effectively to rock by last mobile terminal.It should be noted that, formulain 10000 just conveniently carry out Logic judgment (namely comparing size), can also be multiplied by other value.In addition, in other embodiments, also judge whether mobile terminal occurs effectively to rock by the distance value or angle value etc. of mobile terminal movement.
S102: when detecting that mobile terminal occurs effectively to rock, opening voice identification interface is to carry out the operation of being correlated with;
Particularly, when detecting that mobile terminal occurs effectively to rock, there is speech recognition interface in the screen of mobile terminal, then the interactive voice that user is undertaken being correlated with by this speech recognition interface operates, such as, when user wants to make a phone call or send short messages, can say the name of contact person, then mobile terminal is searched accordingly; Or user says the telephone number wanting to transfer to, and mobile terminal carries out speech recognition, then automatically transfers to; The same prior art of voice interactive function of mobile terminal, therefore do not repeating at this.
The embodiment of the present invention is by when mobile terminal shows Voice command startup interface, detect mobile terminal whether to occur effectively to rock, and when detecting that mobile terminal occurs effectively to rock, display speech recognition interface is to carry out associative operation, thus the triviality of operation can be reduced, and the Experience Degree of adding users.
Fig. 2 shows the flow chart of the voice interactive method that another embodiment of the present invention provides.
S201: record is carried out to suspension icon display position on mobile terminals;
Particularly, such as, the data using Android platform to provide store the SharedPreferences in three large modes, carry out record, such as, be shown in the side of dial or contact person interface to the display position in the screen of mobile terminal of suspension icon.The display position of certain suspension icon can also be change at random, shows randomly when namely opening in different places at every turn.In addition, suspension icon also can have character such as can dragging (or rocking along with rocking of mobile terminal), be out of shape, expand and reduce.
S202: when mobile terminal display Voice command startup interface, detect mobile terminal and whether occur effectively to rock;
In step S202, Voice command startup interface is shown (such as on the screen of mobile terminal, dial or contact person interface) time, initial corresponding data value in the initialization of Voice command startup interface, the position data of the mobile terminal detected according to gravity sensor again before and after rocking and the time interval, calculate mobile terminal and rock velocity amplitude in process, then according to described velocity amplitude, judge whether mobile terminal occurs effectively to rock, particularly: its system time t before rocking of acquisition for mobile terminal, and utilize gravity sensor to obtain coordinate position X in the three dimensions rocking residing for it, Y, Z, then acquisition for mobile terminal its system time t ' after rocking and coordinate position X ', Y ', Z ', then mobile terminal calculates it at the coordinate position side-play amount Dx rocking front and back, Dy, Dz and the time interval Dt before and after rocking, and according to mathematical formulaecalculate the velocity amplitude in the process of rocking, the velocity amplitude calculated and the threshold speed preserved in advance can compare, to judge whether mobile terminal occurs effectively to rock by last mobile terminal.It should be noted that, formulain 10000 just conveniently carry out Logic judgment (namely comparing size), can also be multiplied by other value.In addition, in other embodiments, also judge whether mobile terminal occurs effectively to rock by the distance value or angle value etc. of mobile terminal movement.
S203: when detecting that mobile terminal occurs effectively to rock, open suspension icon at Voice command startup interface;
In step S203, when calculating the velocity amplitude of mobile terminal when rocking and exceeding threshold value, namely judge that mobile terminal occurs effectively to rock, then mobile terminal at Voice command startup interface (such as, dial or contact person interface) show a suspension icon, this suspension icon is the entrance of speech identifying function, and namely this suspension icon is for controlling the unlatching of speech identifying function; Preferably, suspension icon is suspended on dial or contact person interface in translucent mode, and the icon that suspends shows word, such as " voice are known mutual " etc.; Further, when suspension icon has just been shown in dial or contact person interface, the sound that mobile terminal can send " dripping " uses this icon with better reminding user more in time.It is evident that, when user does not know to open suspension icon by rocking at dial or contact person interface, or when forgetting that mobile terminal has this convenient function for the moment, also likely accidentally due to rocking and trigger suspension icon during operation, therefore, the display of suspension icon can play effect user being carried out to Positive hint, can use the probability of voice interactive function by adding users.
S204: suspension icon selected laggard enter speech recognition interface operate with the interactive voice carrying out being correlated with;
Particularly, when the suspension icon that user is occurred by the way selection dials such as click or contact person interface, there is speech recognition interface in the screen of mobile terminal, then the interactive voice that user is undertaken being correlated with by this speech recognition interface operates, such as, when user wants to make a phone call or send short messages, can say the name of contact person, then mobile terminal is searched accordingly; Or user says the telephone number wanting to transfer to, and mobile terminal carries out speech recognition, then automatically transfers to.
S205: operated backed off after random speech recognition interface at interactive voice, turns back to Voice command startup interface;
Particularly, in the interactive voice operation backed off after random speech recognition interface that user is correlated with, turn back to original dial or contact person interface, and keep suspension to be illustrated on dial or contact person interface, so that user can reuse.
S206: again detect mobile terminal and whether occur effectively to rock, if so, then hide suspension icon;
Particularly, as step S202, again detect mobile terminal by gravity sensor whether to occur effectively to rock, if detect, mobile terminal occurs effectively to rock, then hide suspension icon, then user in dial or the enterprising line correlation operation of contact person interface, or can exit dial or contact person interface; Certainly, dial or contact person interface show above-mentioned suspension icon, also can directly exit dial or contact person interface.
The embodiment of the present invention is by after opening contact person or dial interface user, gravity sensor is utilized to control the display of the entrance (namely suspend icon) of interactive voice with hiding, the probability of voice interactive function can be used by adding users, reduce the triviality of operation, and the Experience Degree of adding users.
Fig. 3 shows the device structure schematic diagram of the mobile terminal that one embodiment of the invention provides.Mobile terminal 3 comprises detection module 31 and sound identification module 32.
Detection module 32, for showing Voice command startup interface (such as when mobile terminal, dial or contact person interface) time, detect mobile terminal whether to occur effectively to rock, particularly, when mobile terminal display dial or contact person interface, the position data of the mobile terminal detected according to gravity sensor before and after rocking and the time interval, calculating the velocity amplitude of mobile terminal when rocking, then according to this velocity amplitude, judging whether mobile terminal occurs effectively to rock.
Opening module 33, for when detect mobile terminal be in effectively rock state time, open suspension icon at dial or contact person interface.
Sound identification module 32, for when detecting that mobile terminal occurs effectively to rock, opening voice identification interface is to carry out the operation of being correlated with.
Fig. 4 shows the device structure schematic diagram of the mobile terminal that another embodiment of the present invention provides.Mobile terminal 4 comprises memory module 41, detection module 42, display module 43, sound identification module 44, returns module 45 and hiding module 46.
Memory module 31, for carrying out record to suspension icon display position on mobile terminals.
Whether detection module 42, for when mobile terminal shows Voice command startup interface (such as, dial or contact person interface), detect mobile terminal and occur effectively to rock.
Display module 43, for when detecting that mobile terminal occurs effectively to rock, at Voice command startup interface display suspension icon, after this suspension icon is selected, mobile terminal opening voice identification interface.
Sound identification module 44, for when detecting that mobile terminal occurs effectively to rock, opening voice identification interface is to carry out the operation of being correlated with.
Return module 45, the associative operation for carrying out in speech recognition interface completes backed off after random speech recognition interface, returns Voice command startup interface.
Hiding module 46, whether occurring effectively to rock for again detecting mobile terminal, if so, then hide suspension icon.
Mobile terminal 4 of the present invention is by when mobile terminal shows dial or contact person interface, detect mobile terminal whether to occur effectively to rock, and when detecting that mobile terminal occurs effectively to rock, open suspension icon, to imply that user can use interactive mode more easily, then suspension icon selected laggard enter speech recognition interface operate with the interactive voice carrying out being correlated with, thus the probability of voice interactive function can be used by adding users, reduce the triviality of operation, and the Experience Degree of adding users.
It is pointed out that the display packing of speech recognition interface of the present invention not only can be applicable in mobile terminal, also can be applicable to other and have in the equipment of voice interactive function.
Module in all embodiments of the present invention or submodule, universal integrated circuit can be passed through, such as CPU(Central Processing Unit, central processing unit), or realized by ASIC (Application Specific Integrated Circuit, application-specific integrated circuit (ASIC)).
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiment, between each embodiment identical similar part mutually see.For system embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.