Hi,
We have encountered a problem with updating Magic Leap voice command settings.
We only update these voice commands once in a while, i.e. irregularly and not in short succession. With a mixture of new voice intentions and previously configured commands.
- For updating the settings we are stopping processing, passing the settings and start processing again:
std::string json = "{"app_intents":[{"id":0,"name":"mute","value":"mute"}], "sys_intent_list":{"name":[]}";
settings.app_intent = json.c_str();
...
MLVoiceIntentStopProcessing(voice_handle_);
...
MLVoiceIntentConfigureSettings(voice_handle_, &settings);
...
MLVoiceIntentStartProcessing(voice_handle_);
Starting with ID=0 and including a previously configured voice intent is not working for us.
With the 2nd update, commands are not recognised by Magic Leap (no callback):
1. update
std::string json = "{"app_intents":[{"id":0,"name":"mute","value":"mute"}, {"id":1,"name":"end","value":"end"}, {"id":2,"name":"start","value":"start"}], "sys_intent_list":{"name":[]}";
2. update
std::string json = "{"app_intents":[{"id":0,"name":"mute","value":"mute"}, {"id":1,"name":"next","value":"next"}, {"id":2,"name":"stop","value":"stop"}], "sys_intent_list":{"name":[]}";
3. update
std::string json = "{"app_intents":[{"id":0,"name":"mute","value":"mute"}, {"id":1,"name":"quit","value":"quit"}, {"id":2,"name":"pause","value":"pause"}], "sys_intent_list":{"name":[]}";
What works is adding new voice intents, not removing commands, using continous IDs, and sending the entire json with voice intentions added, like this:
std::string json = "{"app_intents":[{"id":0,"name":"mute","value":"mute"}, "sys_intent_list":{"name":[]}";
2. update
std::string json = "{"app_intents":[{"id":0,"name":"mute","value":"mute"}, {"id":1,"name":"next","value":"next"}], "sys_intent_list":{"name":[]}";
3. update
std::string json = "{"app_intents":[{"id":0,"name":"mute","value":"mute"}, {"id":1,"name":"next","value":"next"}, {"id":2,"name":"stop","value":"stop"}], "sys_intent_list":{"name":[]}";
4. update
std::string json = "{"app_intents":[{"id":0,"name":"mute","value":"mute"}, {"id":1,"name":"next","value":"next"}, {"id":2,"name":"stop","value":"stop"}, {"id":3,"name":"back","value":"back"}], "sys_intent_list":{"name":[]}";
....
However, with this the list of intents is growing over time. I'm worried about a upper limit for the number of configured voice intents.
Are my assumptions correct regarding ids for the voice intent json
- List of intents start with ID zero
- IDs must be continuous, not skipping a number
- list of intends must not contain duplicate names or values with different IDs
Thanks,
Richard
ML2 OS version: 1.3.0-dev1(secure)
MLSDK version: 1.2.0-dev2(secure)
Host OS: MacOS