GrammarRecognizer

class in UnityEngine.Windows.Speech

/

Inherits from:Windows.Speech.PhraseRecognizer

/

Implemented in:UnityEngine.CoreModule

Description

The GrammarRecognizer is a complement to the KeywordRecognizer. In many cases developers will find the KeywordRecognizer fills all their development needs. However, in some cases, more complex grammars will be better expressed in the form of an xml file on disk. The GrammarRecognizer uses Extensible Markup Language (XML) elements and attributes, as specified in the World Wide Web Consortium (W3C) Speech Recognition Grammar Specification (SRGS) Version 1.0. These XML elements and attributes represent the rule structures that define the words or phrases (commands) recognized by speech recognition engines.

For more information on this format, refer to www.w3.org/TR/speech-grammar or on MSDN.

There can be many grammar recognizers active at any given point in time, but no two grammar recognizers may use the same grammar file.

Grammar recognizer is currently functional only on Windows 10.

Properties

GrammarFilePathReturns the grammar file path which was supplied when the grammar recognizer was created.

Constructors

GrammarRecognizerCreates a grammar recognizer using specified file path and minimum confidence.

Inherited Members

Properties

IsRunningTells whether the phrase recognizer is listening for phrases.

Public Methods

DisposeDisposes the resources used by phrase recognizer.
StartMakes the phrase recognizer start listening to phrases.
StopStops the phrase recognizer from listening to phrases.

Events

OnPhraseRecognizedEvent that gets fired when the phrase recognizer recognizes a phrase.

Delegates

PhraseRecognizedDelegateDelegate for OnPhraseRecognized event.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961