Class InputAudioBufferTimeoutTriggered
-
- All Implemented Interfaces:
public final class InputAudioBufferTimeoutTriggered
Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured with
idle_timeout_ms
in theturn_detection
settings of the session, and it indicates that there hasn't been any speech detected for the configured duration.The
audio_start_ms
andaudio_end_ms
fields indicate the segment of audio after the last model response up to the triggering time, as an offset from the beginning of audio written to the input audio buffer. This means it demarcates the segment of audio that was silent and the difference between the start and end values will roughly match the configured timeout.The empty audio will be committed to the conversation as an
input_audio
item (there will be ainput_audio_buffer.committed
event) and a model response will be generated. There may be speech that didn't trigger VAD but is still detected by the model, so the model may respond with something relevant to the conversation or a prompt to continue speaking.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
InputAudioBufferTimeoutTriggered.Builder
A builder for InputAudioBufferTimeoutTriggered.
-
Method Summary
Modifier and Type Method Description final Long
audioEndMs()
Millisecond offset of audio written to the input audio buffer at the time the timeout was triggered. final Long
audioStartMs()
Millisecond offset of audio written to the input audio buffer that was after the playback time of the last model response. final String
eventId()
The unique ID of the server event. final String
itemId()
The ID of the item associated with this segment. final JsonValue
_type()
The event type, must be input_audio_buffer.timeout_triggered
.final JsonField<Long>
_audioEndMs()
Returns the raw JSON value of audioEndMs. final JsonField<Long>
_audioStartMs()
Returns the raw JSON value of audioStartMs. final JsonField<String>
_eventId()
Returns the raw JSON value of eventId. final JsonField<String>
_itemId()
Returns the raw JSON value of itemId. final Map<String, JsonValue>
_additionalProperties()
final InputAudioBufferTimeoutTriggered.Builder
toBuilder()
final InputAudioBufferTimeoutTriggered
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static InputAudioBufferTimeoutTriggered.Builder
builder()
Returns a mutable builder for constructing an instance of InputAudioBufferTimeoutTriggered. -
-
Method Detail
-
audioEndMs
final Long audioEndMs()
Millisecond offset of audio written to the input audio buffer at the time the timeout was triggered.
-
audioStartMs
final Long audioStartMs()
Millisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.
-
_type
final JsonValue _type()
The event type, must be
input_audio_buffer.timeout_triggered
.Expected to always return the following:
JsonValue.from("input_audio_buffer.timeout_triggered")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_audioEndMs
final JsonField<Long> _audioEndMs()
Returns the raw JSON value of audioEndMs.
Unlike audioEndMs, this method doesn't throw if the JSON field has an unexpected type.
-
_audioStartMs
final JsonField<Long> _audioStartMs()
Returns the raw JSON value of audioStartMs.
Unlike audioStartMs, 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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final InputAudioBufferTimeoutTriggered.Builder toBuilder()
-
validate
final InputAudioBufferTimeoutTriggered validate()
-
builder
final static InputAudioBufferTimeoutTriggered.Builder builder()
Returns a mutable builder for constructing an instance of InputAudioBufferTimeoutTriggered.
The following fields are required:
.audioEndMs() .audioStartMs() .eventId() .itemId()
-
-
-
-