Class SpeechEventData
Describes an input event that involves keyword recognition.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public class SpeechEventData : BaseInputEventData
Constructors
SpeechEventData(EventSystem)
Constructor.
Declaration
public SpeechEventData(EventSystem eventSystem)
Parameters
Type | Name | Description |
---|---|---|
EventSystem | eventSystem | Typically will be EventSystems.EventSystem.current |
Properties
Command
The text that was recognized.
Declaration
public SpeechCommands Command { get; }
Property Value
Type | Description |
---|---|
SpeechCommands |
Confidence
A measure of correct recognition certainty.
Declaration
public RecognitionConfidenceLevel Confidence { get; }
Property Value
Type | Description |
---|---|
RecognitionConfidenceLevel |
PhraseDuration
The time it took for the phrase to be uttered.
Declaration
public TimeSpan PhraseDuration { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
PhraseStartTime
The moment in UTC time when uttering of the phrase began.
Declaration
public DateTime PhraseStartTime { get; }
Property Value
Type | Description |
---|---|
DateTime |
Methods
Initialize(IMixedRealityInputSource, RecognitionConfidenceLevel, TimeSpan, DateTime, SpeechCommands)
Populates the event with data.
Declaration
public void Initialize(IMixedRealityInputSource inputSource, RecognitionConfidenceLevel confidence, TimeSpan phraseDuration, DateTime phraseStartTime, SpeechCommands command)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityInputSource | inputSource | |
RecognitionConfidenceLevel | confidence | |
TimeSpan | phraseDuration | |
DateTime | phraseStartTime | |
SpeechCommands | command |