Interface DashScopeTtsStrategy


public interface DashScopeTtsStrategy
Strategy interface for different TTS backends (Qwen-TTS, Sambert, CosyVoice, Qwen TTS Realtime).
Author:
spring-ai-alibaba
  • Method Summary

    Modifier and Type
    Method
    Description
    default org.springframework.ai.audio.tts.TextToSpeechResponse
    Synchronous call - returns full audio.
    reactor.core.publisher.Flux<org.springframework.ai.audio.tts.TextToSpeechResponse>
    Stream audio output.
    boolean
    supports(String modelName)
    Whether this strategy supports the given model.
  • Method Details

    • supports

      boolean supports(String modelName)
      Whether this strategy supports the given model.
    • call

      default org.springframework.ai.audio.tts.TextToSpeechResponse call(String text, DashScopeAudioSpeechOptions options)
      Synchronous call - returns full audio. Only supported by Qwen-TTS.
    • stream

      reactor.core.publisher.Flux<org.springframework.ai.audio.tts.TextToSpeechResponse> stream(String text, DashScopeAudioSpeechOptions options)
      Stream audio output. All models support this.