AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
SpeechEventData.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using System;
5 using UnityEngine.EventSystems;
6 
7 #if UNITY_WSA || UNITY_STANDALONE_WIN
8 using UnityEngine.Windows.Speech;
9 #endif
10 
11 namespace HoloToolkit.Unity.InputModule
12 {
17  {
21  public TimeSpan PhraseDuration { get; private set; }
22 
26  public DateTime PhraseStartTime { get; private set; }
27 
31  public string RecognizedText { get; private set; }
32 
33  public SpeechEventData(EventSystem eventSystem) : base(eventSystem) { }
34 
35 #if UNITY_WSA || UNITY_STANDALONE_WIN
36 
40  public ConfidenceLevel Confidence { get; private set; }
41 
45  public SemanticMeaning[] SemanticMeanings { get; private set; }
46 
47  public void Initialize(IInputSource inputSource, uint sourceId, object tag, ConfidenceLevel confidence, TimeSpan phraseDuration, DateTime phraseStartTime, SemanticMeaning[] semanticMeanings, string recognizedText)
48  {
49  BaseInitialize(inputSource, sourceId, tag);
50  Confidence = confidence;
51  PhraseDuration = phraseDuration;
52  PhraseStartTime = phraseStartTime;
53  SemanticMeanings = semanticMeanings;
54  RecognizedText = recognizedText;
55  }
56 #endif
57  }
58 }
Interface for an input source. An input source can be anything that a user can use to interact with a...
Definition: IInputSource.cs:12
Describes an input event that involves keyword recognition.