Package org.springframework.ai.openai
Class OpenAiAudioSpeechOptions
java.lang.Object
org.springframework.ai.openai.AbstractOpenAiOptions
org.springframework.ai.openai.OpenAiAudioSpeechOptions
- All Implemented Interfaces:
TextToSpeechOptions,ModelOptions
Configuration options for OpenAI text-to-speech using the OpenAI Java SDK.
- Author:
- Ahmed Yousri, Hyunjoon Choi, Jonghoon Park, Ilayaperumal Gopinathan
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic final classstatic enumNested classes/interfaces inherited from class org.springframework.ai.openai.AbstractOpenAiOptions
AbstractOpenAiOptions.AbstractBuilder<O extends AbstractOpenAiOptions,B extends AbstractOpenAiOptions.AbstractBuilder<O, B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Doublestatic final StringFields inherited from class org.springframework.ai.openai.AbstractOpenAiOptions
DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOpenAiAudioSpeechOptions(@Nullable String baseUrl, @Nullable String apiKey, @Nullable com.openai.credential.Credential credential, @Nullable String model, @Nullable String microsoftDeploymentName, @Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion, @Nullable String organizationId, @Nullable Boolean isMicrosoftFoundry, @Nullable Boolean isGitHubModels, @Nullable Duration timeout, @Nullable Integer maxRetries, @Nullable Proxy proxy, @Nullable Map<String, String> customHeaders, @Nullable String input, @Nullable String voice, @Nullable String responseFormat, @Nullable Double speed) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newTextToSpeechOptions.Builderto create the defaultTextToSpeechOptions.boolean@Nullable StringReturns the output format for the generated audio.@Nullable StringgetInput()getSpeed()Returns the speed of the generated speech.getVoice()Returns the voice to use for text-to-speech.inthashCode()Methods inherited from class org.springframework.ai.openai.AbstractOpenAiOptions
getApiKey, getBaseUrl, getCredential, getCustomHeaders, getDeploymentName, getMaxRetries, getMicrosoftDeploymentName, getMicrosoftFoundryServiceVersion, getModel, getOrganizationId, getProxy, getTimeout, isGitHubModels, isMicrosoftFoundryMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.audio.tts.TextToSpeechOptions
getModel
-
Field Details
-
DEFAULT_SPEECH_MODEL
- See Also:
-
DEFAULT_VOICE
-
DEFAULT_RESPONSE_FORMAT
-
DEFAULT_SPEED
-
-
Constructor Details
-
OpenAiAudioSpeechOptions
protected OpenAiAudioSpeechOptions(@Nullable String baseUrl, @Nullable String apiKey, @Nullable com.openai.credential.Credential credential, @Nullable String model, @Nullable String microsoftDeploymentName, @Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion, @Nullable String organizationId, @Nullable Boolean isMicrosoftFoundry, @Nullable Boolean isGitHubModels, @Nullable Duration timeout, @Nullable Integer maxRetries, @Nullable Proxy proxy, @Nullable Map<String, String> customHeaders, @Nullable String input, @Nullable String voice, @Nullable String responseFormat, @Nullable Double speed)
-
-
Method Details
-
builder
Description copied from interface:TextToSpeechOptionsCreates a newTextToSpeechOptions.Builderto create the defaultTextToSpeechOptions.- Returns:
- Returns a new
TextToSpeechOptions.Builder.
-
getInput
-
getVoice
Description copied from interface:TextToSpeechOptionsReturns the voice to use for text-to-speech.- Specified by:
getVoicein interfaceTextToSpeechOptions- Returns:
- The voice identifier.
-
getResponseFormat
-
getSpeed
Description copied from interface:TextToSpeechOptionsReturns the speed of the generated speech.- Specified by:
getSpeedin interfaceTextToSpeechOptions- Returns:
- The speech speed.
-
getFormat
Description copied from interface:TextToSpeechOptionsReturns the output format for the generated audio.- Specified by:
getFormatin interfaceTextToSpeechOptions- Returns:
- The output format (e.g., "mp3", "wav").
-
equals
-
hashCode
public int hashCode()
-