Class DashScopeAudioSpeechModel
java.lang.Object
com.alibaba.cloud.ai.dashscope.audio.DashScopeAudioSpeechModel
- All Implemented Interfaces:
org.springframework.ai.audio.tts.StreamingTextToSpeechModel,org.springframework.ai.audio.tts.TextToSpeechModel,org.springframework.ai.model.Model<org.springframework.ai.audio.tts.TextToSpeechPrompt,,org.springframework.ai.audio.tts.TextToSpeechResponse> org.springframework.ai.model.StreamingModel<org.springframework.ai.audio.tts.TextToSpeechPrompt,org.springframework.ai.audio.tts.TextToSpeechResponse>
public class DashScopeAudioSpeechModel
extends Object
implements org.springframework.ai.audio.tts.TextToSpeechModel
Audio Speech: input text, output audio.
- Author:
- kevinlin09, xuguan
-
Constructor Summary
ConstructorsConstructorDescriptionDashScopeAudioSpeechModel(DashScopeAudioSpeechApi audioSpeechApi) DashScopeAudioSpeechModel(DashScopeAudioSpeechApi audioSpeechApi, DashScopeAudioSpeechOptions defaultOptions) DashScopeAudioSpeechModel(DashScopeAudioSpeechApi audioSpeechApi, DashScopeAudioSpeechOptions defaultOptions, org.springframework.retry.support.RetryTemplate retryTemplate) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.ai.audio.tts.TextToSpeechResponsecall(org.springframework.ai.audio.tts.TextToSpeechPrompt prompt) createRequest(org.springframework.ai.audio.tts.TextToSpeechPrompt prompt, String taskId, DashScopeWebSocketClient.EventType action) reactor.core.publisher.Flux<org.springframework.ai.audio.tts.TextToSpeechResponse>stream(org.springframework.ai.audio.tts.TextToSpeechPrompt prompt) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.audio.tts.StreamingTextToSpeechModel
stream, streamMethods inherited from interface org.springframework.ai.audio.tts.TextToSpeechModel
call, getDefaultOptions
-
Constructor Details
-
DashScopeAudioSpeechModel
-
DashScopeAudioSpeechModel
public DashScopeAudioSpeechModel(DashScopeAudioSpeechApi audioSpeechApi, DashScopeAudioSpeechOptions defaultOptions) -
DashScopeAudioSpeechModel
public DashScopeAudioSpeechModel(DashScopeAudioSpeechApi audioSpeechApi, DashScopeAudioSpeechOptions defaultOptions, org.springframework.retry.support.RetryTemplate retryTemplate)
-
-
Method Details
-
call
public org.springframework.ai.audio.tts.TextToSpeechResponse call(org.springframework.ai.audio.tts.TextToSpeechPrompt prompt) - Specified by:
callin interfaceorg.springframework.ai.model.Model<org.springframework.ai.audio.tts.TextToSpeechPrompt,org.springframework.ai.audio.tts.TextToSpeechResponse> - Specified by:
callin interfaceorg.springframework.ai.audio.tts.TextToSpeechModel
-
stream
public reactor.core.publisher.Flux<org.springframework.ai.audio.tts.TextToSpeechResponse> stream(org.springframework.ai.audio.tts.TextToSpeechPrompt prompt) - Specified by:
streamin interfaceorg.springframework.ai.model.StreamingModel<org.springframework.ai.audio.tts.TextToSpeechPrompt,org.springframework.ai.audio.tts.TextToSpeechResponse> - Specified by:
streamin interfaceorg.springframework.ai.audio.tts.StreamingTextToSpeechModel
-
createRequest
public DashScopeAudioSpeechApi.Request createRequest(org.springframework.ai.audio.tts.TextToSpeechPrompt prompt, String taskId, DashScopeWebSocketClient.EventType action)
-