Non-recoverable voice command failure due to "app intents is larger than the allowed max 100"

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:

Do you mind making a small change on your end? In the MagicLeapKeywordRecognitionSubsystem.cs script can you change the UpdateVoiceConfig function to call InitializeVoiceConfiguration even if a previous configuration exists?

 private void UpdateVoiceConfig()
            {
                 InitializeVoiceConfigurationAsset();

                if (voiceConfig != null) {
                    // Keep our voice config consistent with internal keywordDictionary
                    voiceConfig.VoiceCommandsToAdd.Clear();
                    foreach (string keyword in keywordDictionary.Keys)
                    {
                        AddCustomIntent(keyword);
                    }
                    SetupVoiceIntents();
                }
            }

1 Like

I have reached out to our engineering team to see if they have any suggestions

Thanks so much @kbabilinski! That seems to fix it. Do you expect this or a similar updated to be implemented in the future? Will we be updated here in this thread?

I reported the bug to our Voice of Customer team. Iā€™m not sure if it will be implemented in MRTK or if it is a bug for the SDK team. I put a note to update this thread once I get more information but the release notes will have the most detailed information :grin:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.