class SpeechSynthesisResult

Contains information about result from text-to-speech synthesis. Added in version 1.4.0.

Members

ResultId

Syntax: public const std::string & ResultId;

Unique result id.

Reason

Syntax: public const ResultReason & Reason;

Reason of the synthesis result.

AudioDuration

Syntax: public const std::chrono::milliseconds & AudioDuration;

Time duration of the synthesized audio, only valid for completed synthsis. Added in version 1.21.0.

Properties

Syntax: public constPropertyCollection & Properties;

Collection of additional SpeechSynthesisResult properties.

SpeechSynthesisResult

Syntax: public inline explicit SpeechSynthesisResult ( SPXRESULTHANDLE hresult );

Creates a new instance using the provided handle.

Parameters

  • hresult Result handle.

GetAudioLength

Syntax: public inline uint32_t GetAudioLength ( );

Gets the size of synthesized audio in bytes.

Returns

Length of synthesized audio

GetAudioData

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

Gets the synthesized audio.

Returns

Synthesized audio data

operator SPXRESULTHANDLE

Syntax: public inline explicit operator SPXRESULTHANDLE ( );

Explicit conversion operator.

Returns

A handle.

~SpeechSynthesisResult

Syntax: public inline ~SpeechSynthesisResult ( );

Destructor.