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

**URL:** <https://forum.magicleap.cloud/t/non-recoverable-voice-command-failure-due-to-app-intents-is-larger-than-the-allowed-max-100/4997>\
**Category:** MRTK Development\
**Created:** [January 15, 2025, 2:10am UTC](https://forum.magicleap.cloud/t/non-recoverable-voice-command-failure-due-to-app-intents-is-larger-than-the-allowed-max-100/4997 "2025-01-15T02:10:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin.wilter](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/martin.wilter/32/444_2.png) [@martin.wilter](https://forum.magicleap.cloud/u/martin.wilter)\
**Post date:** [January 15, 2025, 2:10am UTC](https://forum.magicleap.cloud/t/non-recoverable-voice-command-failure-due-to-app-intents-is-larger-than-the-allowed-max-100/4997/1 "2025-01-15T02:10:41Z")

</div>

**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:

```auto
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:

```auto
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:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/0/05e6b17fd4b8518b952341fe2555ded87b36abd5.png)

After opening a side panel:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/a/a5b83c0c99f29ba3e115289396e9d0b5ef9a7ece.png)

After closing a side panel:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/9/9f69dacb00e08f26dac8c94dc97458af0c4dfd78.png)

After opening the side panel again:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/f/f744ff0e6b234e4b853fbad8a80daa3a8585c342.png)

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:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/e/e718b2c466803775149fb5faa6a113557e6d7ced.jpeg)

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [January 16, 2025, 7:36pm UTC](https://forum.magicleap.cloud/t/non-recoverable-voice-command-failure-due-to-app-intents-is-larger-than-the-allowed-max-100/4997/2 "2025-01-16T19:36:03Z")

</div>

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?

```auto
 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();
                }
            }

```

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [January 16, 2025, 7:36pm UTC](https://forum.magicleap.cloud/t/non-recoverable-voice-command-failure-due-to-app-intents-is-larger-than-the-allowed-max-100/4997/3 "2025-01-16T19:36:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![martin.wilter](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/martin.wilter/32/444_2.png) [@martin.wilter](https://forum.magicleap.cloud/u/martin.wilter)\
**Post date:** [January 16, 2025, 10:04pm UTC](https://forum.magicleap.cloud/t/non-recoverable-voice-command-failure-due-to-app-intents-is-larger-than-the-allowed-max-100/4997/4 "2025-01-16T22:04:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [January 17, 2025, 3:44pm UTC](https://forum.magicleap.cloud/t/non-recoverable-voice-command-failure-due-to-app-intents-is-larger-than-the-allowed-max-100/4997/5 "2025-01-17T15:44:46Z")

</div>

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 😁

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/bd9b737a4d45ea243aa7eb177d60a773b806899a.svg) [@system](https://forum.magicleap.cloud/u/system)\
**Post date:** [February 1, 2025, 3:45pm UTC](https://forum.magicleap.cloud/t/non-recoverable-voice-command-failure-due-to-app-intents-is-larger-than-the-allowed-max-100/4997/6 "2025-02-01T15:45:32Z")

</div>

Closed on February 1, 2025, 3:45pm UTC

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