class PhraseListGrammar

class PhraseListGrammar
  : public Grammar

Represents a phrase list grammar for dynamic grammar scenarios. Added in version 1.5.0.

Members

PhraseListGrammar

Syntax: public inline explicit PhraseListGrammar ( SPXGRAMMARHANDLE hgrammar );

Internal constructor. Creates a new instance using the provided handle.

Parameters

  • hgrammar Phrase list grammar handle.

AddPhrase

Syntax: public inline void AddPhrase ( const std::string & text );

Adds a simple phrase that may be spoken by the user.

Parameters

  • text The phrase to be added.

Clear

Syntax: public inline void Clear ( );

Clears all phrases from the phrase list grammar.

FromRecognizer

Syntax: public template< > inline static std::shared_ptr< PhraseListGrammar > FromRecognizer ( std::shared_ptr< T > recognizer );

Creates a phrase list grammar for the specified recognizer.

Parameters

  • recognizer The recognizer from which to obtain the phrase list grammar.

Returns

A shared pointer to phrase list grammar.