Unity Editor version: 2022.3.6f1
ML2 OS version: 1.9.0
Unity SDK version: 2.4.0
Host OS: Windows
I found the Voice Intents feature to not work in my app, using MLSDK features.
Due to the dependency of my app on Vuforia and MLCamera, I have to choose "use MLSDK (deprecated)" when importing the Magic Leap Setup Tool (not using OpenXR as a provider). To generate this post, I disabled all extra components of my app (Vuforia, MLCamera) and only tested the two example scripts provided at (1) Runtime Voice Intents Example | MagicLeap Developer Documentation (2) Simple Example | MagicLeap Developer Documentation and my configuration is exactly like this Runtime Configuration | MagicLeap Developer Documentation
It appears to me that there's some issue with the generation of the json file that leads to the problem. Attached is the two log files I got - seems that it (1) at runtime, wasn't able to create the json file at run time:
09-26 17:36:09.066 10117 16222 16243 I Unity : Voice Intent Example Started
09-26 17:36:09.066 10117 16222 16243 I Unity : Example:Start()
09-26 17:36:09.066 10117 16222 16243 I Unity :
09-26 17:36:09.070 10117 16222 16243 E Unity : NullReferenceException: Object reference not set to an instance of an object.
09-26 17:36:09.070 10117 16222 16243 E Unity : at MLVoiceIntentsConfiguration.AddSlotsToJSON () [0x00000] in <00000000000000000000000000000000>:0
09-26 17:36:09.070 10117 16222 16243 E Unity : at MLVoiceIntentsConfiguration.SetupJSONContainer () [0x00000] in <00000000000000000000000000000000>:0
09-26 17:36:09.070 10117 16222 16243 E Unity : at MLVoiceIntentsConfiguration.GetJSONString () [0x00000] in <00000000000000000000000000000000>:0
09-26 17:36:09.070 10117 16222 16243 E Unity : at UnityEngine.XR.MagicLeap.MLVoice.SetupVoiceIntents (MLVoiceIntentsConfiguration voiceConfiguration) [0x00000] in <00000000000000000000000000000000>:0
09-26 17:36:09.070 10117 16222 16243 E Unity : at Example.Start () [0x00000] in <00000000000000000000000000000000>:0
09-26 17:36:09.070 10117 16222 16243 E Unity :
09-26 17:36:09.163 1000 3323 3323 I MagicFlinger: INF: Setting display power state DISPLAY_POWER_STATE_LED_OFF, reason "Client - Inactive"
09-26 17:36:09.414 1000 3665 4443 D adbnotify-ml: Shutting down listeners
and (2) if pre-configured, cannot read the configuration file correctly
09-26 17:53:57.905 4034 3419 3522 I VoiceService: voice_service.cpp:1376: [InitialValidateIntentJSONFile]---- Currently for language SUPPORTED, in-app sys intents are en_us
09-26 17:53:57.905 4034 3419 3522 I VoiceService: offline_intent_iface.cpp:724: [initialValidateIntentJSONFile]>>> SUCCESS: pass initial validation on rx intent JSON file
09-26 17:53:57.905 4034 3419 3522 I VoiceService: voice_service.cpp:947: [WriteToReqActPreProcMsgQueue] write a msg (service type = 1, session_type = 0, act_type = 4)
09-26 17:53:57.905 4034 3419 3534 I VoiceService: voice_service.cpp:942: [ReadFromReqActPreProcMsgQueue] read a msg (service type = 1, session_type = 0, act_type = 4)
09-26 17:53:57.905 4034 3419 3534 I VoiceService: offline_intent_iface.cpp:1077: [parseJSONValue2AppGramListFiles]----- Parse json file to app_intents.grm ---
09-26 17:53:57.905 4034 3419 3534 I VoiceService: offline_intent_iface.cpp:1116: [parseJSONValue2AppGramListFiles][LAST line] grammar = <s>({UnityApp_VoiceIntent_ID101}|{UnityApp_VoiceIntent_ID102}|{UnityApp_VoiceIntent_ID103})</s>;
09-26 17:53:57.905 4034 3419 3534 I VoiceService: offline_intent_iface.cpp:1121: [parseJSONValue2AppGramListFiles]----- Parse json file to app_intents.list ---
09-26 17:53:57.905 4034 3419 3534 I VoiceService: offline_intent_iface.cpp:1159: [parseJSONValue2SysListFile]----- Parse json file to sys_intent_list.list ---
09-26 17:53:57.905 4034 3419 3534 I VoiceService: offline_intent_iface.cpp:1165: [parseJSONValue2SysListFile]-- Field exists but empty --> NO system intent is enabled
09-26 17:53:57.906 4034 3419 3534 I VoiceService: offline_intent_iface.cpp:755: [finalParseJSONFile2AppGramAndSysListFiles]>>> SUCCESS: pass final validation on rx intent JSON file and ready to deploy!
09-26 17:53:57.906 4034 3419 3534 I VoiceService: offline_intent_iface.cpp:760: [resetToDefaultSysGramFile]----- To use default sys intent grammar file
09-26 17:53:57.906 4034 3419 3534 I VoiceService: voice_service.cpp:1415: Input size is not 0. To apply new app intent set! Update app& sys JSON intnet file w/ this new string
09-26 17:53:57.906 4034 3419 3534 I VoiceService: offline_intent_iface.cpp:542: [updateSysIntentGramFile]----- Totally 0 ML system intents are enabled
09-26 17:53:57.906 4034 3419 3534 I VoiceService: voice_service.cpp:1431: [IntentReqActPreProcHandler]----- To request post-process type 4 for the underlying speech engine
The full log files are attached for your reference. I can also send you the zip file if necessary.
Voice_Example_2.txt (722.8 KB)
Voice_Example_1.txt (730.2 KB)
Have you been seeing this issue after the August update? I wasn't sure but before using OS 1.8.0 this did not happen to me.
Thanks in advance!