Package org.springframework.ai.openai
Class OpenAiAudioSpeechOptions
java.lang.Object
org.springframework.ai.openai.OpenAiAudioSpeechOptions
- All Implemented Interfaces:
TextToSpeechOptions,ModelOptions
Options for OpenAI text to audio - speech synthesis.
- Since:
- 1.0.0-M1
- Author:
- Ahmed Yousri, Hyunjoon Choi, Ilayaperumal Gopinathan, Jonghoon Park
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newTextToSpeechOptions.Builderto create the defaultTextToSpeechOptions.copy()Returns a copy of thisTextToSpeechOptions.booleanReturns the output format for the generated audio.getInput()getModel()Returns the model to use for text-to-speech.getSpeed()Returns the speed of the generated speech.getVoice()Returns the voice to use for text-to-speech.inthashCode()voidvoidvoidsetResponseFormat(OpenAiAudioApi.SpeechRequest.AudioResponseFormat responseFormat) voidvoidvoidtoString()
-
Constructor Details
-
OpenAiAudioSpeechOptions
public OpenAiAudioSpeechOptions()
-
-
Method Details
-
builder
Description copied from interface:TextToSpeechOptionsCreates a newTextToSpeechOptions.Builderto create the defaultTextToSpeechOptions.- Returns:
- Returns a new
TextToSpeechOptions.Builder.
-
getModel
Description copied from interface:TextToSpeechOptionsReturns the model to use for text-to-speech.- Specified by:
getModelin interfaceTextToSpeechOptions- Returns:
- The model name.
-
setModel
-
getInput
-
setInput
-
getVoice
Description copied from interface:TextToSpeechOptionsReturns the voice to use for text-to-speech.- Specified by:
getVoicein interfaceTextToSpeechOptions- Returns:
- The voice identifier.
-
setVoice
-
setVoice
-
getResponseFormat
-
setResponseFormat
-
getSpeed
Description copied from interface:TextToSpeechOptionsReturns the speed of the generated speech.- Specified by:
getSpeedin interfaceTextToSpeechOptions- Returns:
- The speech speed.
-
setSpeed
-
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").
-
copy
Description copied from interface:TextToSpeechOptionsReturns a copy of thisTextToSpeechOptions.- Specified by:
copyin interfaceTextToSpeechOptions- Returns:
- a copy of this
TextToSpeechOptions
-
hashCode
public int hashCode() -
equals
-
toString
-