Package org.springframework.ai.audio.tts
Interface StreamingTextToSpeechModel
- All Superinterfaces:
StreamingModel<TextToSpeechPrompt,TextToSpeechResponse>
- All Known Subinterfaces:
TextToSpeechModel
- All Known Implementing Classes:
ElevenLabsTextToSpeechModel,OpenAiAudioSpeechModel
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface StreamingTextToSpeechModel
extends StreamingModel<TextToSpeechPrompt,TextToSpeechResponse>
Interface for the streaming text to speech model.
- Author:
- Alexandros Pappas
-
Method Summary
Modifier and TypeMethodDescriptiondefault reactor.core.publisher.Flux<byte[]>default reactor.core.publisher.Flux<byte[]>stream(String text, TextToSpeechOptions options) reactor.core.publisher.Flux<TextToSpeechResponse>stream(TextToSpeechPrompt prompt) Executes a method call to the AI model.
-
Method Details
-
stream
-
stream
-
stream
Description copied from interface:StreamingModelExecutes a method call to the AI model.- Specified by:
streamin interfaceStreamingModel<TextToSpeechPrompt,TextToSpeechResponse> - Parameters:
prompt- the request object to be sent to the AI model- Returns:
- the streaming response from the AI model
-