Class ConversationItemInputAudioTranscriptionCompletedEvent
-
- All Implemented Interfaces:
public final class ConversationItemInputAudioTranscriptionCompletedEvent
This event is the output of audio transcription for user audio written to the user audio buffer. Transcription begins when the input audio buffer is committed by the client or server (when VAD is enabled). Transcription runs asynchronously with Response creation, so this event may come before or after the Response events.
Realtime API models accept audio natively, and thus input transcription is a separate process run on a separate ASR (Automatic Speech Recognition) model. The transcript may diverge somewhat from the model's interpretation, and should be treated as a rough guide.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ConversationItemInputAudioTranscriptionCompletedEvent.Builder
A builder for ConversationItemInputAudioTranscriptionCompletedEvent.
public final class
ConversationItemInputAudioTranscriptionCompletedEvent.Usage
Usage statistics for the transcription, this is billed according to the ASR model's pricing rather than the realtime model's pricing.
-
Method Summary
Modifier and Type Method Description final Long
contentIndex()
The index of the content part containing the audio. final String
eventId()
The unique ID of the server event. final String
itemId()
The ID of the item containing the audio that is being transcribed. final String
transcript()
The transcribed text. final JsonValue
_type()
The event type, must be conversation.item.input_audio_transcription.completed
.final ConversationItemInputAudioTranscriptionCompletedEvent.Usage
usage()
Usage statistics for the transcription, this is billed according to the ASR model's pricing rather than the realtime model's pricing. final Optional<List<LogProbProperties>>
logprobs()
The log probabilities of the transcription. final JsonField<Long>
_contentIndex()
Returns the raw JSON value of contentIndex. final JsonField<String>
_eventId()
Returns the raw JSON value of eventId. final JsonField<String>
_itemId()
Returns the raw JSON value of itemId. final JsonField<String>
_transcript()
Returns the raw JSON value of transcript. final JsonField<ConversationItemInputAudioTranscriptionCompletedEvent.Usage>
_usage()
Returns the raw JSON value of usage. final JsonField<List<LogProbProperties>>
_logprobs()
Returns the raw JSON value of logprobs. final Map<String, JsonValue>
_additionalProperties()
final ConversationItemInputAudioTranscriptionCompletedEvent.Builder
toBuilder()
final ConversationItemInputAudioTranscriptionCompletedEvent
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ConversationItemInputAudioTranscriptionCompletedEvent.Builder
builder()
Returns a mutable builder for constructing an instance of ConversationItemInputAudioTranscriptionCompletedEvent. -
-
Method Detail
-
contentIndex
final Long contentIndex()
The index of the content part containing the audio.
-
transcript
final String transcript()
The transcribed text.
-
_type
final JsonValue _type()
The event type, must be
conversation.item.input_audio_transcription.completed
.Expected to always return the following:
JsonValue.from("conversation.item.input_audio_transcription.completed")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
usage
final ConversationItemInputAudioTranscriptionCompletedEvent.Usage usage()
Usage statistics for the transcription, this is billed according to the ASR model's pricing rather than the realtime model's pricing.
-
logprobs
final Optional<List<LogProbProperties>> logprobs()
The log probabilities of the transcription.
-
_contentIndex
final JsonField<Long> _contentIndex()
Returns the raw JSON value of contentIndex.
Unlike contentIndex, this method doesn't throw if the JSON field has an unexpected type.
-
_eventId
final JsonField<String> _eventId()
Returns the raw JSON value of eventId.
Unlike eventId, this method doesn't throw if the JSON field has an unexpected type.
-
_itemId
final JsonField<String> _itemId()
Returns the raw JSON value of itemId.
Unlike itemId, this method doesn't throw if the JSON field has an unexpected type.
-
_transcript
final JsonField<String> _transcript()
Returns the raw JSON value of transcript.
Unlike transcript, this method doesn't throw if the JSON field has an unexpected type.
-
_usage
final JsonField<ConversationItemInputAudioTranscriptionCompletedEvent.Usage> _usage()
Returns the raw JSON value of usage.
Unlike usage, this method doesn't throw if the JSON field has an unexpected type.
-
_logprobs
final JsonField<List<LogProbProperties>> _logprobs()
Returns the raw JSON value of logprobs.
Unlike logprobs, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ConversationItemInputAudioTranscriptionCompletedEvent.Builder toBuilder()
-
validate
final ConversationItemInputAudioTranscriptionCompletedEvent validate()
-
builder
final static ConversationItemInputAudioTranscriptionCompletedEvent.Builder builder()
Returns a mutable builder for constructing an instance of ConversationItemInputAudioTranscriptionCompletedEvent.
The following fields are required:
.contentIndex() .eventId() .itemId() .transcript() .usage()
-
-
-
-