Class SpeechSynthesisResult
- java.lang.Object
-
- com.microsoft.cognitiveservices.speech.SpeechSynthesisResult
-
- All Implemented Interfaces:
AutoCloseable
public class SpeechSynthesisResult extends Object implements AutoCloseable
Contains detailed information about result of a speech synthesis operation. Note: close() must be called in order to release underlying resources held by the object. Added in version 1.7.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSpeechSynthesisResult(IntRef result)PROTECTED
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Explicitly frees any external resource attached to the objectbyte[]getAudioData()Gets the synthesized audio from the result.longgetAudioDuration()Gets the time duration of synthesized audio, by ticks (100ns).longgetAudioLength()Gets the size of synthesized audio in bytes.SafeHandlegetImpl()Returns the synthesis result implementation.PropertyCollectiongetProperties()The set of properties exposed in the result.ResultReasongetReason()Gets the reason the result was created.StringgetResultId()Gets the unique ID of the result.
-
-
-
Constructor Detail
-
SpeechSynthesisResult
protected SpeechSynthesisResult(IntRef result)
PROTECTED- Parameters:
result- PROTECTED
-
-
Method Detail
-
getResultId
public String getResultId()
Gets the unique ID of the result.- Returns:
- Specifies unique ID of the result.
-
getReason
public ResultReason getReason()
Gets the reason the result was created.- Returns:
- Specifies reason of the result.
-
getAudioLength
public long getAudioLength()
Gets the size of synthesized audio in bytes.- Returns:
- Length of synthesized audio.
-
getAudioDuration
public long getAudioDuration()
Gets the time duration of synthesized audio, by ticks (100ns). Only valid for completed synthesis.- Returns:
- Time duration of synthesized audio, by ticks (100ns).
-
getAudioData
public byte[] getAudioData()
Gets the synthesized audio from the result.- Returns:
- Synthesized audio.
-
getProperties
public PropertyCollection getProperties()
The set of properties exposed in the result.- Returns:
- The set of properties exposed in the result.
-
close
public void close()
Explicitly frees any external resource attached to the object- Specified by:
closein interfaceAutoCloseable
-
getImpl
public SafeHandle getImpl()
Returns the synthesis result implementation.- Returns:
- The implementation of the result.
-
-