I'm writing a script that will allow JD to give a short & simple math quiz to 6th grade special education students (my wife is a special ed teacher).
A challenge I have run into, is with converting the spoken text into a numeric value. For example:
$response = WaitForSpeech(30, "4", "3")
Is not detecting when 4 or 3 is spoken, however when I use:
$response = WaitForSpeech(30, "Four", "Three")
The response is detected and the value is stored as a string, but I can't do any math with it. I would like to actually perform calculations based on numbers provided by the student.
$answer = $response + 3
Any thoughts on how I can approach this differently?