Created
June 3, 2018 19:38
-
-
Save acotilla91/052f0df4e719b35a85c1d37cea23e697 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function recognizer() | |
if m.recognizer = invalid | |
m.recognizer = CreateObject("roSGNode", "SpeechRecognizer") | |
m.recognizer.delegate = m.top | |
end if | |
return m.recognizer | |
end function | |
function onKeyEvent(key as String, press as Boolean) as Boolean | |
if key = "OK" and press | |
recognizer().callFunc("startListening", {}) | |
m.infoLb.text = "Listening..." | |
m.label.text = "" | |
end if | |
return true | |
end function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment