Skip to main content
Version: 14 Oct 2024

MLVoiceIntentEvent

Module: Input

A structure containing voice intent event. More...

#include <ml_voice.h>

Public Attributes

TypeName
boolis_success
Voice event handling result in the voice intent event.
MLVoiceStatestate
MLVoiceIntentNoIntentReasonno_intent_reason
const char *text
uint32_tintent_id
MLInputVoiceAppIntentSlot *app_intent_slots
uint32_tapp_intent_slot_count

Detailed Description

struct MLVoiceIntentEvent;

A structure containing voice intent event.

API Level:

  • 24

Public Attributes Documentation

is_success

bool is_success;

Voice event handling result in the voice intent event.

In case of false, other member variables should be ignored (text will be NULL).


state

MLVoiceState state;
TypeDescription
MLVoiceStateVoice state in voice event.

Voice state when generating the voice intent event.


no_intent_reason

MLVoiceIntentNoIntentReason no_intent_reason;
TypeDescription
MLVoiceIntentNoIntentReasonNo intent reason code in voice event.

If intent is not detected, it contains the reason, otherwise the value is MLVoiceIntentNoIntentReason_NoReason.


text

const char * text;

The C string carrying identifier data which is UTF-8 and null terminated. And the memory of this variable is managed by system.


intent_id

uint32_t intent_id;

User defined intent index which is detected.


app_intent_slots

MLInputVoiceAppIntentSlot * app_intent_slots;
TypeDescription
MLInputVoiceAppIntentSlot *A structure containing voice app-intent slot in voice event.

Array of app-intent slot, array count is set in app_intent_slot_count. And the memory of this variable is managed by system.


app_intent_slot_count

uint32_t app_intent_slot_count;

Count of an array app_intent_slots.