Other Grammar Functions

The ISRGramCommon interface provides several other member functions that an application can use:

· Archive. Saves the compiled version of a grammar away so that it loads more quickly the next time the application uses it.

· BookMark. Sets a bookmark in the incoming audio stream, causing the application to receive a notification when it begins processing audio from a particular point in time. When the bookmark is reached, the engine calls the ISRGramNotifySink::BookMark member function and pauses so the application can change grammars, for example. An application might place bookmarks to synchronize the loading new grammars with mouse-clicks and keyboard events that change the internal state of the application.

· TrainDlg. Displays a dialog box that allows the user to train the grammar for his or her voice. The exact features of the dialog box are determined by the engine, but typically it requests that the user speak words in the grammar that are as of yet untrained, and does fine-tuning of difficult phrases.

· TrainPhrase. Queries engine for list of phrases speaker should utter to improve recognition accuracy. It is up to the application to prompt the speaker to speak the phrases, acquire recordings, and call the ISRResCorrection::Correction or ISRResCorrection::Validate member function for each phrase. A "phrase" can be a complete sentence, a partial sentence, or even an individual word.

· TrainQuery. Queries the engine for the kind of training that is needed for a particular grammar.