Class SessionCreateParams.InputAudioTranscription
-
- All Implemented Interfaces:
public final class SessionCreateParams.InputAudioTranscription
Configuration for input audio transcription, defaults to off and can be set to
null
to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through the /audio/transcriptions endpoint and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
SessionCreateParams.InputAudioTranscription.Builder
A builder for InputAudioTranscription.
-
Method Summary
Modifier and Type Method Description final Optional<String>
language()
The language of the input audio. final Optional<String>
model()
The model to use for transcription, current options are gpt-4o-transcribe
,gpt-4o-mini-transcribe
, andwhisper-1
.final Optional<String>
prompt()
An optional text to guide the model's style or continue a previous audio segment. final JsonField<String>
_language()
Returns the raw JSON value of language. final JsonField<String>
_model()
Returns the raw JSON value of model. final JsonField<String>
_prompt()
Returns the raw JSON value of prompt. final Map<String, JsonValue>
_additionalProperties()
final SessionCreateParams.InputAudioTranscription.Builder
toBuilder()
final SessionCreateParams.InputAudioTranscription
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static SessionCreateParams.InputAudioTranscription.Builder
builder()
Returns a mutable builder for constructing an instance of InputAudioTranscription. -
-
Method Detail
-
language
final Optional<String> language()
The language of the input audio. Supplying the input language in ISO-639-1 (e.g.
en
) format will improve accuracy and latency.
-
model
final Optional<String> model()
The model to use for transcription, current options are
gpt-4o-transcribe
,gpt-4o-mini-transcribe
, andwhisper-1
.
-
prompt
final Optional<String> prompt()
An optional text to guide the model's style or continue a previous audio segment. For
whisper-1
, the prompt is a list of keywords. Forgpt-4o-transcribe
models, the prompt is a free text string, for example "expect words related to technology".
-
_language
final JsonField<String> _language()
Returns the raw JSON value of language.
Unlike language, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<String> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_prompt
final JsonField<String> _prompt()
Returns the raw JSON value of prompt.
Unlike prompt, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final SessionCreateParams.InputAudioTranscription.Builder toBuilder()
-
validate
final SessionCreateParams.InputAudioTranscription validate()
-
builder
final static SessionCreateParams.InputAudioTranscription.Builder builder()
Returns a mutable builder for constructing an instance of InputAudioTranscription.
-
-
-
-