SelectKeywordRecognizer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A keyword recognizer listening to the "select" keyword localized in the system display language of HoloLens 2.
public sealed class SelectKeywordRecognizer : IDisposable
type SelectKeywordRecognizer = class
interface IDisposable
Public NotInheritable Class SelectKeywordRecognizer
Implements IDisposable
- Inheritance
-
SelectKeywordRecognizer
- Implements
Remarks
This class is only required by HoloLens 2 as the OS filters out the "select" keyword and thus the Unity UnityEngine.Windows.Speech.KeywordRecognizer does not fire events when the word is heard.
The API surface is made mostly identical to the Unity UnityEngine.Windows.Speech.KeywordRecognizer for ease of use.
Like the Unity UnityEngine.Windows.Speech.KeywordRecognizer, this class is only available under the UNITY_EDITOR || UNITY_STANDALONE || WINDOWS_UWP flags. We recommend checking for those flags in the code using #if before referencing this class, especially when developing a cross-platform application.
Constructors
SelectKeywordRecognizer() |
Create a new SelectKeywordRecognizer. |
Properties
IsRunning |
Return whether the recognizer is running |
IsSupported |
Check whether the recognizer is supported by the current platform / Unity version |
Methods
Dispose() |
Dispose the resources used by SelectKeywordRecognizer |
Start() |
Start the SelectKeywordRecognizer to listen for the select keyword |
Stop() |
Stop the SelectKeywordRecognizer from listening for the select keyword |
Events
OnPhraseRecognized |
Event to be fired when the "select" keyword is recognized |