# start the service
webkitspeechrecognition = Runtime.start("webkitspeechrecognition","WebkitSpeechRecognition")
# always listen
# webkitspeechrecognition.setAutoListen(True)
=======
webgui = Runtime.start("webgui","WebGui")
webkitspeechrecognition = Runtime.start("webkitspeechrecognition","WebkitSpeechRecognition")
arduino = Runtime.start("arduino","Arduino")
arduino.connect("COM3")

def lightOn():
  arduino.digitalWrite(13,1)

def lightOff():
  arduino.digitalWrite(13,0)

def onText(data):
     print data
     if (data == "light on"):
         lightOn()
     elif (data == "light off"):
         lightOff()

webkitspeechrecognition.addListener("publishText","python","onText")

@@ -1,8 +1,191 @@
+#########################################%0A# WebkitSpeechRecognition.py%0A# more info @: http://myrobotlab.org/service/WebkitSpeechRecognition%0A#########################################%0A%0A
 # start 
@@ -296,20 +296,28 @@
 %0A# a
-lways listen
+uto rearm microphone
 %0A# w
@@ -359,16 +359,85 @@
 n(True)%0A
+# speedup recognition%0A# webkitspeechrecognition.setContinuous(False)%0A
 =======%0A

update WebkitSpeechRecognition