How i super-easily set up voice control

So I wrote my last explanation late at night and half-asleep, so I figured I would try again with a little clearer explanation :grin:

I only had a few lights/routines I wanted to control (named “living room lamps”, “mantle light”, “kitchen hanging lights”, and my garage door; and Good Night! and Leaving! routines), so I just made a separate Tasker profile for each one.

In Tasker, I set my Event for Plugin>AutoVoice>Recognized, then set up a keyword for the light/routine I was looking to control (“lamps” for the LR Lamps, or “Mantle” for the mantle light, etc.) and entered that as my Command Filter.

–For the mantle light, because I apparently don’t speak well enough for Google to always understand the word “mantle”, I went to Advanced (bottom of setup page) > Replacements and put in “mental=mantle,mantel=mantle” (without the quotes) to make sure it corrected any of these that were picked up. I figured those out by trial & error.

Next, I set up my Task as Plugin>SharpTools>A Thing and chose the light I wanted to control with the command set to Toggle. For the routines, I just picked “A Phrase” from the Sharptools plugin list, and chose which I wanted to run.

To make my “Bed Time” Command Filter work for Good Night!, I checked the box in the AutoVoice setup for “Contains All” - which allows for me to say “bed time”, “time for bed”, etc. and have it work as long as both “bed” and “time” are included in the command.

And that’s all it took. Just make a new profile for each light/object you’re looking to control (time consuming, but not terrible in the long run) and you’ve got voice control. I can say “OK Google, turn on my mantle light and living room lamps” and it will hit them both (keying on “mantle” and “lamps”).

As long as you get creative with your keywords, you could add as many as you want (or group them, with multiple tasks for a command).

3 Likes

Hi, you can try poor´s man echo , It use tasker and tasker now, automate works too but its slow when play a external sount, tasker is faster.

all the config its made inthe smart app, then you dont need to set each device word it use the name of the device

I have setup English and Spanish language

[RELEASE] Poor Man's Echo (Ok Google), A cheap way to control the house by voice

1 Like

'Press a button on the speaker"… inconvenient. Someone (aside from Amazon) has to build a cheap BT speaker where the mic is always on. Shouldn’t be that difficult.

I’ve sorta lost track of my project as the nice weather hit. So my motion sensor on the washing machine is regularly reporting a completed cycle, even when not running… but I don’t care lol

1 Like

The problem has always been the privacy implications of always-on speakers. People freak out because they think the things are spying on them – which they probably are, but I digress :slight_smile:

For me the problem with this is, for each new item I will need to setup a new profile. In terms of autovoice and regex I might go another route and use a custom program to parse the voice input. haven’t been able to properly do what I need from autovoice yet. Currently experimenting.

you can have actual alexa integration, however as of now, to legitimately follow their terms of service, they won’t allow an “always listening” device. That’s not to say that those devices don’t already exist or that there aren’t “ok google” workarounds to launch an alexa listener. For example one of the phone apps available starts listening when you lift it to your ear. Another one actually does always-on listening and i use that one although i don’t have that function enabled since always-on listening affects battery, no matter if it’s alexa or google. His latest update (the app is “alexa listens” works with android gear as well.

i understand completely. I put a motion sensor in my laundry room and it seems to be getting triggered by the ac vent.

I’ve done some auto voice regex. I’m having small but interactive conversations with it:
Me: ok Google, is the garage open?
Autovoice: the garage is closed. Would you like it opened?
Me: yes.
(!5 seconds elapse)
AV: the garage is now open. Will there be anything else?
Me: no.

Note that after my first inquiry, AV stays in “always listening” mode until the end of the interaction so I don’t have to say “ok Google” every time. Until that occurs I can speak any one of my custom commands and it handles them. Once it hears ‘No’ as the response to the last question, it turns off the AV “always listening” mode and returns to Google’s always-on mode.

It might be possible, via some special trigger word, to get the initial inquiry to multitask - that is, to do both a Google inquiry AND an autovoice command or inquiry. I doubt it would be possible later in the ‘conversation’… but it might be possible to string together multiple autovoice regex functions in a single statement. So that perhaps, at the end of the above conversation:

AV: the garage is now open. Will there be anything else?
Me: please turn on the front porch light, and dim the corner lamp."
(Lights get switched and dimmed respectively)
AV: the front porch light is now on, and the corner lamp is dimmed. Will there be anything else?
Me: no.

2 Likes

well, from what I can understand from searching online, autovoice is supposed to technically match 2 profiles if I say it as one command… but it doesn’t do that. I’ve been trying to parse the data but been running into headaches. Will try further this weekend, if I make no progress I might just make a custom solution.

Check this out, it might help with your issue:

I know multiple commands can be strung together, I just don’t know if multiple regex commands can work.
Won’t test it til Autumn though.

1 Like

I’ve already checked it. The problem that I am having is once a regex command filter is recognized, I can’t get any further data from that command. Variables spit out nothing.

Hmmm. It would likely have to accept the commands themselves in their entirety as variables, then parse out the command and store each specified item as a variable, then… nope, it’s gonna become far too complex for the benefit derived. Would be impressive to accomplish. But I’ll have to get really bored (and probably a bit drunk or something) this coming winter to really take a stab at it.

I think it would be easier to just make a separate app to do it. Any other way I can come up with seems overly complicated. It might be something I do in my free time.

Can you show us how you did that? Maybe export as xml in tasker?

This should get you going in the right direction: http://sharptools.boshdirect.com/examples/voice-query-get-current-state-of-attribute

1 Like

With the help of the creator of autovoice (well he sent it to me line for line) I have one that works if the turn on and turn off commands are used specifically. It doesn’t use regex. (i.e: Turn on basement lights and kitchen lights and turn off living room lights). I am seeing if can change it to accept other speech patterns such as “Turn the basement and kitchen lights on and the family room lights off.”

I am copying and pasting what I was sent below (I did not make this, credit goes to the maker of autovoice android app):
Check this out: Test AutoVoice (11)
A1: Variable Set [ Name:%command To:turn off living room and kitchen and turn on tv Do Maths:Off Append:Off ]
A2: Variable Split [ Name:%command Splitter:and Delete Base:Off ]
A3: For [ Variable:%commandpart Items:%command() ]
A4: Variable Search Replace [ Variable:%commandpart Search:\A\s+|\s+\z Ignore Case:Off Multi-Line:On One Match Only:Off Store Matches In: Replace Matches:On Replace With: ]
A5: If [ %commandpart ~R ^turn ]
A6: Variable Split [ Name:%commandpart Splitter: Delete Base:Off ]
A7: Variable Set [ Name:%lastonoroff To:%commandpart2 Do Maths:Off Append:Off ]
A8: End If
A9: Variable Search Replace [ Variable:%commandpart Search:turn %lastonoroff Ignore Case:Off Multi-Line:Off One Match Only:Off Store Matches In: Replace Matches:On Replace With: ] If [ %lastonoroff Set ]
A10: Flash [ Text:%commandpart: %lastonoroff Long:Off ]
A11: End For

1 Like