Issue w/Say Commands - Next Task starting too soon

159 views
Skip to first unread message

hollywoodfrodo

unread,
Nov 20, 2014, 1:09:22 AM11/20/14
to tas...@googlegroups.com
Basically creating my own Voice Assistant using Tasker and AutoVoice (and several other AutoApps).  The issue I'm facing is that when I have a task that ask for several user voice inputs via a Say Commands that are then followed by AutoVoice Voice Input activity, the Voice Input is executing while the Say activity is still speaking the phrase.  In all cases I have already unchecked "Continue Task Immediately".  

This was working great when I first set it up but started having this issue in the last week or so and I can't figure out how to fix it.  It renders the profile useless to do what it was set up to do as the Voice Input ends up hearing the Say Task which is asking for input.

Any help is appreciated.

Jeremy Harris

unread,
Nov 20, 2014, 6:32:08 AM11/20/14
to tas...@googlegroups.com
It sounds like you shouldn't have to do this but I would try a Wait Until %SPEECH is not set.

Jeremy Harris

unread,
Nov 20, 2014, 8:45:41 AM11/20/14
to tas...@googlegroups.com
Also, out of curiosity, are you using a nested child task to perform your Say actions? I have just dealt with these exact symptoms and resolved my issue, but yours may be different. Can you export the description?

hollywoodfrodo

unread,
Nov 20, 2014, 12:50:01 PM11/20/14
to tas...@googlegroups.com
If by nested, you mean via an If/Else set then, yes!  That's exactly what I'm doing and where the issue seems to be.

Say "What would you like the text to say?"
Autovoice - Listen
Set Voice input to %fff
Say "Text says %fff - should I sent it"
Autovoice - Listen
Set Voice input to %nnn
If %nnn = Send
    Command to send a text
If %nnn = Add
    Execute command to get more voice input and add it to %fff
If %nnn = Change
     Execute command to erase %fff then go back to step 1
If %nnn = Cancel
    Execute command to erase %fff and end task

Hopefully your solution will work for me.  Eager to hear it!

Jeremy Harris

unread,
Nov 20, 2014, 1:44:58 PM11/20/14
to tas...@googlegroups.com

If by nested, you mean via an If/Else set then, yes! 

Actually, I was wondering if you were using the Perform Task action to call a separate task that performed your Say actions.  My issue appears to have been different.

Say "What would you like the text to say?"
Autovoice - Listen
Set Voice input to %fff
Say "Text says %fff - should I sent it"
Autovoice - Listen
Set Voice input to %nnn
If %nnn = Send
    Command to send a text
If %nnn = Add
    Execute command to get more voice input and add it to %fff
If %nnn = Change
     Execute command to erase %fff then go back to step 1
If %nnn = Cancel
    Execute command to erase %fff and end task

For the most part it looks like your logic is okay, aside from a small thing or two that shouldn't be related.  If you actually export the description of your task (not XML) and post it here, it'll be much easier to help you identify a problem.

