public void RaiseSpeechKeywordPhraseRecognized(IInputSource source, uint sourceId, ConfidenceLevel confidence, TimeSpan phraseDuration, DateTime phraseStartTime, SemanticMeaning[] semanticMeanings, string text, object[] tags = null)
    {
        // Create input event
        speechEventData.Initialize(source, sourceId, tags, confidence, phraseDuration, phraseStartTime, semanticMeanings, text);

        // Pass handler through HandleEvent to perform modal/fallback logic
        HandleEvent(speechEventData, OnSpeechKeywordRecognizedEventHandler);
    }
Exemple #2
0
        private static void FireSelectKeyword(GazePointerVisibilityStateMachine gsm)
        {
            SpeechEventData data = new SpeechEventData(EventSystem.current);

            data.Initialize(new BaseGenericInputSource("test input source", new IMixedRealityPointer[0], InputSourceType.Voice),
                            Utilities.RecognitionConfidenceLevel.High,
                            System.TimeSpan.MinValue,
                            System.DateTime.Now,
                            new SpeechCommands("select", KeyCode.Alpha1, MixedRealityInputAction.None));
            gsm.OnSpeechKeywordRecognized(data);
        }