Class SpeechCreateParams.Builder
- 
                    
                    - All Implemented Interfaces:
 
 public final class SpeechCreateParams.BuilderA builder for SpeechCreateParams. 
- 
                
                    
                    - 
                                
                            
                                Method Summary- 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        bodyfinal SpeechCreateParams.Builder body(SpeechCreateParams.Body body) Sets the entire request body. This is generally only useful if you are already constructing the body separately. Otherwise, it's more convenient to use the top-level setters instead: 
 - 
                                        inputfinal SpeechCreateParams.Builder input(String input) The text to generate audio for. The maximum length is 4096 characters. 
 - 
                                        inputfinal SpeechCreateParams.Builder input(JsonField<String> input) Sets Builder.input to an arbitrary JSON value. You should usually call Builder.input with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        modelfinal SpeechCreateParams.Builder model(SpeechModel model) One of the available TTS models: tts-1,tts-1-hdorgpt-4o-mini-tts.
 - 
                                        modelfinal SpeechCreateParams.Builder model(JsonField<SpeechModel> model) Sets Builder.model to an arbitrary JSON value. You should usually call Builder.model with a well-typed SpeechModel value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        modelfinal SpeechCreateParams.Builder model(String value) Sets model to an arbitrary String. You should usually call model with a well-typed SpeechModel constant instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        voicefinal SpeechCreateParams.Builder voice(SpeechCreateParams.Voice voice) The voice to use when generating the audio. Supported voices are alloy,ash,ballad,coral,echo,fable,onyx,nova,sage,shimmer, andverse. Previews of the voices are available in the Text to speech guide.
 - 
                                        voicefinal SpeechCreateParams.Builder voice(JsonField<SpeechCreateParams.Voice> voice) Sets Builder.voice to an arbitrary JSON value. You should usually call Builder.voice with a well-typed Voice value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        voicefinal SpeechCreateParams.Builder voice(String value) Sets voice to an arbitrary String. You should usually call voice with a well-typed Voice constant instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        instructionsfinal SpeechCreateParams.Builder instructions(String instructions) Control the voice of your generated audio with additional instructions. Does not work with tts-1ortts-1-hd.
 - 
                                        instructionsfinal SpeechCreateParams.Builder instructions(JsonField<String> instructions) Sets Builder.instructions to an arbitrary JSON value. You should usually call Builder.instructions with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        responseFormatfinal SpeechCreateParams.Builder responseFormat(SpeechCreateParams.ResponseFormat responseFormat) The format to audio in. Supported formats are mp3,opus,aac,flac,wav, andpcm.
 - 
                                        responseFormatfinal SpeechCreateParams.Builder responseFormat(JsonField<SpeechCreateParams.ResponseFormat> responseFormat) Sets Builder.responseFormat to an arbitrary JSON value. You should usually call Builder.responseFormat with a well-typed ResponseFormat value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        speedfinal SpeechCreateParams.Builder speed(Double speed) The speed of the generated audio. Select a value from 0.25to4.0.1.0is the default.
 - 
                                        speedfinal SpeechCreateParams.Builder speed(JsonField<Double> speed) Sets Builder.speed to an arbitrary JSON value. You should usually call Builder.speed with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        streamFormatfinal SpeechCreateParams.Builder streamFormat(SpeechCreateParams.StreamFormat streamFormat) The format to stream the audio in. Supported formats are sseandaudio.sseis not supported fortts-1ortts-1-hd.
 - 
                                        streamFormatfinal SpeechCreateParams.Builder streamFormat(JsonField<SpeechCreateParams.StreamFormat> streamFormat) Sets Builder.streamFormat to an arbitrary JSON value. You should usually call Builder.streamFormat with a well-typed StreamFormat value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        additionalBodyPropertiesfinal SpeechCreateParams.Builder additionalBodyProperties(Map<String, JsonValue> additionalBodyProperties) 
 - 
                                        putAdditionalBodyPropertyfinal SpeechCreateParams.Builder putAdditionalBodyProperty(String key, JsonValue value) 
 - 
                                        putAllAdditionalBodyPropertiesfinal SpeechCreateParams.Builder putAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties) 
 - 
                                        removeAdditionalBodyPropertyfinal SpeechCreateParams.Builder removeAdditionalBodyProperty(String key) 
 - 
                                        removeAllAdditionalBodyPropertiesfinal SpeechCreateParams.Builder removeAllAdditionalBodyProperties(Set<String> keys) 
 - 
                                        additionalHeadersfinal SpeechCreateParams.Builder additionalHeaders(Headers additionalHeaders) 
 - 
                                        additionalHeadersfinal SpeechCreateParams.Builder additionalHeaders(Map<String, Iterable<String>> additionalHeaders) 
 - 
                                        putAdditionalHeaderfinal SpeechCreateParams.Builder putAdditionalHeader(String name, String value) 
 - 
                                        putAdditionalHeadersfinal SpeechCreateParams.Builder putAdditionalHeaders(String name, Iterable<String> values) 
 - 
                                        putAllAdditionalHeadersfinal SpeechCreateParams.Builder putAllAdditionalHeaders(Headers additionalHeaders) 
 - 
                                        putAllAdditionalHeadersfinal SpeechCreateParams.Builder putAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders) 
 - 
                                        replaceAdditionalHeadersfinal SpeechCreateParams.Builder replaceAdditionalHeaders(String name, String value) 
 - 
                                        replaceAdditionalHeadersfinal SpeechCreateParams.Builder replaceAdditionalHeaders(String name, Iterable<String> values) 
 - 
                                        replaceAllAdditionalHeadersfinal SpeechCreateParams.Builder replaceAllAdditionalHeaders(Headers additionalHeaders) 
 - 
                                        replaceAllAdditionalHeadersfinal SpeechCreateParams.Builder replaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders) 
 - 
                                        removeAdditionalHeadersfinal SpeechCreateParams.Builder removeAdditionalHeaders(String name) 
 - 
                                        removeAllAdditionalHeadersfinal SpeechCreateParams.Builder removeAllAdditionalHeaders(Set<String> names) 
 - 
                                        additionalQueryParamsfinal SpeechCreateParams.Builder additionalQueryParams(QueryParams additionalQueryParams) 
 - 
                                        additionalQueryParamsfinal SpeechCreateParams.Builder additionalQueryParams(Map<String, Iterable<String>> additionalQueryParams) 
 - 
                                        putAdditionalQueryParamfinal SpeechCreateParams.Builder putAdditionalQueryParam(String key, String value) 
 - 
                                        putAdditionalQueryParamsfinal SpeechCreateParams.Builder putAdditionalQueryParams(String key, Iterable<String> values) 
 - 
                                        putAllAdditionalQueryParamsfinal SpeechCreateParams.Builder putAllAdditionalQueryParams(QueryParams additionalQueryParams) 
 - 
                                        putAllAdditionalQueryParamsfinal SpeechCreateParams.Builder putAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams) 
 - 
                                        replaceAdditionalQueryParamsfinal SpeechCreateParams.Builder replaceAdditionalQueryParams(String key, String value) 
 - 
                                        replaceAdditionalQueryParamsfinal SpeechCreateParams.Builder replaceAdditionalQueryParams(String key, Iterable<String> values) 
 - 
                                        replaceAllAdditionalQueryParamsfinal SpeechCreateParams.Builder replaceAllAdditionalQueryParams(QueryParams additionalQueryParams) 
 - 
                                        replaceAllAdditionalQueryParamsfinal SpeechCreateParams.Builder replaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams) 
 - 
                                        removeAdditionalQueryParamsfinal SpeechCreateParams.Builder removeAdditionalQueryParams(String key) 
 - 
                                        removeAllAdditionalQueryParamsfinal SpeechCreateParams.Builder removeAllAdditionalQueryParams(Set<String> keys) 
 - 
                                        buildfinal SpeechCreateParams build() Returns an immutable instance of SpeechCreateParams. Further updates to this Builder will not mutate the returned instance. The following fields are required: .input() .model() .voice()
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-