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)Code:
: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.
Thanks for your help
Tony
Asked
— Edited
Or is it possible the error is pointing towards the list array, perhaps because on the Win7 it is less forgiving (my guess, apologies if it is bad/wrong guess) that the WaitForSpeech array has a mix of string variables and integers since the first 10 does not have quotes around it.
This is because that error is related to compiling the ezscript after it has been edited. It's an internal error that should never ever ever happen. Hence why it also reads "strange,..." because the exception handler knows it's weird error.
I'm going to put a new ARC online today that has additional debug information about this scenario. however, I don't have a solution to suggest yet because I can't understand it.
My first instinct was that there were two controls running. My second is wondering if the script is a script manager.
Other than that, the error and situation, I beleive, is actually unrelated to wait for speech and instead is related to the pre-compile after edit.
@Tony, can you also verify that the script is not running via a ControlCommand() WHILE it is being edited in the edit window?
Tony, just wondering, what version of .NET framework is on your Win7 system?
BTW Tony, I like your script sample, I've never seen that 10 second count down used that way before in WaitForSpeech, that's nifty!
Please send the project file from the windows 7 machine. Do not send a duplicate copy of the file from another computer.
thanks
please respond to each of the three requests - thanks!
But, in that specific case, it will actually say the reason - which would be something like "MISSING ENDIF". Such as in your case.
So far, @tony is the person to have created an error that i cannot trace. Mostly due to the fact the ARC instance is a few months old. Once @tony upgrades to the recent version, then i will be able to begin tracing the origin.
I use 3 computers here using ARC, the Win7 PC that exhibits this problem has Version 2017.02.05.00 so it was the latest until this release. I have now updated to your latest debug version and the issue is still there.
I cannot find the ATTACH FILE feature that you mentioned, is it the .rtf file that you are looking for?
I can confirm that the script is not running via a controlcommand
Tony
Attached is the simple project from the Win7 computer that gives/shows the WaitForSpeech issue. The issue does not occur on my Win10 computers with the same project.
Tony
speech.EZB
I get the same issue running your project on my Win7 laptop, haven't yet try it on Win10.
Chris.
Quick feedback (work call in 5 minutes)... i can't help debugging the ARC/SAPI calls.
SAPI API is not good with optional parameters... or guessing. I believe is a combination of how ARC initializes the SAPI recognizer and windows user settings.
@Tony
If you have TeamViewer i can try later or tomorrow pls drop me an email.
I tried Tony's project with a Windows 10 and is working now.
PS:
Tony's away until next week.
It only popped its head under certain circumstances. Perhaps with certain cpus or architecture. Who knows how the Action factory in windows works behind the scene
I tried some old code from 2017, ToyMaker. I edited it so it would not keep asking - added a stop command, lol
Don't understand why he had a "nextquestion" in his code, so I commented that out also
:start
SayWait("What is 4 times 4")
$response = WaitForSpeech(10, "10", "12", "14", "16")
if($response = "16")
SayWait("Corect, you got it right")
Stop()
# Goto(nextquestion)
Else
SayWait("sorry that is incorrect, please try again")
#Goto(start)
endif
#:nextquestion
works well
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