Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Script Function not visible in HoloToolkit's SpeechInputHandler.

Hello Everyone,
I was trying to use the Voice Commands feature in Hololens-Unity, and i've written the following code to detect keywords like 'Next', 'Previous' etc. but i'm unable to do that because when i'm trying to add response to the keywords by adding my script to the SpeechInputHandler, my functions are not visible which i want to call on the utter of that keyword. For e.g i'm trying to just print the keyword using Debug.Log().
My Script -

using JI.Hololens.Tutorials.Effects;
using HoloToolkit.Unity.InputModule;
using UnityEngine;
using UnityEngine.XR.WSA.Input;

namespace JI.Hololens.Tutorial.Effects
{
    public class GazeTransitionMaterial : ISpeechHandler
    {
        public void OnSpeechKeywordRecognized(SpeechEventData eventData)
        {
            SpeechHandler(eventData.RecognizedText.ToLower());
        }

        public void SpeechHandler(string word)
        {
            Debug.Log(word);
        }
    }

}

Unity SpeechInputHandler Screenshot -

Tagged:
Sign In or Register to comment.