Hands-free automation: Tasker and AutoVoice Part 1
Tasker does a lot. And it does even more with plugins, of which the unofficial king is AutoVoice. AutoVoice brings new worlds of functionality to Tasker and whatever device it runs on. On newer phones, AutoVoice can add to the hands-free functions of Google Now with little effort. On older phones, AutoVoice can replicate much of Google Now and its hands-free functions. And while I've covered it before, repeatedly, today, we're gonna dive a little deeper into Tasker and AutoVoice.
Okay, Google Now… let's begin.
AutoVoice is a Tasker plugin by Joao Dias, who has devoted a lot of time and energy to AutoVoice. He has also developed a number of tutorials and use cases for it, which you can find on his YouTube channel as well as his website. The playlist above showcases his introduction into his plugin and is definitely worth a quick look.
Triggering AutoVoice
There are two major methods for AutoVoice, the first being using the traditional AutoVoice Recognize, and the second being pulling commands as they're given to Google Now. On any phone with 'OK Google' functionality or Touchless Control (yay, Moto X), the second method is simpler and in some cases much quicker. I've outlined the steps for this in Tasker tips and tricks, but basically, once you turn on Google Now integration in the AutoVoice app (or AutoApps, the subscription app that gets you into all of Joao's plugins), and follow the in-app instructions to ensure that it is in fact receiving Google Now commands.
Without this, we'll have to use AutoVoice Recognize, which isn't necessarily that hard, but it does mean you have an extra step for this all in that you'll need to place AutoVoice Recognized either on the home screen on have it triggered somehow, be it a gesture action or a trigger like Pressy. On my old ICS phone, my AutoVoice Recognize trigger was long-pressing the search capacitive button.
You'll also have to possibly configure the AutoVoice Recognize task depending on if you use a Bluetooth headset, length of listening time, language, et cetera. You hopefully won't need to tweak them, but they're here if you need them. For the purposes of this tutorial, I am not getting into Continuous Listening; we can save that for another day.
Get the top Black Friday deals right in your inbox: Sign up now!
Receive the hottest deals and product recommendations alongside the biggest tech news from the Android Central team straight to your inbox!
Creating an AutoVoice Profile
As with all other profiles, we have a task and a context. The task isn't important right now, but the context certainly is. This will be an Event context called 'AutoVoice Recognized'. Here, we will set our command filter, which is how AutoVoice will decide which profile it's going to trigger. Now, this will trigger every time you speak this word into AutoVoice Recognize or into Google Now (if that's your trigger method), so I wouldn't pick something boring or something you'd say for multiple things. For my example, I'm using the Command Filter of 'Perfect Day' because that's not exactly a common thing.
Now, after opening the context to configure it, we'll input our command filter up top before moving into the various options. I'm going to explain each one now rather than make examples for them all.
- Command Filter: This is where we choose the magic words that trigger the profile. The "Open Sesame" to the 40 thieves' den, if you will.
- Command Filter Invert: This will invert it, so every command lacking this phrase will trigger this profile. I'm not entirely sure why you'd ever want that, but I'm sure there's a use case I just haven't discovered for it yet. Here it is if you have something you want to trigger a lot.
- Speak Filter: If you don't trust the voice recognition that much, you can record your trigger here, so that — hopefully — it'll match up when you repeat your trigger in AutoVoice Recognize or Google Now. Also good for long triggers or lazy typers.
- Clear Filter: This clears the Command Filter, spoken and written, so as to allow a clean slate upon which to set your command.
- Exact Command: I must confess, I do not often use this. I especially do not use this when triggering through Google Now. For this setting, it means that this command will trigger once when the exact Command Filter and ONLY the exact Command Filter are spoken. Exact Command is also mutually exclusive to Contains All and Use Regex.
- Use Regex: This will employ regex pattern matching to try and match the Command Filter. I used this more when I was employing AutoVoice Recognize, but since I moved to Google Now, it's been replaced by Contains All. Use Regex is mutually exclusive to Exact Command and Contains All.
- Contains All: No matter what order or the length of the command, if all the words of the Command Filter are there, Contains All will ensure that it triggers and executes. I use this with Google Now triggering, and also because it gives me greater flexibility in my commands. Variety is the spice of life, after all.
- Precision: This setting determines how many variants of your command will be drawn from AutoVoice Recognize to match to commands. It is preset to 5 and can be adjusted up or down depending on your command complexity.
- Command ID: Command ID is one of the ways that Tasker can help keep itself from getting out of control with chained commands. The Command ID subsection is useful in precise sequences to ensure your voice commands don't skip steps without you. Here is where you set this profile's Command ID, and as this is something that will only be seen in the programming and never spoken aloud, feel free to get creative here.
- Last Command ID: In order for this profile to be triggered, the command ID set by previous profiles/tasks (Set Command ID is also a standalone action, if you need to set it before a series of commands). If the Command ID set by the previous profile is 'bunny' and the one this profile is looking for is "fox," it won't trigger.
- Last Command ID Regex: This will use regex pattern matching on the Last Command ID matching. Just in case you need it, but you probably won't.
- Last Command ID Invert: This profile will be be triggered only if it does not match the current Last Command ID. Invert here makes a little more sense than in the initial command.
- Trigger Word: This is the Trigger Word to activate the profile during Continuous listening in AutoVoice. Not being used today, but here's where it is, hiding at the bottom.
- Trigger Word Exact: Just as before, the trigger word must be exact to trigger it in Continuous with this setting. This is slightly more helpful if you've set continuous settings for very long periods of time.
- Trigger Word Regex: Use regex pattern matching for the trigger word, if needed.
You will not need all of these — or even most of these — in many cases. The Command ID section can help you group command together for things such as voice-replies to texts or email. The Trigger Word section can help Continuous listeners down the line. And the Command Filter is the regular trigger for the profile.
For our example, my Command Filter is "perfect day," I've enabled Contains All as I'm using Google Now, and I've set the command filter of 'at sea' for the upcoming profile that will follow this.
Now, we make that next profile. The Command Filter this time is "sunset," and I don't mind using so generic a Command Filter because of the Last Command ID being set to "at sea." Contains All is still enabled, though on a one-word Command Filter that's not as much of a necessity. We choose our task for the profile, and now to test.
'Ok Google Now… Perfect Day to be at sea…'
If all went well, our first task was triggered. And now...
'Ok Google Now… I cannot wait for sunset...'
And if all went well, our second task executed. However, if we haven't used the first command, then it's still safe to ask Google Now how long it is until sunset.
And this is just the bare, basic beginnings. In our next Tasker foray, we'll get up to a new level of AutoVoice versatility: replying to Hangouts messages via voice, something not even Moto Assist can do right now. In this method, we'll also be playing with Joao Dias's newest Tasker plugin, AutoInput. Do you already have AutoVoice? Or have you shied away from one of Tasker's most popular (and somewhat daunting) plugins? Do you have any totally boss projects made with AutoVoice? Feel free to show them off in the comments, and as always, feel free to request something else for us to do with Tasker down the road.
Ara Wagoner was a staff writer at Android Central. She themes phones and pokes YouTube Music with a stick. When she's not writing about cases, Chromebooks, or customization, she's wandering around Walt Disney World. If you see her without headphones, RUN. You can follow her on Twitter at @arawagco.