Disclosure of Invention
The technical problem to be solved by the invention is as follows: in view of the above existing problems, a method for implementing game control by voice on a television device is provided, which includes:
step 1: starting a game module on the television equipment; when the television equipment detects that the voice key is triggered, starting the voice input equipment;
step 2: the voice input equipment receives a voice instruction of a user to obtain voice data, and then the voice data are transmitted to the voice conversion module;
and step 3: the voice conversion module converts the voice data into text data; and transmitting the text data to a game module;
and 4, step 4: the game module matches the text data with the commands in the game control command set to obtain game control commands and execute the game control commands; after that time, the user can use the device,
and (5) circulating the steps 2-4 until the game is finished.
Preferably, instep 1, after the game module and the voice input device are started, the game module controls the television screen to display an interface for prompting the user to perform voice input.
Preferably, when the voice conversion module converts the voice data into text data instep 3, the voice input device stops receiving the next voice input of the user, and the game module hides the interface for prompting the user to perform voice input.
Preferably, in step 4, if the game module cannot complete the matching between the text data and the game control command, the process returns to step 2 to start the execution.
Preferably, the game module is a field main game module; the game comprises four states of a starting stage, a dealing stage, a calling stage and a dealing stage; corresponding to a starting stage, a calling stage and a card-out stage, wherein the game control commands comprise a starting stage command, a calling stage command and a card-out stage command; and (4) the game module checks the game control command obtained by matching in the step (4) according to the game state, and if the game control command does not correspond to the game state, the game module returns to the step (2) to execute again.
Preferably, in the card calling stage and the card discharging stage, the game module further checks the game control command obtained by matching in the step 4 according to the game rule, and if the game control command does not accord with the rule of the current game state, the game module returns to the step 2 to execute again.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:
the method for controlling the game by voice is realized on the television, the operation of playing the game on the television is simplified, and the familial and exciting playability of the game is improved.
Detailed Description
All of the features disclosed in this specification, or all of the steps in any method or process so disclosed, may be combined in any combination, except combinations of features and/or steps that are mutually exclusive.
Any feature disclosed in this specification may be replaced by alternative features serving equivalent or similar purposes, unless expressly stated otherwise. That is, unless expressly stated otherwise, each feature is only an example of a generic series of equivalent or similar features.
Referring to fig. 1, an embodiment of the present invention includes:
step 1: starting a game module on the television equipment in a standard input mode and an application starting mode of the television equipment; when the television device detects that the voice key is triggered, the voice input device of the television device is started.
The standard input mode is that a remote controller is used for controlling television equipment like the prior art, a game application program (or called a game module) is found, and the game is started.
The voice input equipment is self-contained on television equipment, such as a microphone and other equipment; the voice key can be a button on a remote controller and is used for controlling the opening and closing of the voice input device.
Step 2: the game module controls the television screen to display an interface for prompting a user to input voice;
and step 3: the voice input equipment receives a voice instruction of a user to obtain voice data, and then the voice data are transmitted to the voice conversion module; the speech conversion module may be implemented by an existing speech engine.
And 4, step 4: the voice conversion module converts the voice data into text data; and transmitting the text data to a game module;
and 5: and the game module matches the text data with the commands in the game control command set to obtain game control commands and execute the game control commands.
The game control instruction set is a predefined set of game control instructions, and the game control instructions may be regular expressions supported by java and other languages, for example, a game module is developed by java language. And the game module matches the text data with the commands in the game control command set by using a regular expression matching and character string operation mode to find out the game control commands corresponding to the text data.
And then, the steps 2-5 are circulated until the game is finished.
In another embodiment of the present invention, when the voice conversion module in step 4 is converting the voice data into text data, that is, the voice conversion module is working, to avoid collision, the voice input device stops receiving the next voice input of the user, and the game module hides the interface for prompting the user to perform voice input, so as to remind the user that voice input cannot be performed currently.
In another embodiment of the present invention, a fault tolerance function is added, specifically, on the basis of the foregoing embodiment, instep 5, if the game module cannot complete the matching between the text data and the game control command, that is, the game module cannot find a command matching therewith in the game control command set through regular expression matching and character string processing, it is determined that the voice command corresponding to the text data is incorrect, and the step 2 is returned to start execution until the user re-inputs a voice command meeting the rule. In order to enable the user to quickly know the voice operation, the voice operation rule of the user can be displayed somewhere on the game interface, and the voice operation rule can also be provided for the user in the form of a help file.
In yet another embodiment of the present invention, the gaming module is a landlord gaming module. It is known that a landlord game includes four states, a start phase, a deal phase, a call phase and a deal phase. Wherein,
the starting stage is mainly used for finishing basic interfaces for displaying games, and the basic interfaces comprise common settings such as setting, helping, starting the games, quitting the games and the like.
A card dealing stage: a stage of dealing the playing cards to the player's hands after the user has started a game.
A card calling stage: and after the dealing is finished, determining the identity of the landholder or the farmer of the player.
A card-playing stage: and (5) determining the normal card-playing stage after the relation between the landowner and the peasant is determined.
Then the game control commands include a start phase command, a call phase command, and a discard phase command for the three game states of start phase, call phase, and discard phase. As shown in fig. 2, 3 and 4. Wherein, the card-playing command is divided into a basic card-playing command and a combined card-playing command. The basic commands mainly include simple card-out commands such as one, one pair, three, four designated cards, etc., see fig. 2; the combination commands mainly include sequential, coupled, airplane, multi-band, etc. controls, see fig. 3.
In order to further provide the fault-tolerant capability of the method of the present invention, in this embodiment, the game module checks the game control command obtained by the matching instep 5 according to the current game state, and if the game control command does not correspond to the game state, for example, the user inputs a voice command corresponding to the card-out stage in the beginning stage, the step returns to step 2 to be executed again. In the card calling stage and the card discharging stage, the game module also verifies the game control command obtained by matching in thestep 5 according to the game rule, if the game control command does not accord with the rule of the current game state, for example, the voice command of the user is '4 minutes' in the card calling stage, and if the voice command of the user is '… pairs' in the case of 1 card being discharged from the opposite side, the game module also returns to the step 2 to be executed again.
The invention is not limited to the foregoing embodiments. The invention extends to any novel feature or any novel combination of features disclosed in this specification and any novel method or process steps or any novel combination of features disclosed.