Skip to main content
Version: 14 Oct 2024

Voice Intents Overview

note

Magic Leap recommends using the Voice Intent Development Toolkit (VIDTK) to create and deploy custom voice commands. The toolkit provides validation and guidance within the toolkit UI that are not available in the Unity Editor. For more information, see Voice Commands.

Magic Leap 2 allows users to trigger events using custom verbal commands called Voice Intents. This section outlines how to set up Voice Intents in your project, example scripts, and an API overview.

Note that :

  • Voice Intents can only be used by one app at a time.
  • To avoid conflicts between system and app voice intents, the API automatically stops voice processing when the application is paused and resumes it when resuming the app.
info

Unlike system-wide voice commands that are initiated by saying "Hey Magic Leap", you do not need to say "Hey Magic Leap" for voice input to work in your Unity app.

Voice Permission and Input Settings
  • Within the System Settings, the Magic Leap Inputs Voice must be enabled for this API to work. The API could return unknown failures if it is not. To enable:
  1. Navigate to Settings > Magic Leap Inputs > Voice.
  2. Toggle Voice Commands on.
  • This feature requires the VOICE_INPUT permission to be requested at runtime and enabled in your project's Manifest Settings (Edit > Project Settings > Magic Leap > Manifest Settings).

  • Magic Leap supports a maximum of 100 voice intents per configuration. If your configuration requires more than 100 voice intents, consider combining the values of related voice intents. For example, instead of using Next Step and Continue as two different intents, combine them by setting the value of the intent to Next Step | Continue.