Voice.clearGrammars()

Overview

Removes all of the active grammars from speech recognition.

Added in version 1.2.104

Use Cases

The user switches to a new process and require a different set of grammars. This removes the existing list of active grammars so you can add the new ones.

Remarks

This does not remove grammars that handle the default voice-enabled shortcuts in context menus.

Format

Voice.clearGrammars();

Example

Copy
/* Remove active grammars and then make one grammar active.
 */
 
Voice.clearGrammars();
Voice.loadGrammars('connected_digits');