I finally got around to playing with this a bit. The only issue I have is that occasionally an error event fires and it seems to kill the SR "service", meaning that my log stops showing any further SR events such as RMS levels.
I take it this is normal and the only recourse is to call StartListening
again? Sometimes that doesn't seem to restart it though.
I'm not sure I want it to work this way, but is there a way for it to only respond after a keyword? For example, I have an app named Carma and it only wakes up if I say Carma. No beeping or anything else in the meantime. When I say "carma", it says "Yes" and then I hear a beep waiting for a command. Really, I was hoping to just listen for commands and ignore anything it doesn't recognize but it just keeps erroring out (i.e. No speech input, etc) after which I need to restart it and then it beeps again.
By the way, for anyone interested I have added error descriptions to the error sub:
Sub SpeechRecognition_Error (ErrorType As Int)
Dim sErrorMsg As String
Select Case ErrorType
sErrorMsg = "Network operation timed out"
sErrorMsg = "Network error"
sErrorMsg = "Audio recording error"
sErrorMsg = "Server sends error status"
sErrorMsg = "Client-side error"
sErrorMsg = "No speech input"
sErrorMsg = "No recognition result matched"
sErrorMsg = "RecognitionService busy"
sErrorMsg = "Insufficient permissions"
sErrorMsg = "Unknown error"
'StartListening ' Do this here?
Log("VR Error: " & ErrorType & " - " & sErrorMsg)
'CallSub2(Main, "ShowError", ErrorType) ' Currently not using this part