Author Topic: Time Delay Loop awaiting an Answer ! ! !  (Read 2665 times)

pscammp

  • Guest
Time Delay Loop awaiting an Answer ! ! !
« on: June 28, 2018, 11:29:36 AM »
Hello all,
    I give up....I need your help !

Custom Command.....

ASTRA asks me a question and she needs 'Yes' or 'No'......

I have a 5 second loop running awaiting one of the answers above incrementing a Decimal variable by 0.1 each time around. A 'Cancelled' sound is played if time runs out.

How do I get VA, while this loop is running to monitor the Microphone for my answer   ?????

Pease Please Please

Many Regards
Paul 


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Time Delay Loop awaiting an Answer ! ! !
« Reply #1 on: June 28, 2018, 11:07:05 PM »
If you're running beta v1.7.0.12 or higher, you can use the "Wait For Spoken Response" action which is designed to do exactly this.

Otherwise you'll have to use you can use dictation, though that's much more cumbersome, and less likely to actually recognize what you're saying(especially with short words).

E.G.
Code: [Select]
Start Loop While : [DictationComplete] Equals False
    Start Dictation Mode (Clearing Dictation Buffer)
    Start Loop While : [{DICTATION}] Equals ''
    End Loop
    Stop Dictation Mode
    Begin Text Compare : [{DICTATION}] Contains 'Yes'
        Write [Purple] 'Yes' to log
        Set Boolean [DictationComplete] to True
    Else If Text Compare : [{DICTATION}] Contains 'No'
        Write [Purple] 'No' to log
        Set Boolean [DictationComplete] to True
    Else
        Say, 'Please say "Yes" or "No"'
    End Condition
End Loop


EDIT: Exergist makes a good point, in that you can also use a separate "[yes;no]"(or similar) command to set a variable that's monitored by your command, though I'd also recommend either using the beta or waiting for the full release that included the "Wait For Spoken Response" action.
« Last Edit: June 28, 2018, 11:18:26 PM by Pfeil »

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: Time Delay Loop awaiting an Answer ! ! !
« Reply #2 on: June 28, 2018, 11:14:27 PM »
Beat me to it Pfeil  ;)

@pscammp there are other ways to do it as well but they're a bit more complicated and require more than one command. If you are concerned about trying out the beta I believe Gary is nearing the next full release (though he'll have to comment about that).

pscammp

  • Guest
Re: Time Delay Loop awaiting an Answer ! ! !
« Reply #3 on: June 29, 2018, 07:16:34 AM »
Thanks so much guy's

I'll have a look at the beta for sure

<---- Not scarred of no BETA

LOLOL

Regards
Paul

pscammp

  • Guest
Re: Time Delay Loop awaiting an Answer ! ! !
« Reply #4 on: June 30, 2018, 03:37:13 AM »
 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D

WOOooooo HOOOoooooo

"Wait For Spoken Response"

What a tool, took a little time to work out exactly how to use it but my loop setup has gone bye bye, this fantastic little tool does the lot in one neat package. I have it loaded with 5 different answers which would = 'Yes' and 5 different ones which would = 'No'. All work flawlessly and I got what I wanted.

My imagination is now going wild over what we're going to be able to do with this one tool ! ! !

My Compliments and thanks very much from a very happy customer

Paul