Class InputAudioBufferSpeechStartedEvent
- 
                    
                    
- All Implemented Interfaces:
 
public final class InputAudioBufferSpeechStartedEventSent by the server when in
server_vadmode to indicate that speech has been detected in the audio buffer. This can happen any time audio is added to the buffer (unless speech is already detected). The client may want to use this event to interrupt audio playback or provide visual feedback to the user.The client should expect to receive a
input_audio_buffer.speech_stoppedevent when speech stops. Theitem_idproperty is the ID of the user message item that will be created when speech stops and will also be included in theinput_audio_buffer.speech_stoppedevent (unless the client manually commits the audio buffer during VAD activation). 
- 
                
                    
                    
- 
                                
                            
                                
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classInputAudioBufferSpeechStartedEvent.BuilderA builder for InputAudioBufferSpeechStartedEvent.
 
- 
                                
                            
                                
Method Summary
Modifier and Type Method Description final LongaudioStartMs()Milliseconds from the start of all audio written to the buffer during the session when speech was first detected. final StringeventId()The unique ID of the server event. final StringitemId()The ID of the user message item that will be created when speech stops. final JsonValue_type()The event type, must be input_audio_buffer.speech_started.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 InputAudioBufferSpeechStartedEvent.BuildertoBuilder()final InputAudioBufferSpeechStartedEventvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static InputAudioBufferSpeechStartedEvent.Builderbuilder()Returns a mutable builder for constructing an instance of InputAudioBufferSpeechStartedEvent. - 
                    
                    
                    
- 
                                
                            
                                
Method Detail
- 
                                        
audioStartMs
final Long audioStartMs()
Milliseconds from the start of all audio written to the buffer during the session when speech was first detected. This will correspond to the beginning of audio sent to the model, and thus includes the
prefix_padding_msconfigured in the Session. 
- 
                                        
itemId
final String itemId()
The ID of the user message item that will be created when speech stops.
 
- 
                                        
_type
final JsonValue _type()
The event type, must be
input_audio_buffer.speech_started.Expected to always return the following:
JsonValue.from("input_audio_buffer.speech_started")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
 
- 
                                        
_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 InputAudioBufferSpeechStartedEvent.Builder toBuilder()
 
- 
                                        
validate
final InputAudioBufferSpeechStartedEvent validate()
 
- 
                                        
builder
final static InputAudioBufferSpeechStartedEvent.Builder builder()
Returns a mutable builder for constructing an instance of InputAudioBufferSpeechStartedEvent.
The following fields are required:
.audioStartMs() .eventId() .itemId() 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -