Package org.springframework.ai.audio.tts
Interface TextToSpeechOptions
- All Superinterfaces:
ModelOptions
- All Known Implementing Classes:
DefaultTextToSpeechOptions
,ElevenLabsTextToSpeechOptions
Interface for text-to-speech model options. Defines the common, portable options that
should be supported by all implementations.
- Author:
- Alexandros Pappas
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic TextToSpeechOptions.Builder
builder()
Creates a newTextToSpeechOptions.Builder
to create the defaultTextToSpeechOptions
.<T extends TextToSpeechOptions>
Tcopy()
Returns a copy of thisTextToSpeechOptions
.Returns the output format for the generated audio.getModel()
Returns the model to use for text-to-speech.getSpeed()
Returns the speed of the generated speech.getVoice()
Returns the voice to use for text-to-speech.
-
Method Details
-
builder
Creates a newTextToSpeechOptions.Builder
to create the defaultTextToSpeechOptions
.- Returns:
- Returns a new
TextToSpeechOptions.Builder
.
-
getModel
Returns the model to use for text-to-speech.- Returns:
- The model name.
-
getVoice
Returns the voice to use for text-to-speech.- Returns:
- The voice identifier.
-
getFormat
Returns the output format for the generated audio.- Returns:
- The output format (e.g., "mp3", "wav").
-
getSpeed
Returns the speed of the generated speech.- Returns:
- The speech speed.
-
copy
Returns a copy of thisTextToSpeechOptions
.- Returns:
- a copy of this
TextToSpeechOptions
-