Class RealtimeTranscriptionSessionCreateRequest.Builder
-
- All Implemented Interfaces:
public final class RealtimeTranscriptionSessionCreateRequest.Builder
A builder for RealtimeTranscriptionSessionCreateRequest.
-
-
Method Summary
-
-
Method Detail
-
model
final RealtimeTranscriptionSessionCreateRequest.Builder model(RealtimeTranscriptionSessionCreateRequest.Model model)
ID of the model to use. The options are
gpt-4o-transcribe
,gpt-4o-mini-transcribe
, andwhisper-1
(which is powered by our open source Whisper V2 model).
-
model
final RealtimeTranscriptionSessionCreateRequest.Builder model(JsonField<RealtimeTranscriptionSessionCreateRequest.Model> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed Model value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final RealtimeTranscriptionSessionCreateRequest.Builder model(String value)
Sets model to an arbitrary String.
You should usually call model with a well-typed Model constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final RealtimeTranscriptionSessionCreateRequest.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("transcription")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
include
final RealtimeTranscriptionSessionCreateRequest.Builder include(List<RealtimeTranscriptionSessionCreateRequest.Include> include)
The set of items to include in the transcription. Current available items are:
item.input_audio_transcription.logprobs
-
include
final RealtimeTranscriptionSessionCreateRequest.Builder include(JsonField<List<RealtimeTranscriptionSessionCreateRequest.Include>> include)
Sets Builder.include to an arbitrary JSON value.
You should usually call Builder.include with a well-typed
List<Include>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addInclude
final RealtimeTranscriptionSessionCreateRequest.Builder addInclude(RealtimeTranscriptionSessionCreateRequest.Include include)
Adds a single Include to Builder.include.
-
inputAudioFormat
final RealtimeTranscriptionSessionCreateRequest.Builder inputAudioFormat(RealtimeTranscriptionSessionCreateRequest.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 RealtimeTranscriptionSessionCreateRequest.Builder inputAudioFormat(JsonField<RealtimeTranscriptionSessionCreateRequest.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 RealtimeTranscriptionSessionCreateRequest.Builder inputAudioNoiseReduction(RealtimeTranscriptionSessionCreateRequest.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 RealtimeTranscriptionSessionCreateRequest.Builder inputAudioNoiseReduction(JsonField<RealtimeTranscriptionSessionCreateRequest.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 RealtimeTranscriptionSessionCreateRequest.Builder inputAudioTranscription(RealtimeTranscriptionSessionCreateRequest.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 RealtimeTranscriptionSessionCreateRequest.Builder inputAudioTranscription(JsonField<RealtimeTranscriptionSessionCreateRequest.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.
-
turnDetection
final RealtimeTranscriptionSessionCreateRequest.Builder turnDetection(RealtimeTranscriptionSessionCreateRequest.TurnDetection turnDetection)
Configuration for turn detection. Can be set to
null
to turn off. 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.
-
turnDetection
final RealtimeTranscriptionSessionCreateRequest.Builder turnDetection(JsonField<RealtimeTranscriptionSessionCreateRequest.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 RealtimeTranscriptionSessionCreateRequest.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RealtimeTranscriptionSessionCreateRequest.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RealtimeTranscriptionSessionCreateRequest.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RealtimeTranscriptionSessionCreateRequest.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RealtimeTranscriptionSessionCreateRequest.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RealtimeTranscriptionSessionCreateRequest build()
Returns an immutable instance of RealtimeTranscriptionSessionCreateRequest.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.model()
-
-
-
-