Class HybridSpeechConfig
定义用于语音识别或语音合成的混合 (云和嵌入式) 配置的类。
成员
运算符 SPXSPEECHCONFIGHANDLE
语法: public inline explicit operator SPXSPEECHCONFIGHANDLE ( ) const;
用于获取基础句柄值的内部运算符。
返回
句柄。
SetSpeechRecognitionOutputFormat
语法: public inline void SetSpeechRecognitionOutputFormat ( OutputFormat format );
设置语音识别输出格式。
参数
-
format
语音识别输出格式 (简单或详细的) 。
GetSpeechRecognitionOutputFormat
语法: public inline OutputFormat GetSpeechRecognitionOutputFormat ( ) const;
获取语音识别输出格式。
返回
语音识别输出格式 (简单或详细的) 。
SetSpeechSynthesisOutputFormat
语法: public inline void SetSpeechSynthesisOutputFormat ( SpeechSynthesisOutputFormat formatId );
设置语音合成输出格式 (例如 Riff16Khz16BitMonoPcm) 。
参数
-
formatId
指定输出格式 ID
GetSpeechSynthesisOutputFormat
语法: public inline std::string GetSpeechSynthesisOutputFormat ( ) const;
获取语音合成输出格式。
返回
语音合成输出格式。
SetProperty
语法: public inline void SetProperty ( const std::string & name , const std::string & value );
按名称设置属性值。
参数
name
属性名称。value
属性值。
SetProperty
语法: public inline void SetProperty ( PropertyId id , const std::string & value );
按 ID 设置属性值。
参数
id
属性 ID。value
属性值。
GetProperty
语法: public inline std::string GetProperty ( const std::string & name ) const;
按名称获取属性值。
参数
-
name
参数名称。
返回
属性值。
GetProperty
语法: public inline std::string GetProperty ( PropertyId id ) const;
按 ID 获取属性值。
参数
-
id
参数 ID。
返回
属性值。
~HybridSpeechConfig
语法: public virtual ~HybridSpeechConfig ( ) = default;
解构对象。
FromConfigs
语法: public inline static std::shared_ptr< HybridSpeechConfig > FromConfigs ( std::shared_ptr< SpeechConfig > cloudSpeechConfig , std::shared_ptr< EmbeddedSpeechConfig > embeddedSpeechConfig );
使用指定的云和嵌入式语音配置创建混合语音配置的实例。
参数
cloudSpeechConfig
云语音配置的共享智能指针。embeddedSpeechConfig
嵌入式语音配置的共享智能指针。
返回
指向新混合语音配置实例的共享指针。