Package org.springframework.ai.audio.tts
Class DefaultTextToSpeechOptions.Builder
java.lang.Object
org.springframework.ai.audio.tts.DefaultTextToSpeechOptions.Builder
- All Implemented Interfaces:
TextToSpeechOptions.Builder
- Enclosing class:
- DefaultTextToSpeechOptions
public static final class DefaultTextToSpeechOptions.Builder
extends Object
implements TextToSpeechOptions.Builder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theTextToSpeechOptions.Sets the output format for the generated audio.Sets the model to use for text-to-speech.Sets the speed of the generated speech.Sets the voice to use for text-to-speech.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
model
Description copied from interface:TextToSpeechOptions.BuilderSets the model to use for text-to-speech.- Specified by:
modelin interfaceTextToSpeechOptions.Builder- Parameters:
model- The model name.- Returns:
- This builder.
-
voice
Description copied from interface:TextToSpeechOptions.BuilderSets the voice to use for text-to-speech.- Specified by:
voicein interfaceTextToSpeechOptions.Builder- Parameters:
voice- The voice identifier.- Returns:
- This builder.
-
format
Description copied from interface:TextToSpeechOptions.BuilderSets the output format for the generated audio.- Specified by:
formatin interfaceTextToSpeechOptions.Builder- Parameters:
format- The output format (e.g., "mp3", "wav").- Returns:
- This builder.
-
speed
Description copied from interface:TextToSpeechOptions.BuilderSets the speed of the generated speech.- Specified by:
speedin interfaceTextToSpeechOptions.Builder- Parameters:
speed- The speech speed.- Returns:
- This builder.
-
build
Description copied from interface:TextToSpeechOptions.BuilderBuilds theTextToSpeechOptions.- Specified by:
buildin interfaceTextToSpeechOptions.Builder- Returns:
- The
TextToSpeechOptions.
-