Package org.springframework.ai.openai
Class OpenAiAudioSpeechOptions.Builder
java.lang.Object
org.springframework.ai.openai.AbstractOpenAiOptions.AbstractBuilder<OpenAiAudioSpeechOptions,OpenAiAudioSpeechOptions.Builder>
org.springframework.ai.openai.OpenAiAudioSpeechOptions.Builder
- Enclosing class:
- OpenAiAudioSpeechOptions
public static final class OpenAiAudioSpeechOptions.Builder
extends AbstractOpenAiOptions.AbstractBuilder<OpenAiAudioSpeechOptions,OpenAiAudioSpeechOptions.Builder>
-
Field Summary
Fields inherited from class org.springframework.ai.openai.AbstractOpenAiOptions.AbstractBuilder
apiKey, baseUrl, credential, customHeaders, isGitHubModels, isMicrosoftFoundry, maxRetries, microsoftDeploymentName, microsoftFoundryServiceVersion, model, organizationId, proxy, timeout -
Method Summary
Modifier and TypeMethodDescriptionbuild()from(OpenAiAudioSpeechOptions fromOptions) instructions(@Nullable String instructions) Sets control instructions for the voice delivery (e.g. tone, pace).merge(@Nullable org.springframework.ai.audio.tts.TextToSpeechOptions from) responseFormat(@Nullable String responseFormat) responseFormat(@Nullable OpenAiAudioSpeechOptions.AudioResponseFormat responseFormat) voice(@Nullable OpenAiAudioSpeechOptions.Voice voice) Methods inherited from class org.springframework.ai.openai.AbstractOpenAiOptions.AbstractBuilder
apiKey, apiKey, azure, azureOpenAIServiceVersion, baseUrl, credential, customHeaders, deploymentName, gitHubModels, maxRetries, microsoftFoundry, microsoftFoundryServiceVersion, model, organizationId, proxy, self, timeout
-
Method Details
-
from
-
merge
public OpenAiAudioSpeechOptions.Builder merge(@Nullable org.springframework.ai.audio.tts.TextToSpeechOptions from) -
input
-
voice
-
voice
-
responseFormat
-
responseFormat
public OpenAiAudioSpeechOptions.Builder responseFormat(@Nullable OpenAiAudioSpeechOptions.AudioResponseFormat responseFormat) -
speed
-
instructions
Sets control instructions for the voice delivery (e.g. tone, pace). Only supported by models such asgpt-4o-mini-tts; ignored bytts-1andtts-1-hd. -
build
- Specified by:
buildin classAbstractOpenAiOptions.AbstractBuilder<OpenAiAudioSpeechOptions,OpenAiAudioSpeechOptions.Builder>
-