Class TtsHttpService
java.lang.Object
com.alibaba.dashscope.resources.audio.TtsHttpService
Explicit HTTP TTS (audio design §8): POST SSE, audio frames as base64 at
output.audio
(string or .data) or output.binary. Path routed by model name; all speech knobs
live inside input (2.x parity).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResponseStream<byte[]>stream(TtsSynthesizeParams params) Streaming synthesis; frames carrying no audio (usage-only tails) are skipped.ResponseStream<byte[]>stream(TtsSynthesizeParams params, RequestOptions options) byte[]synthesize(TtsSynthesizeParams params) One-shot synthesis: streams internally and aggregates.byte[]synthesize(TtsSynthesizeParams params, RequestOptions options)
-
Constructor Details
-
TtsHttpService
-
-
Method Details
-
synthesize
One-shot synthesis: streams internally and aggregates. Peak memory = the whole audio; preferstream(com.alibaba.dashscope.types.audio.TtsSynthesizeParams)for long text. -
synthesize
-
stream
Streaming synthesis; frames carrying no audio (usage-only tails) are skipped. -
stream
-