GlovePie speech recognition

GroG:  

Here's the link where you can download the program:    http://glovepie.org/glovepie_download.php

And here's my simple script. very straightforward. Derived from this original script:  

http://zero-k.info/Forum/Thread/1612

 

Here's my script:

 

 

 
if said("listen") then
var.sr = true
say("Voice control enabled")
end if
if said("stand by") then
var.sr = false 
say("Voice control disabled")
end if
 
if var.sr then
if said("left") then
keyboard.A = true
keyboard.A = false
keyboard.Shift = false
if var.voice then
say("servo set to 0 degrees")
end if
end if
if said ("back") then
keyboard.B = true
keyboard.B = false
keyboard.Shift = false
if var.voice then
say("going back")
end if
end if
if said("go") then
keyboard.G = true
keyboard.G = false
keyboard.Shift = false
if var.voice then
say("moving forward")
end if
end if
if said ("stop") then
keyboard.H = true
keyboard.H = false
keyboard.Shift = false
if var.voice then
say ("on halt")
end if
end if
if said("center") then
keyboard.S = true
keyboard.S = false
keyboard.Shift = false
if var.voice then
say("servo set to 90 degrees")
end if
end if
if said("right") then
keyboard.D = true
keyboard.D = false
keyboard.Shift = false
if var.voice then
say("servo set to 180 degrees")
end if
end if
 
if said("silent") or said("silence") or said("shut up") or said("voice off") then
var.voice = false
say("Voice off")
end if
if said("talk") or said("speak") or said("voice on") then
var.voice = true
say("Voice on")
end if
 
 
end if