Is it possible to use voice command with holographic remoting on Hololens2 with MRTK2?

WL.TSAI 85 Reputation points
2023-11-21T02:19:25.48+00:00

Is it possible to use voice command with holographic remoting on Hololens2 with MRTK2?

I am using the MRTK 2.8.3 with OpenXR 1.8.1 in unity 2021.3.26.

I tried both Editor Play mode and windows standalone app with Enable Audio but the voice command is not detected.
The same scene is tested workable with UWP app.

HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
397 questions
{count} votes

Accepted answer
  1. Zuocheng Wang - MSFT 3,091 Reputation points Microsoft Vendor
    2023-12-20T02:57:24.19+00:00

    Hi @WL.TSAI ,

    Yes, it's possible. I tested this example scene - SpeechInputExample, and the voice commands work as expected in Remoting mode. Please make sure that your Holographic Remoting Player app is up to date and that you have given it microphone access on your HoloLens 2 device.


1 additional answer

Sort by: Most helpful
  1. Zahid Kola 0 Reputation points
    2023-12-16T00:44:46.9266667+00:00

    Yes, it is possible to use voice commands with holographic remoting on HoloLens 2 with MRTK2.

    To enable voice commands in your MRTK2 application, you'll need to do the following:

    1. In your Unity project, add the MRTK2 package to your project.
    2. In the MRTK2 settings, enable the Enable Audio option.
    3. In your scene, add a MRTK2_Audio component to your main camera object.
    4. In the MRTK2_Audio component, set the Audio Input property to Microphone.
    5. In the MRTK2_Audio component, set the Audio Output property to None.
    6. In your script, use the MRTK2_Audio.GetAudioInput() function to access the audio input from the microphone.
    7. Use the System.Speech.Recognition namespace to recognize speech and interpret voice commands.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.