Class TranscriptionSessionUpdate.Session.Builder
-
- All Implemented Interfaces:
public final class TranscriptionSessionUpdate.Session.Builder
A builder for Session.
-
-
Method Summary
-
-
Method Detail
-
clientSecret
final TranscriptionSessionUpdate.Session.Builder clientSecret(TranscriptionSessionUpdate.Session.ClientSecret clientSecret)
Configuration options for the generated client secret.
-
clientSecret
final TranscriptionSessionUpdate.Session.Builder clientSecret(JsonField<TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.Builder addInclude(String include)
Adds a single String to Builder.include.
-
inputAudioFormat
final TranscriptionSessionUpdate.Session.Builder inputAudioFormat(TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.Builder inputAudioFormat(JsonField<TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.Builder inputAudioNoiseReduction(TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.Builder inputAudioNoiseReduction(JsonField<TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.Builder inputAudioTranscription(TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.Builder inputAudioTranscription(JsonField<TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.Builder modalities(List<TranscriptionSessionUpdate.Session.Modality> modalities)
The set of modalities the model can respond with. To disable audio, set this to "text".
-
modalities
final TranscriptionSessionUpdate.Session.Builder modalities(JsonField<List<TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.Builder addModality(TranscriptionSessionUpdate.Session.Modality modality)
Adds a single Modality to modalities.
-
turnDetection
final TranscriptionSessionUpdate.Session.Builder turnDetection(TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.Builder turnDetection(JsonField<TranscriptionSessionUpdate.Session.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 TranscriptionSessionUpdate.Session.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final TranscriptionSessionUpdate.Session.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final TranscriptionSessionUpdate.Session.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final TranscriptionSessionUpdate.Session.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final TranscriptionSessionUpdate.Session.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final TranscriptionSessionUpdate.Session build()
Returns an immutable instance of Session.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-