Class TranscriptionSessionCreateParams.Body.Builder
-
- All Implemented Interfaces:
public final class TranscriptionSessionCreateParams.Body.Builder
A builder for Body.
-
-
Method Summary
-
-
Method Detail
-
clientSecret
final TranscriptionSessionCreateParams.Body.Builder clientSecret(TranscriptionSessionCreateParams.ClientSecret clientSecret)
Configuration options for the generated client secret.
-
clientSecret
final TranscriptionSessionCreateParams.Body.Builder clientSecret(JsonField<TranscriptionSessionCreateParams.ClientSecret> clientSecret)
Sets Builder.clientSecret to an arbitrary JSON value.
You should usually call Builder.clientSecret with a well-typed ClientSecret value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
include
final TranscriptionSessionCreateParams.Body.Builder include(List<String> include)
The set of items to include in the transcription. Current available items are:
item.input_audio_transcription.logprobs
-
include
final TranscriptionSessionCreateParams.Body.Builder include(JsonField<List<String>> include)
Sets Builder.include to an arbitrary JSON value.
You should usually call Builder.include with a well-typed
List<String>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addInclude
final TranscriptionSessionCreateParams.Body.Builder addInclude(String include)
Adds a single String to Builder.include.
-
inputAudioFormat
final TranscriptionSessionCreateParams.Body.Builder inputAudioFormat(TranscriptionSessionCreateParams.InputAudioFormat inputAudioFormat)
The format of input audio. Options are
pcm16
,g711_ulaw
, org711_alaw
. Forpcm16
, input audio must be 16-bit PCM at a 24kHz sample rate, single channel (mono), and little-endian byte order.
-
inputAudioFormat
final TranscriptionSessionCreateParams.Body.Builder inputAudioFormat(JsonField<TranscriptionSessionCreateParams.InputAudioFormat> inputAudioFormat)
Sets Builder.inputAudioFormat to an arbitrary JSON value.
You should usually call Builder.inputAudioFormat with a well-typed InputAudioFormat value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
inputAudioNoiseReduction
final TranscriptionSessionCreateParams.Body.Builder inputAudioNoiseReduction(TranscriptionSessionCreateParams.InputAudioNoiseReduction inputAudioNoiseReduction)
Configuration for input audio noise reduction. This can be set to
null
to turn off. Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
-
inputAudioNoiseReduction
final TranscriptionSessionCreateParams.Body.Builder inputAudioNoiseReduction(JsonField<TranscriptionSessionCreateParams.InputAudioNoiseReduction> inputAudioNoiseReduction)
Sets Builder.inputAudioNoiseReduction to an arbitrary JSON value.
You should usually call Builder.inputAudioNoiseReduction with a well-typed InputAudioNoiseReduction value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
inputAudioTranscription
final TranscriptionSessionCreateParams.Body.Builder inputAudioTranscription(TranscriptionSessionCreateParams.InputAudioTranscription inputAudioTranscription)
Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.
-
inputAudioTranscription
final TranscriptionSessionCreateParams.Body.Builder inputAudioTranscription(JsonField<TranscriptionSessionCreateParams.InputAudioTranscription> inputAudioTranscription)
Sets Builder.inputAudioTranscription to an arbitrary JSON value.
You should usually call Builder.inputAudioTranscription with a well-typed InputAudioTranscription value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
modalities
final TranscriptionSessionCreateParams.Body.Builder modalities(List<TranscriptionSessionCreateParams.Modality> modalities)
The set of modalities the model can respond with. To disable audio, set this to "text".
-
modalities
final TranscriptionSessionCreateParams.Body.Builder modalities(JsonField<List<TranscriptionSessionCreateParams.Modality>> modalities)
Sets Builder.modalities to an arbitrary JSON value.
You should usually call Builder.modalities with a well-typed
List<Modality>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addModality
final TranscriptionSessionCreateParams.Body.Builder addModality(TranscriptionSessionCreateParams.Modality modality)
Adds a single Modality to modalities.
-
turnDetection
final TranscriptionSessionCreateParams.Body.Builder turnDetection(TranscriptionSessionCreateParams.TurnDetection turnDetection)
Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to
null
to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.
-
turnDetection
final TranscriptionSessionCreateParams.Body.Builder turnDetection(JsonField<TranscriptionSessionCreateParams.TurnDetection> turnDetection)
Sets Builder.turnDetection to an arbitrary JSON value.
You should usually call Builder.turnDetection with a well-typed TurnDetection value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final TranscriptionSessionCreateParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final TranscriptionSessionCreateParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final TranscriptionSessionCreateParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final TranscriptionSessionCreateParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final TranscriptionSessionCreateParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final TranscriptionSessionCreateParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-