I think that if you add a Wait Until [1 sec, %SPEECH isn't set] in between your Say action and AutoVoice Recognize action, it should solve your problem.... However I also think that this should not be necessary, according to what you've said so far.

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/Ntfv99kCjeI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

hollywoodfrodo

unread,
Nov 20, 2014, 3:40:18 PM11/20/14
to tas...@googlegroups.com
Okay, here's the exported profile for your enjoyment.  I haven't had a chance to try the Wait Until yet, but I'll give that a go after work.  If you see anything else based on the below that might help, let me know.

Profile: Text Msg Command (11)
Event: AutoVoice Recognized [ Configuration:Command: "(?<textstart>send a|new) (?<textcont>text message|text) to (?<name>.+) (regex)" ]
Enter: Text Msg (10)
A1: AutoContacts [ Configuration:Contact Name or Nickname: %name
Name as Nickname: true Package:com.joaomgcd.autocontacts Name:AutoContacts Timeout (Seconds):1000 ]
A2: Say [ Text:New text to %acname via %acnumbertype. What would you like to say? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A3: AutoVoice Recognize [ Configuration:

Prompt Text: Text Msg...
Voice command without headset
Voice command using last headset configuration
Command: "all"
Error if Not Recognized: true
Don't Trigger Conditions: true Package:com.joaomgcd.autovoice Name:AutoVoice Recognize Timeout (Seconds):120 ]
A4: Variable Set [ Name:%textmsg To:%avcomm Do Maths:Off Append:Off ]
A5: Say [ Text:Message to %acname reads. %textmsg . Shall I send it? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A6: AutoVoice Recognize [ Configuration:

Prompt Text: Send it, Change it, Add to it, or Cancel it.
Voice command without headset
Voice command using last headset configuration
Command: "all"
Error if Not Recognized: true
Don't Trigger Conditions: true Package:com.joaomgcd.autovoice Name:AutoVoice Recognize Timeout (Seconds):120 ]
A7: If [ %avword1 ~ send | %avword1 ~ yes ]
A8: AutoRemote Message [ Configuration:Recipient: Droid Turbo
Message: text message =:= %acnumber =:= %textmsg Package:com.joaomgcd.autoremote Name:AutoRemote Message Timeout (Seconds):200 ]
A9: Say [ Text:Sending Your message to %acname. Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A10: Else If [ %avword1 ~ change ]
A11: Variable Clear [ Name:%textmsg Pattern Matching:Off ]
A12: Say [ Text:Okay. I have erased that message. What would you like to say to %acname? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A13: Goto [ Type:Action Number Number:3 Label: ]
A14: Else If [ %avword1 ~ add ]
A15: Say [ Text:Okay. What would you like to say next? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A16: AutoVoice Recognize [ Configuration:

Prompt Text: Text Msg...
Voice command without headset
Voice command using last headset configuration
Command: "all"
Error if Not Recognized: true
Don't Trigger Conditions: true Package:com.joaomgcd.autovoice Name:AutoVoice Recognize Timeout (Seconds):120 ]
A17: Variable Set [ Name:%textmsg To:- %avcomm Do Maths:Off Append:On ]
A18: Say [ Text:Your message to %acname now reads. %textmsg . Shall I send it? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A19: Goto [ Type:Action Number Number:6 Label: ]
A20: Else If [ %avword1 ~ cancel | %avword1 ~ no ]
A21: Variable Clear [ Name:%textmsg Pattern Matching:Off ]
A22: Say [ Text:Okay. I have canceled your message to %acname . Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A23: Else
A24: Say [ Text:I'm sorry. I didn't get that. Do you want to send the message? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A25: Goto [ Type:Action Number Number:6 Label: ]

Jeremy Harris

unread,
Nov 20, 2014, 7:53:30 PM11/20/14
to tas...@googlegroups.com

I'm sorry...I don't know what's wrong...I've tried recreating by making a Say action with a lot of text so it has to run a while before running av recognize, but my Say action completes all the way. A screenie with my runlog is attached and you can see the Say action runs for 10 seconds, whether or not av recognize is activated or deactivated.

Does this happen at each Say action or just one of them?

Hopefully my earlier suggestion works for you. I'm interested, but I'm afraid I also might be out of ideas...

--
Screenshot_2014-11-20-19-42-49.png

Jeremy Harris

unread,
Nov 20, 2014, 8:01:51 PM11/20/14
to tas...@googlegroups.com

I put the wrong pic. Here you go...

Screenshot_2014-11-20-19-38-13.png

hollywoodfrodo

unread,
Nov 21, 2014, 2:49:13 PM11/21/14
to tas...@googlegroups.com
Thanks - it doesn't always happens, but then when it does start happening, it seems to happen every time until I completely exit the task and often on firing it subsequent times. But then another completely different time it may not happen at all. 

Gonna add in the %SPEECH set configuration and see if that both fixes the issue and doesn't cause any others.

Appreciate your help - I'll let you know how it goes.

hollywoodfrodo

unread,
Nov 22, 2014, 12:27:22 AM11/22/14
to tas...@googlegroups.com
This is STILL not working.  Adding the "Wait Until %SPEECH is not set" has absolutely no affect.  It still rushes on to the next task which is AutoVoice Recognize while the Say command is still being executed.

I was thinking maybe it had something to do with the 3rd Part Text-to-Speech engine I use, so I changed over to the built in Google Text-to-Speech engine, but same issue.

Of course I tried re-starting the tablet but that didn't help either.

Anybody have any ideas?  Pent?  Anyone else had this issue?

I'm using this on a Asus Tablet running Android 4.4.2



On Wednesday, November 19, 2014 10:09:22 PM UTC-8, hollywoodfrodo wrote:

hollywoodfrodo

unread,
Nov 22, 2014, 1:16:43 AM11/22/14
to tas...@googlegroups.com
FYI - I have this same profile on my phone and it works fine on there still - no issues.  So it's something to do with it on my Tablet though I don't know what...

Matt R

unread,
Nov 23, 2014, 4:02:24 AM11/23/14
to tas...@googlegroups.com
Sounds like a ROM issue, like the OS is saying the speech is completed before it actually is.

Matt

Jeremy Harris

unread,
Nov 23, 2014, 11:55:19 AM11/23/14
to tas...@googlegroups.com
I would have to agree with Matt. It seems to me that your tasks are built correctly, and I don't think many others have reported this experience with your action sequence, so I'm not confident it's along the lines of a Tasker/Android Version bug...must be ROM related.

hollywoodfrodo

unread,
Nov 23, 2014, 10:35:04 PM11/23/14
to tas...@googlegroups.com
That would suck since I'm using the stock Asus ROM and therefore can't change it.  The odd thing is that it was working great for a while, then started this issue... And they haven't updated the ROM in over a month.  Well, I'll play around with it some more and see if I can figure something out.  Thanks for the input!

hollywoodfrodo

unread,
Apr 10, 2015, 12:59:58 AM4/10/15
to tas...@googlegroups.com
Still looking for help with this.  Facing the same issue not only on my Asus Tablet on KitKat but also on my Moto Droid Turbo on KitKat.  I've tried everything... Tasker simply is NOT waiting for the say command to be finished  before it moves on to the next task in the list.  I've tried inserting a 1 second Wait command after every Say command.  I've tried switching from my 3rd Party Voice Engine to the built in Google TTS. Nothing works.  It seems that there must be an issue with the Say Command, yet I don't see a hundred posts here about it which leads me to believe everyone isn't having this issue.

So I'm thinking it has something to do with successive Say Commands in the same Task list???  I don't know, but I'm out of ideas and the fact that it does the same thing on both my Asus Tablet and Moto Phone makes me think it's gotta be some issue with the Say Command possibly related to KitKat but maybe just related to the way Tasker handles multiple Say commands in the same task list???  Hoping to get some help before I go batty with this profile. haha

Rich D

unread,
Apr 10, 2015, 6:35:58 AM4/10/15
to Tasker Google Groups Post


Check out this post from this group, I think it may be what you are looking for.

'make popup stay just while %speech is set'

hollywoodfrodo

unread,
Apr 12, 2015, 1:15:52 AM4/12/15
to tas...@googlegroups.com
I tried that "while speech is set" thing. It didn't work. However, I think I MIGHT have found the culprit. The "respect audio focus" which is checked in by default. I'm still testing but although it doesn't seem like it would have such a huge negative effect, it looks like that might have been what was causing the say commands to not behave properly...

Jimmy Nejmeh

unread,
Apr 12, 2015, 7:58:58 AM4/12/15
to tas...@googlegroups.com
I have this same problem with my Moto X (2013). I've found the only way to prevent this from happening is to add a "Wait Until %SPEECH is not set" action immediately after the Say action. This works about 95% of the time but I still have seen a few cases where a Get Voice action will appear before the Say action is done. But before I added the Wait Until action, the Get Voice action would pop up about 50% of the time before the Say action was finished.

Jimmy Nejmeh

unread,
Apr 12, 2015, 8:03:03 AM4/12/15
to tas...@googlegroups.com
By the way I know that is what Jeremy Harris suggested earlier (that is how I found out about it!). Just sharing my experience with the Say action followed by a Get Voice action.

John Faire

unread,
Apr 26, 2015, 4:42:26 PM4/26/15
to tas...@googlegroups.com
well, I'm having the same exact problem. Worked for a while, and now works only conflicting with the voice prompt about 50% of the time.

I was redirected here from another tasker group thread of my own. The two issues they were saying were that "wait until %SPEECH not set" and the "respect audio focus" thing.

I'm really trying here, but can't seem to figure it out. I'd like to learn the results of what the "respect audio focus" did?

I have a stock ROM Moto X 2013

John Faire

unread,
Apr 26, 2015, 4:50:18 PM4/26/15
to tas...@googlegroups.com
Did you get the respect audio focus to help with the problem?

I thought that if this was checked, it would make it so the audio stream via the tasker task would be the main app playing that stream and lower the volume of the other stream currently playing while the task is working. Unchecked and it would play all streams simultaneously by all apps currently playing them. As with your music app playing a song on speaker and and the tasker say speaking over it.

Jimmy Nejmeh

unread,
Apr 26, 2015, 5:30:31 PM4/26/15
to tas...@googlegroups.com
I never changed the "Respect audio focus". I just use the " Wait until %SPEECH is not set". Its not perfect either but works most of the time. I see you have a Moto X also. I'm thinking this is related to our phones cause if it were a Tasker issue I would think there would be many more complaints about it.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages