Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, 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 belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Fig. 1 shows the flow chart of the voice interactive method that the embodiment of the invention provides.
S101: when portable terminal display word sound control system starts the interface, detect portable terminal and whether take place effectively to rock;
In step S101, display word sound control system (for example starts the interface on the screen of portable terminal, dial or contact person interface) time, initial corresponding data values in the initialization at voice control startup interface, rocking the front-back direction data and the time interval according to the detected portable terminal of gravity sensor again, calculate portable terminal and rock velocity amplitude in the process, then according to described velocity amplitude, judge whether portable terminal takes place effectively to rock, particularly: portable terminal obtains its system time t before rocking, and utilize gravity sensor to obtain to rock coordinate position X in its residing three dimensions, Y, Z, then portable terminal obtains its system time t ' and coordinate position X ' after rocking, Y ', Z ', portable terminal calculates its coordinate position side-play amount Dx before and after rocking then, Dy, Dz and the time interval Dt that rocks front and back, and according to mathematical formulae
Calculate the velocity amplitude in the process of rocking, last portable terminal can compare velocity amplitude that calculates and the threshold speed of preserving in advance, to judge whether portable terminal takes place effectively to rock.Need to prove formula
In 10000 just conveniently carry out logic determines (promptly relatively size), can also be to multiply by other value.In addition, in other embodiments, also can wait and judge whether portable terminal takes place effectively to rock by distance value that portable terminal moved or angle value.
S102: when detecting portable terminal and take place effectively to rock, the opening voice identification operation of interface to be correlated with;
Particularly, when detecting portable terminal and take place effectively to rock, speech recognition interface appears on the screen of portable terminal, the user can operate by the interactive voice that this speech recognition interface is correlated with then, for example, the user wants to make a phone call or when sending short messages, can say contact person's name, and portable terminal is searched accordingly then; Perhaps, the user says and wants the telephone number transferred to, and portable terminal carries out speech recognition, transfers to automatically then; The same prior art of the voice interactive function of portable terminal is not so giving unnecessary details at this.
The embodiment of the invention is by when portable terminal display word sound control system starts the interface, whether detect portable terminal takes place effectively to rock, and when detecting portable terminal and take place effectively to rock, show that speech recognition interface is to carry out associative operation, thereby can reduce the loaded down with trivial details property of operation, and increase user's Experience Degree.
Fig. 2 shows the flow chart of the voice interactive method that another embodiment of the present invention provides.
S201: the display position of suspension icon on portable terminal carried out record;
Particularly, for example, use the SharedPreferences in the storage three big modes that the Android platform provides, the display position in the screen of portable terminal of suspension icon is carried out record, for example, be shown in a side of dial or contact person interface.Certainly the display position of suspension icon can also be a change at random, shows in different places randomly when promptly opening at every turn.In addition, the suspension icon also can have and can drag (or rock along with rocking of portable terminal), character such as be out of shape, enlarges and dwindle.
S202: when portable terminal display word sound control system starts the interface, detect portable terminal and whether take place effectively to rock;
In step S202, display word sound control system (for example starts the interface on the screen of portable terminal, dial or contact person interface) time, initial corresponding data values in the initialization at voice control startup interface, rocking the front-back direction data and the time interval according to the detected portable terminal of gravity sensor again, calculate portable terminal and rock velocity amplitude in the process, then according to described velocity amplitude, judge whether portable terminal takes place effectively to rock, particularly: portable terminal obtains its system time t before rocking, and utilize gravity sensor to obtain to rock coordinate position X in its residing three dimensions, Y, Z, then portable terminal obtains its system time t ' and coordinate position X ' after rocking, Y ', Z ', portable terminal calculates its coordinate position side-play amount Dx before and after rocking then, Dy, Dz and the time interval Dt that rocks front and back, and according to mathematical formulae
Calculate the velocity amplitude in the process of rocking, last portable terminal can compare velocity amplitude that calculates and the threshold speed of preserving in advance, to judge whether portable terminal takes place effectively to rock.Need to prove formula
In 10000 just conveniently carry out logic determines (promptly relatively size), can also be to multiply by other value.In addition, in other embodiments, also can wait and judge whether portable terminal takes place effectively to rock by distance value that portable terminal moved or angle value.
S203: when detecting portable terminal and take place effectively to rock, start the interface in voice control and open the suspension icon;
In step S203, when calculating the velocity amplitude of portable terminal when rocking above threshold value, judge that promptly portable terminal takes place effectively to rock, portable terminal (for example starts the interface in voice control then, dial or contact person interface) demonstration one suspension icon, this suspension icon is the inlet of speech identifying function, promptly should the suspension icon be used to control the unlatching of speech identifying function; Preferably, the suspension icon is suspended on dial or the contact person interface in translucent mode, and display text on the suspension icon, for example " voice know mutual " etc.; Further, when the suspension icon just has been shown in dial or contact person interface, portable terminal can send " dripping " one to remind the user to use this icon better more in time.It is evident that, do not know can be when dial or contact person interface be opened the suspension icon by rocking as the user, or forget when portable terminal has this convenient function for the moment, also might be accidentally rocking during owing to operation trigger the suspension icon, therefore, the demonstration of suspension icon can be played the effect that the user is actively hinted, can increase the probability that the user uses voice interactive function.
S204: after the suspension icon is selected, enter the interactive voice operation of speech recognition interface to be correlated with;
Particularly, when the user selects the suspension icon of dial or contact person interface appearance by modes such as clicks, speech recognition interface appears on the screen of portable terminal, the user can operate by the interactive voice that this speech recognition interface is correlated with then, for example, the user wants to make a phone call or when sending short messages, can say contact person's name, and portable terminal is searched accordingly then; Perhaps, the user says and wants the telephone number transferred to, and portable terminal carries out speech recognition, transfers to automatically then.
S205: after the interactive voice operation is finished, withdraw from speech recognition interface, turn back to voice control and start the interface;
Particularly, carried out withdrawing from speech recognition interface after the relevant interactive voice operation, turned back to original dial or contact person interface, and keep suspension to be illustrated on dial or the contact person interface, so that the user can reuse the user.
S206: detect portable terminal once more and whether take place effectively to rock, if then hide the suspension icon;
Particularly, as step S202, whether detect portable terminal by gravity sensor once more takes place effectively to rock, if detecting portable terminal takes place effectively to rock, then hide the suspension icon, the user can operate at dial or the enterprising line correlation of contact person interface then, or withdraws from dial or contact person interface; Certainly, showing under the situation of above-mentioned suspension icon on dial or the contact person interface, also can directly withdraw from dial or contact person interface.
The embodiment of the invention is by after opening contact person or dial interface the user, utilize gravity sensor control interactive voice inlet (icon promptly suspends) demonstration with hide, can increase the probability that the user uses voice interactive function, reduce the loaded down with trivial details property of operation, and increase user's Experience Degree.
Fig. 3 shows the device structure schematic diagram of the portable terminal that one embodiment of the invention provides.Portable terminal 3 comprises detection module 31 and sound identification module 32.
Detection module 32, be used for (for example starting the interface when portable terminal display word sound control system, dial or contact person interface) time, detect portable terminal and whether take place effectively to rock, particularly, when portable terminal shows dial or contact person interface, rocking the front-back direction data and the time interval according to the detected portable terminal of gravity sensor, calculate the velocity amplitude of portable terminal when rocking,, judge whether portable terminal takes place effectively to rock then according to this velocity amplitude.
Opening module 33 is used for being in when effectively rocking state when detecting portable terminal, opens the suspension icon at dial or contact person interface.
Sound identification module 32 is used for when detecting portable terminal and take place effectively to rock the opening voice identification operation of interface to be correlated with.
Fig. 4 shows the device structure schematic diagram of the portable terminal that another embodiment of the present invention provides.Portable 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 is used for the display position of suspension icon on portable terminal carried out record.
Whether detection module 42 is used for when portable terminal display word sound control system starts interface (for example, dial or contact person interface), detect portable terminal and take place effectively to rock.
Display module 43 is used for starting interface display suspension icon in voice control when detecting portable terminal and take place effectively to rock, after this suspension icon is selected, and portable terminal opening voice identification interface.
Sound identification module 44 is used for when detecting portable terminal and take place effectively to rock the opening voice identification operation of interface to be correlated with.
Return module 45, be used for after the associative operation that speech recognition interface is carried out is finished, withdrawing from speech recognition interface, return voice control and start the interface.
Hide module 46, be used for detecting once more portable terminal and whether take place effectively to rock, if then hide the suspension icon.
Portable terminal 4 of the present invention is by when portable terminal shows dial or contact person interface, whether detect portable terminal takes place effectively to rock, and when detecting portable terminal and take place effectively to rock, open the suspension icon, can use interactive mode more easily with the hint user, after the suspension icon is selected, enter the interactive voice operation of speech recognition interface then to be correlated with, thereby can increase the probability that the user uses voice interactive function, reduce the loaded down with trivial details property of operation, and increase user's Experience Degree.
The display packing that it is pointed out that speech recognition interface of the present invention not only can be applicable in the portable terminal, also can be applicable in other equipment with voice interactive function.
Module or submodule among all embodiment of the present invention, can pass through universal integrated circuit, CPU(Central Processing Unit for example, central processing unit), or pass through ASIC (Application Specific Integrated Circuit, application-specific integrated circuit (ASIC)) and realize.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and what each embodiment stressed all is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For system embodiment, because it is similar substantially to method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above disclosed is preferred embodiment of the present invention only, can not limit the present invention's interest field certainly with this, and therefore the equivalent variations of doing according to claim of the present invention still belongs to the scope that the present invention is contained.