United Kingdom
Asked — Edited

Waitforspeech Question

I have a problem using WaitForSpeech - I wonder if you could please advise DJ?

On my Win7 computer it does not work at all - there is no timeout the seconds variable gets ignored and the WaitForSpeech just runs through without a wait? I do see the timeout box very briefly. General SR works on this Win7 computer but I can only use it on US and not GB.

On my Win10 computer the same script works perfectly and the timeout window stays on the screen and counts down, so there is no problem here?

On the Win7 computer I then updated to the latest release (in case it was a previous bug) but this has made no difference.

Here is the script in question (which I borrowed from Rich)


:start
SayWait("What is 4 times 4")
$response = WaitForSpeech(10, "10", "12", "14", "16")
If($response = "16")
  SayWait("Corect")
  Goto(nextquestion)
Else
  SayWait("sorry that is incorrect, please try again")
  Goto(start)
EndIf
:nextquestion

Here is screendump of bottom of the Win7 screen.

User-inserted image

Thanks for your help

Tony


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

PRO
USA
#25   — Edited

Dave, that was my whole point to have it stop, I can always click it again to play.

The right answer also ends the script - if you want to keep going, just click it

anyway, I was just exploring WaitForSpeech try it in a script

A simple script that answers the question or not is:

SayWait("What is 4 times 4") $response = WaitForSpeech(10, "10", "12", "14", "16") if($response = "16") SayWait("Corect, 16 is the answer") Stop()

else SayWait("sorry that is incorrect, please try again")

endif