Class TranscriptionSession.Builder
-
- All Implemented Interfaces:
public final class TranscriptionSession.Builder
A builder for TranscriptionSession.
-
-
Method Summary
-
-
Method Detail
-
clientSecret
final TranscriptionSession.Builder clientSecret(TranscriptionSession.ClientSecret clientSecret)
Ephemeral key returned by the API. Only present when the session is created on the server via REST API.
-
clientSecret
final TranscriptionSession.Builder clientSecret(JsonField<TranscriptionSession.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.
-
inputAudioFormat
final TranscriptionSession.Builder inputAudioFormat(String inputAudioFormat)
The format of input audio. Options are
pcm16
,g711_ulaw
, org711_alaw
.
-
inputAudioFormat
final TranscriptionSession.Builder inputAudioFormat(JsonField<String> inputAudioFormat)
Sets Builder.inputAudioFormat to an arbitrary JSON value.
You should usually call Builder.inputAudioFormat with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
inputAudioTranscription
final TranscriptionSession.Builder inputAudioTranscription(TranscriptionSession.InputAudioTranscription inputAudioTranscription)
Configuration of the transcription model.
-
inputAudioTranscription
final TranscriptionSession.Builder inputAudioTranscription(JsonField<TranscriptionSession.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 TranscriptionSession.Builder modalities(List<TranscriptionSession.Modality> modalities)
The set of modalities the model can respond with. To disable audio, set this to "text".
-
modalities
final TranscriptionSession.Builder modalities(JsonField<List<TranscriptionSession.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 TranscriptionSession.Builder addModality(TranscriptionSession.Modality modality)
Adds a single Modality to modalities.
-
turnDetection
final TranscriptionSession.Builder turnDetection(TranscriptionSession.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 TranscriptionSession.Builder turnDetection(JsonField<TranscriptionSession.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 TranscriptionSession.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final TranscriptionSession.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final TranscriptionSession.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final TranscriptionSession.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final TranscriptionSession.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final TranscriptionSession build()
Returns an immutable instance of TranscriptionSession.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.clientSecret()
-
-
-
-