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.Builder
Sets the model to use for text-to-speech.- Specified by:
model
in interfaceTextToSpeechOptions.Builder
- Parameters:
model
- The model name.- Returns:
- This builder.
-
voice
Description copied from interface:TextToSpeechOptions.Builder
Sets the voice to use for text-to-speech.- Specified by:
voice
in interfaceTextToSpeechOptions.Builder
- Parameters:
voice
- The voice identifier.- Returns:
- This builder.
-
format
Description copied from interface:TextToSpeechOptions.Builder
Sets the output format for the generated audio.- Specified by:
format
in interfaceTextToSpeechOptions.Builder
- Parameters:
format
- The output format (e.g., "mp3", "wav").- Returns:
- This builder.
-
speed
Description copied from interface:TextToSpeechOptions.Builder
Sets the speed of the generated speech.- Specified by:
speed
in interfaceTextToSpeechOptions.Builder
- Parameters:
speed
- The speech speed.- Returns:
- This builder.
-
build
Description copied from interface:TextToSpeechOptions.Builder
Builds theTextToSpeechOptions
.- Specified by:
build
in interfaceTextToSpeechOptions.Builder
- Returns:
- The
TextToSpeechOptions
.
-