共用方式為


class SpeechSynthesisResult

包含文字到語音合成結果的相關信息。 已在1.4.0版中新增。

成員

結果編號

語法:public const std::string & ResultId;

唯一的結果標識碼。

原因

語法:public const ResultReason & Reason;

合成結果的原因。

AudioDuration

語法:public const std::chrono::milliseconds & AudioDuration;

合成音訊的時間持續時間,僅適用於已完成的合成器。 已在1.21.0版中新增。

性能

語法:public const PropertyCollection & Properties;

其他SpeechSynthesisResult屬性的集合。

SpeechSynthesisResult

語法:public inline explicit SpeechSynthesisResult ( SPXRESULTHANDLE hresult );

使用提供的句柄建立新的實例。

參數

  • hresult 結果句柄。

GetAudioLength

語法:public inline uint32_t GetAudioLength ( );

取得以位元組為單位的合成音訊大小。

退貨

合成音訊的長度

GetAudioData

語法:public inline std::shared_ptr< std::vector< uint8_t > > GetAudioData ( );

取得合成的音訊。

退貨

合成的音訊數據

運算子 SPXRESULTHANDLE

語法:public inline explicit operator SPXRESULTHANDLE ( );

明確轉換運算子。

退貨

句柄。

~SpeechSynthesisResult

語法:public inline ~SpeechSynthesisResult ( );

解構函式。