Class HttpSpeechSynthesisResult
java.lang.Object
com.alibaba.dashscope.legacy_2x.audio.http_tts.HttpSpeechSynthesisResult
Deprecated.
Result class for HTTP TTS synthesis. Contains the synthesized audio data and related metadata.
For SSE streaming calls, the result contains binary audio data in audioData. For
non-SSE synchronous calls, the result contains an audio URL in audioInfo.
- Author:
- DashScope SDK Team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanDeprecated.booleanDeprecated.byte[]Deprecated.The audio data in binary format (for SSE streaming calls).intDeprecated.Gets the size of the audio data in bytes.Deprecated.The audio URL and metadata (for non-SSE synchronous calls).Deprecated.Gets the audio URL.Deprecated.The finish reason (e.g., "stop").com.google.gson.JsonObjectDeprecated.The raw output from the API (may contain additional metadata).Deprecated.The request ID for tracking.getUsage()Deprecated.The usage statistics (if available).booleanDeprecated.Checks if audio data is present in this result (SSE mode).booleanDeprecated.Checks if audio URL is present in this result (non-SSE mode).inthashCode()Deprecated.voidsetAudioData(byte[] audioData) Deprecated.The audio data in binary format (for SSE streaming calls).voidsetAudioInfo(AudioInfo audioInfo) Deprecated.The audio URL and metadata (for non-SSE synchronous calls).voidsetFinishReason(String finishReason) Deprecated.The finish reason (e.g., "stop").voidsetOutput(com.google.gson.JsonObject output) Deprecated.The raw output from the API (may contain additional metadata).voidsetRequestId(String requestId) Deprecated.The request ID for tracking.voidsetUsage(SpeechSynthesisUsage usage) Deprecated.The usage statistics (if available).toString()Deprecated.
-
Constructor Details
-
HttpSpeechSynthesisResult
public HttpSpeechSynthesisResult()Deprecated.
-
-
Method Details
-
hasAudioData
public boolean hasAudioData()Deprecated.Checks if audio data is present in this result (SSE mode).- Returns:
- true if audio data is available, false otherwise
-
getAudioDataSize
public int getAudioDataSize()Deprecated.Gets the size of the audio data in bytes.- Returns:
- the size in bytes, or 0 if no audio data is present
-
hasAudioUrl
public boolean hasAudioUrl()Deprecated.Checks if audio URL is present in this result (non-SSE mode).- Returns:
- true if audio URL is available, false otherwise
-
getAudioUrl
Deprecated.Gets the audio URL.- Returns:
- the audio URL, or null if not available
-
getRequestId
Deprecated.The request ID for tracking. -
getAudioData
public byte[] getAudioData()Deprecated.The audio data in binary format (for SSE streaming calls). -
getAudioInfo
Deprecated.The audio URL and metadata (for non-SSE synchronous calls). -
getUsage
Deprecated.The usage statistics (if available). -
getOutput
public com.google.gson.JsonObject getOutput()Deprecated.The raw output from the API (may contain additional metadata). -
getFinishReason
Deprecated.The finish reason (e.g., "stop"). -
setRequestId
Deprecated.The request ID for tracking. -
setAudioData
public void setAudioData(byte[] audioData) Deprecated.The audio data in binary format (for SSE streaming calls). -
setAudioInfo
Deprecated.The audio URL and metadata (for non-SSE synchronous calls). -
setUsage
Deprecated.The usage statistics (if available). -
setOutput
public void setOutput(com.google.gson.JsonObject output) Deprecated.The raw output from the API (may contain additional metadata). -
setFinishReason
Deprecated.The finish reason (e.g., "stop"). -
toString
Deprecated. -
equals
Deprecated. -
canEqual
Deprecated. -
hashCode
public int hashCode()Deprecated.
-