Class OpenAiAudioSpeechOptions

java.lang.Object
org.springframework.ai.openai.AbstractOpenAiOptions
org.springframework.ai.openai.OpenAiAudioSpeechOptions
All Implemented Interfaces:
org.springframework.ai.audio.tts.TextToSpeechOptions, org.springframework.ai.model.ModelOptions

public class OpenAiAudioSpeechOptions extends AbstractOpenAiOptions implements org.springframework.ai.audio.tts.TextToSpeechOptions
Configuration options for OpenAI text-to-speech using the OpenAI Java SDK.
Author:
Ahmed Yousri, Hyunjoon Choi, Jonghoon Park, Ilayaperumal Gopinathan
  • Field Details

    • DEFAULT_SPEECH_MODEL

      public static final String DEFAULT_SPEECH_MODEL
      See Also:
    • DEFAULT_VOICE

      public static final String DEFAULT_VOICE
    • DEFAULT_RESPONSE_FORMAT

      public static final String DEFAULT_RESPONSE_FORMAT
    • DEFAULT_SPEED

      public static final Double 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, @Nullable String instructions)
  • Method Details

    • builder

      public static OpenAiAudioSpeechOptions.Builder builder()
    • getInput

      public @Nullable String getInput()
    • getVoice

      public String getVoice()
      Specified by:
      getVoice in interface org.springframework.ai.audio.tts.TextToSpeechOptions
    • getResponseFormat

      public String getResponseFormat()
    • getInstructions

      public @Nullable String getInstructions()
    • getSpeed

      public Double getSpeed()
      Specified by:
      getSpeed in interface org.springframework.ai.audio.tts.TextToSpeechOptions
    • getFormat

      public @Nullable String getFormat()
      Specified by:
      getFormat in interface org.springframework.ai.audio.tts.TextToSpeechOptions
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object