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 Details

  • Method Details

    • call

      public org.springframework.ai.audio.tts.TextToSpeechResponse call(org.springframework.ai.audio.tts.TextToSpeechPrompt prompt)
      Specified by:
      call in interface org.springframework.ai.model.Model<org.springframework.ai.audio.tts.TextToSpeechPrompt,org.springframework.ai.audio.tts.TextToSpeechResponse>
      Specified by:
      call in interface org.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:
      stream in interface org.springframework.ai.model.StreamingModel<org.springframework.ai.audio.tts.TextToSpeechPrompt,org.springframework.ai.audio.tts.TextToSpeechResponse>
      Specified by:
      stream in interface org.springframework.ai.audio.tts.StreamingTextToSpeechModel
    • createRequest

      public DashScopeAudioSpeechApi.Request createRequest(org.springframework.ai.audio.tts.TextToSpeechPrompt prompt, String taskId, DashScopeWebSocketClient.EventType action)