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.