类语法

表示用于自定义语音识别的基类语法。 在版本 1.5.0 中添加。

成员

语法

语法:public inline explicit Grammar ( SPXGRAMMARHANDLE hgrammar );

内部构造函数。 使用提供的句柄创建新实例。

参数

  • hgrammar 语法句柄。

~语法

语法:public inline virtual ~Grammar ( );

析构函数,不执行任何作。

运算符 SPXGRAMMARHANDLE

语法:public inline explicit operator SPXGRAMMARHANDLE ( );

内部。 显式转换运算符。

退货

句柄。

FromStorageId

语法:public inline static std::shared_ptr< Grammar > FromStorageId ( const std::string & storageId );

从存储 ID 创建语法。 在版本 1.7.0 中添加。

参数

  • storageId) 语言模型的持久存储 ID。

退货

语法。

从存储 ID 创建语法只能在特定方案中使用,并且通常无法实现。