Unity Editor version: 2022.3.45
ML2 OS version: 1.10.0 (B3E.240905.12-R.038)
MLSDK version: magicleap.unitysdk 2.5.0
MRTK version: MRTK3 and magicleap.mrtk3 1.3.0
We are experiencing an issue where voice commands stop working with error:
offline_intent_iface.cpp:620: [initialValidateIntentJSONFile]>>> ERROR: the # [255] of app intents is larger than the allowed max 100
It appears to happened due to changing StatefulInteractable.SpeechRecognitionKeyword
at runtime, which we do frequently, and which triggers non-destructive error:
The Voice Intents Configuration File has detected duplicate Values or Ids used. This could cause unwanted behaviour.
An example of how we change the voice command keywords at runtime would be "Open side panel", and once it's opened, we will change the voice command to "Close side panel".
Since these voice commands are associated with the StatefulInteractable
, they are added / removed by SpeechInteractor.RegisterInteractable()
and SpeechInteractor.UnregisterInteractable()
.
We have overridden SpeechInteractor.UnregisterInteractable()
to call IKeywordRecognitionSubsystem.RemoveKeyword()
if there are no more interactables associated with the keyword.
When I log out MLVoiceIntentsConfiguration.ValidationCheck()
, it appears that the voice commands are just added but never removed:
On app launch:
After opening a side panel:
After closing a side panel:
After opening the side panel again:
As the screenshots indicate, each time we change the voice command (in this case switching between "Open" and "Close"), the number of ML keywords increases by the number of MRTK keywords while the expected behaviour would be that it stated the same and that each system is synced up as stated in `MagicLeapKeywordRecognitionSubsystem.UpdateVoiceConfig().
Any suggestions would be very much appreciated. Thanks!
PS.
When I modify the voice MagicLeap MRTK SpeechInputExamples scene so that the keyword is changed when the voice command is triggered, I also get the duplicate error described above as seen in this screenshot: