Class ElevenLabsTextToSpeechModel
java.lang.Object
org.springframework.ai.elevenlabs.ElevenLabsTextToSpeechModel
- All Implemented Interfaces:
StreamingTextToSpeechModel,TextToSpeechModel,Model<TextToSpeechPrompt,,TextToSpeechResponse> StreamingModel<TextToSpeechPrompt,TextToSpeechResponse>
public class ElevenLabsTextToSpeechModel
extends Object
implements TextToSpeechModel, StreamingTextToSpeechModel
Implementation of the
TextToSpeechModel and StreamingTextToSpeechModel
interfaces- Author:
- Alexandros Pappas
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionElevenLabsTextToSpeechModel(ElevenLabsApi elevenLabsApi, ElevenLabsTextToSpeechOptions defaultOptions) ElevenLabsTextToSpeechModel(ElevenLabsApi elevenLabsApi, ElevenLabsTextToSpeechOptions defaultOptions, org.springframework.retry.support.RetryTemplate retryTemplate) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()call(TextToSpeechPrompt prompt) Executes a method call to the AI model.reactor.core.publisher.Flux<TextToSpeechResponse>stream(TextToSpeechPrompt prompt) Executes a method call to the AI model.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
-
Constructor Details
-
ElevenLabsTextToSpeechModel
public ElevenLabsTextToSpeechModel(ElevenLabsApi elevenLabsApi, ElevenLabsTextToSpeechOptions defaultOptions) -
ElevenLabsTextToSpeechModel
public ElevenLabsTextToSpeechModel(ElevenLabsApi elevenLabsApi, ElevenLabsTextToSpeechOptions defaultOptions, org.springframework.retry.support.RetryTemplate retryTemplate)
-
-
Method Details
-
builder
-
call
Description copied from interface:ModelExecutes a method call to the AI model.- Specified by:
callin interfaceModel<TextToSpeechPrompt,TextToSpeechResponse> - Specified by:
callin interfaceTextToSpeechModel- Parameters:
prompt- the request object to be sent to the AI model- Returns:
- the response from the AI model
-
stream
Description copied from interface:StreamingModelExecutes a method call to the AI model.- Specified by:
streamin interfaceStreamingModel<TextToSpeechPrompt,TextToSpeechResponse> - Specified by:
streamin interfaceStreamingTextToSpeechModel- Parameters:
prompt- the request object to be sent to the AI model- Returns:
- the streaming response from the AI model
-
getDefaultOptions
- Specified by:
getDefaultOptionsin interfaceTextToSpeechModel
-