Package org.springframework.ai.audio.tts
Interface TextToSpeechOptions.Builder
- All Known Implementing Classes:
DefaultTextToSpeechOptions.Builder
- Enclosing interface:
- TextToSpeechOptions
public static interface TextToSpeechOptions.Builder
Builder for
TextToSpeechOptions
.-
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.
-
Method Details
-
model
Sets the model to use for text-to-speech.- Parameters:
model
- The model name.- Returns:
- This builder.
-
voice
Sets the voice to use for text-to-speech.- Parameters:
voice
- The voice identifier.- Returns:
- This builder.
-
format
Sets the output format for the generated audio.- Parameters:
format
- The output format (e.g., "mp3", "wav").- Returns:
- This builder.
-
speed
Sets the speed of the generated speech.- Parameters:
speed
- The speech speed.- Returns:
- This builder.
-
build
TextToSpeechOptions build()Builds theTextToSpeechOptions
.- Returns:
- The
TextToSpeechOptions
.
-