Unity 2022.2b8
ML2 B3E.220818.12-R.085 (SDK Version 29)
MLSDK 0.53.3
Windows 10
I am trying to implement Voice Intents into our program and it does not appear to be working. What I have tracked down is that even after requesting the VoiceInput permission and obtaining it, MLVoice.VoiceEnabled always returns false. If I do not check that beforehand and attempt to call MLVoice.SetupVoiceIntents, I get an error that contains a code indicating that the Voice Input is not available.
The code I have is cross platform so I have just put the ML2 code into the same paradigm as what I had and it works as following:
- application goes to register 'keywords' which take actions, calls start on a "SpeechCommandRecognizer" which is a non-Unity class (i.e., not a Monobehaviour)
- SpeechCommandRecognizer checks to see if it has the VoiceInput permission, if it does not it requests it and returns (if it has it, skip to 4)
- When SpeechCommandRecognizer gets permissions, call Start again
- SpeechCommandRecognizer checks to see if MLVoice.VoiceEnabled is true, if not error out (if i don't disable this line, this is as far as it will go)
SpeechCommandRecognizer creates MLVoiceIntentsConfiguration scriptable object, and sets the lists on it to blank lists. - SpeechCommandRecognizer creates all the CustomVoiceIntent objects and adds them to the VoiceCommandsToAdd list
- SpeechCommandRecognizer calls MLVoice.SetupVoiceIntents
- if successful, SpeechCommandRecognizer adds event to MLVoice.OnVoiceEvent (never gets to this point successfully)
Are there any known issues with this functionality? I'm not quite sure what I'm doing wrong here.