Single words can be also easily separated by the | symbol. You will end up with few capturing groups that are not used, but all will work just fine. How about different command structure?Īctually, there isn’t any harm in using the AutoVoice regex groups for this. + option should be used only at the end of the command, or put at least one word in between capturing groups. In my example, I’m using the preset values, as I know what lights I will be turning on and off. (?.+) if you are not sure what your option will be, and you wish to capture one or more character. I WANT TO TURN (? ON|OFF ) (? BLUE|RED|ALL ) LIGHT How to translate this: The command filter in the AutoVoice allows us to easily type this all in, however, we need to add AutoVoice regex groups to capture the words we need, and assign it to custom variables. ![]() The full version of this command, with all available options, would be: I WANT TO TURN ON A BLUE LIGHT! We already have an array for each word, however, this way you will be able to be more precise. I WANT TO TURN ON A BLUE LIGHT!ĪutoVoice regex groups allow you to assign part of the voice command to a custom variable. This would work, but the process is lengthy, tedious and there are better ways of doing it. The easy way of doing it is to have your command spoken and to have dozens of variants of your commands listed as profiles in AutoVoice. I can enable or disable light in each room, or turn them all off etc. ![]() For the sake of the example, let’s assume I have super-futuristic light control in my house. When is it useful? Each time you wish to have a voice command which can perform different tasks based on the words used in your sentence. I decided to put together a very quick tutorial on how to approach the commands like this. I have received a few inquiries about the AutoVoice regex groups.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |