From Tasker, choose the state profile, and then AutoVoice Recognized. Choose the option to act as event behaviour. You want to have it trigger for all commands. No trigger or command words are specified. This is both for simplicity, and because the triggers are instead located in the main task.
Once you have the event setup, you should now be given the option to create or pick a new task. Let's create a new task. This will be the main task launched when a command is given. All of the potential actions possible will appear directly in, or in a sub task that runs when this task is launched. Let's start with something simple for our first episode:
The first action of my Main task, called 'Lights,' is one that turns the display on. This is optional(and probably unnecessary anyway.)
If you do not have AutoVoice flashing the commands received, or it does not turn the display on when it does and you want it to, fell free
to add this. If you are using an Always Listening setup, your next action should be to turn this off. We will come back to this. Now, for the
first real action of you task we are going to use the Variable Set action, and create a global variable. As we progress in the series this being
a global variable will be more important. My variable is %VOICEX, though you can pick your own. Have at least 1 capital letter in your variable. The
variable set action you will do is Variable set %VOICEX to %avcomm.
The next action in your Main Task will be the first in your Home Automation setup. Hurray!!! We'll keep it simple and do our own version of "hello world." From the alerts, choose the 'Say' action. Pick what you want it to say. Next, check 'If.' We're going to use %VOICEX for the variable, set the argument to "Matches Regex," and then set a trigger word. I used 'are you there.' (no caps necessary in commands) Save and then exit. Test your command.
When I use mention in the video that I use a task that cycles Always Listening on/off via the up swipe gesture, one of the things not seen is how that is setup. What I recommend, if you use always listening, is you include setting a variable when always listening is on, and clearing it when always listening is off. If you do this, you can have the last action of your Main Task be an Always Listening On IF %Variable(your always listening variable here) is set. In this way, you can have Always Listening turn itself back on after the task runs, but stay off while your task is running, preventing things like responses from triggering other actions.