# Voice intents bug when multiple Data Slots are used in one Voice Command

**URL:** <https://forum.magicleap.cloud/t/voice-intents-bug-when-multiple-data-slots-are-used-in-one-voice-command/2031>\
**Category:** Unity Development\
**Tags:** development, unity\
**Created:** [June 6, 2023, 8:27am UTC](https://forum.magicleap.cloud/t/voice-intents-bug-when-multiple-data-slots-are-used-in-one-voice-command/2031 "2023-06-06T08:27:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pokemon9757](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@pokemon9757](https://forum.magicleap.cloud/u/pokemon9757)\
**Post date:** [June 6, 2023, 8:27am UTC](https://forum.magicleap.cloud/t/voice-intents-bug-when-multiple-data-slots-are-used-in-one-voice-command/2031/1 "2023-06-06T08:27:04Z")

</div>

**Unity Editor version** : 2022.2.9  
**ML2 OS version** : v1.2.0-dev2  
**MLSDK version** : v1.2.0-dev2  
**Host OS** : Windows

**How to replicate:**

1. Load up the Magic Leap example for Voice Intents
2. In **Voice Commands to Add** , add an element with any ID and a value `Create a? {Color}? {Shape}` . Note: I intend to allow the user to say either "Create a Red Cube" or "Create a Cube" to create a cube with a default colour.
3. In **Slots For Voice Commands** , add two Slots named Shape and Color with any values.
4. Build the app.
5. As you trigger both voice slots on the example UI, take note of the bottom right of the UI where the Slots used are displayed. Although the command "Create a Red Cube" was recognized, the two Slots were displayed as: "Name: Color - Value: Red \n Name: Red - Value: Shape".  
This should instead be "Name: Color - Value: Red \n Name: Shape - Value: Cube".

![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/3e9bff46773c60569399616af5d34a13e2d22628.jpeg)  
Please excuse me for the lame screenshot, the button responsible for creating a Snapshot on the App Sim would constantly restart the Magic Leap 2 instead of taking a screenshot 🥲

---

<div class="post-metadata">

**Author:** ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)\
**Post date:** [June 6, 2023, 8:01pm UTC](https://forum.magicleap.cloud/t/voice-intents-bug-when-multiple-data-slots-are-used-in-one-voice-command/2031/3 "2023-06-06T20:01:18Z")

</div>

Hi @pokemon,

Thank you for providing steps to reproduce. I'll go ahead and look into this and get back to you.

Thanks,

El

---

<div class="post-metadata">

**Author:** ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)\
**Post date:** [June 7, 2023, 10:15pm UTC](https://forum.magicleap.cloud/t/voice-intents-bug-when-multiple-data-slots-are-used-in-one-voice-command/2031/4 "2023-06-07T22:15:27Z")

</div>

Hi @pokemon9757,

Could you please provide a screenshot of your **Voice Intents Configuration Scriptable Object**. This will help us further diagnose the problem.

Thanks,

El

---

<div class="post-metadata">

**Author:** ![pokemon9757](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@pokemon9757](https://forum.magicleap.cloud/u/pokemon9757)\
**Post date:** [July 24, 2023, 5:53am UTC](https://forum.magicleap.cloud/t/voice-intents-bug-when-multiple-data-slots-are-used-in-one-voice-command/2031/5 "2023-07-24T05:53:20Z")

</div>

![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/e/e875417f15c2818f462ab6b18de14477cd6126a9.png)  
Hi El,

Sure, here is one of my Configs

---

<div class="post-metadata">

**Author:** ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)\
**Post date:** [July 25, 2023, 3:56pm UTC](https://forum.magicleap.cloud/t/voice-intents-bug-when-multiple-data-slots-are-used-in-one-voice-command/2031/6 "2023-07-25T15:56:05Z")

</div>

It seems that there about 10 slots for voice commands. Would you mind sharing the rest of them? This may help us further debug the issue. If there is sensitive information in those slots feel free to let me know if you can't share or directly message them to me to keep them private.

Best,

El

---

<div class="post-metadata">

**Author:** ![pokemon9757](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@pokemon9757](https://forum.magicleap.cloud/u/pokemon9757)\
**Post date:** [August 4, 2023, 1:01am UTC](https://forum.magicleap.cloud/t/voice-intents-bug-when-multiple-data-slots-are-used-in-one-voice-command/2031/7 "2023-08-04T01:01:22Z")

</div>

```auto
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
  m_ObjectHideFlags: 0
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 11500000, guid: 71122c582b923f04ab4f88f548a59fce, type: 3}
  m_Name: MMIVoiceIntentsConfiguration
  m_EditorClassIdentifier: 
  AllVoiceIntents: []
  VoiceCommandsToAdd:
  - Id: 0
    Value: '[Hi|Hello there?] | Greetings'
  - Id: 1
    Value: '[Create|Generate|Make] [a|an]? {Color}? {Shape}'
  - Id: 2
    Value: '[(Set|Change)? {Pronoun}? color to {Color}] | [Make {Pronoun} {Color}]'
  - Id: 3
    Value: Delete|Remove|Erase|Destroy
  - Id: 4
    Value: '{Action} Group|Grouping'
  - Id: 5
    Value: '{Selection}'
  - Id: 6
    Value: '[Scale {UpDown} by? {Percentage} percent?] | [Make {Pronoun} {Percentage}
      percent {UpDown}] '
  - Id: 7
    Value: '{OnOff} UI'
  - Id: 8
    Value: '{OnOff} lock'
  - Id: 9
    Value: Open|Display menu? {MenuName}
  - Id: 10
    Value: Help|Assistance
  AutoAllowAllSystemIntents: 0
  SystemCommands: 2008
  SlotsForVoiceCommands:
  - name: Shape
    values:
    - Cube
    - Sphere
    - Capsule
    - Cylinder
  - name: Color
    values:
    - Red
    - Green
    - Blue
    - Purple
    - Green
    - White
    - Grey
    - Black
    - Orange
    - Yellow
    - Pink
    - Brown
  - name: Boolean
    values:
    - True
    - False
  - name: Percentage
    values:
    - 10
    - 20
    - 30
    - 40
    - 50
    - 60
    - 70
    - 80
    - 90
    - 100
  - name: Action
    values:
    - Begin|Start
    - End|Complete
  - name: UpDown
    values:
    - Up|Bigger
    - Down|Smaller
  - name: Selection
    values:
    - Select
    - Deselect
  - name: OnOff
    values:
    - On|Enable
    - Off|Disable
  - name: MenuName
    values:
    - Overview
    - Controls
    - Status
  - name: Pronoun
    values:
    - that
    - this
    - it

```

No problemo. I couldn't send the .asset file directly so here is the content

---

<div class="post-metadata">

**Author:** ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)\
**Post date:** [August 4, 2023, 9:49pm UTC](https://forum.magicleap.cloud/t/voice-intents-bug-when-multiple-data-slots-are-used-in-one-voice-command/2031/8 "2023-08-04T21:49:59Z")

</div>

Hi @pokemon9757

I am unable to reproduce this on my end using MLSDK v1.3.0-dev2. Would it be possible to update your MLSDK version and see if that fixes it. I did use the file that you provided to test as well.

Best,

El
