class KeywordRecognitionModel

Represents keyword recognition model used with StartKeywordRecognitionAsync methods.

Members

KeywordRecognitionModel

Syntax: public inline explicit KeywordRecognitionModel ( SPXKEYWORDHANDLE hkeyword );

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

Parameters

  • hkeyword Keyword handle.

~KeywordRecognitionModel

Syntax: public inline virtual ~KeywordRecognitionModel ( );

Virtual destructor.

operator SPXKEYWORDHANDLE

Syntax: public inline explicit operator SPXKEYWORDHANDLE ( );

Internal. Explicit conversion operator.

Returns

A handle.

FromFile

Syntax: public inline static std::shared_ptr< KeywordRecognitionModel > FromFile ( const std::string & fileName );

Creates a keyword recognition model using the specified file.

Parameters

  • fileName The file name of the keyword recognition model.

Returns

A shared pointer to keyword recognition model.

FromConfig

Syntax: public inline static std::shared_ptr< KeywordRecognitionModel > FromConfig ( std::shared_ptr< EmbeddedSpeechConfig > embeddedSpeechConfig );

Creates a keyword recognition model using the specified embedded speech config.

Parameters

  • embeddedSpeechConfig Embedded speech config.

Returns

A shared pointer to keyword recognition model.

FromConfig

Syntax: public inline static std::shared_ptr< KeywordRecognitionModel > FromConfig ( std::shared_ptr< EmbeddedSpeechConfig > embeddedSpeechConfig , const std::vector< std::string > & userDefinedWakeWords );

Creates a keyword recognition model using the specified embedded speech config and user-defined wake words.

Parameters

  • embeddedSpeechConfig Embedded speech config.

  • userDefinedWakeWords User-defined wake words.

Returns

A shared pointer to keyword recognition model.