Author Topic: Wait for Spoken Response Timeout Loop ?  (Read 1708 times)

scottb613

  • Newbie
  • *
  • Posts: 32
Wait for Spoken Response Timeout Loop ?
« on: December 19, 2018, 08:26:54 AM »
Hi Folks,

Question: I've used "Wait for Spoken Response" - trying to get a little fancier... I'm using the command for VA to emulate a copilot in an aircraft reading various checklists... I see that VA stores the user response to the command in a "text" variable... How would I get VA to repeat the command if the TIMEOUT is reached without response... Obviously I need some type of loop established and the test for what's in the respective text variable ? Could someone provide a brief example ?

If a proper response is given - just move directly to the next checklist item...

Actually - this would be a handy feature to add to the function via a radio box option or something ?

[Repeat Until Acknowledged]

Thanks...

Regards,
Scott

« Last Edit: December 19, 2018, 11:09:50 AM by scottb613 »

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: Wait for Spoken Response Timeout Loop ?
« Reply #1 on: December 19, 2018, 12:41:44 PM »
Perhaps this is what you're looking for:

Code: [Select]
// Loop while ~~response is NOT set
Start Loop While : [~~response] Has Not Been Set
    // Wait for spoken input from user (stored in text variable ~~response, wait 15 s, uncheck 'Continue on any Speech')
    Wait for spoken response: 'affirmative;negative'
    // Check if user did NOT provide a valid response
    Begin Text Compare : [~~response] Has Not Been Set
        // Output info to event log
        Write [Red] 'No valid response provided within time limit' to log
    End Condition
End Loop

Keeping 'Continue on any Speech' unchecked will require the user to provide one of the predefined responses before the actions may continue.

scottb613

  • Newbie
  • *
  • Posts: 32
Re: Wait for Spoken Response Timeout Loop ?
« Reply #2 on: December 19, 2018, 01:56:41 PM »
Hi...

Thanks so much for taking the time - yep - I think that gives me enough to run with...

Much appreciated...

Regards,
Scott