GrammarList Class

Definition

Allows adding multiple grammars to a SpeechRecognizer to improve the accuracy of speech recognition.

GrammarLists are only usable in specific scenarios and are not generally available. Note: close() must be called in order to release underlying resources held by the object.

public class GrammarList extends Grammar
Inheritance
java.lang.Object
AutoCloseable
GrammarList

Inherited Members

Methods

add(Grammar grammar)

Adds a single grammar to the current recognizer.

close()

Dispose of associated resources.

fromRecognizer(Recognizer recognizer)

Creates a GrammarList from a given speech recognizer.

Creating a grammar list from a recognizer is only usable in specific scenarios and is not generally available.

Applies to