pub struct RealtimeServerEventInputAudioBufferSpeechStarted {
pub event_id: String,
pub audio_start_ms: i64,
pub item_id: String,
}Expand description
Sent by the server when in server_vad mode 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_stopped event
when speech stops. The item_id property is the ID of the user message item
that will be created when speech stops and will also be included in the
input_audio_buffer.speech_stopped event (unless the client manually commits
the audio buffer during VAD activation).
Fields§
§event_id: StringThe unique ID of the server event.
audio_start_ms: i64Milliseconds 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_ms configured in the Session.
item_id: StringThe ID of the user message item that will be created when speech stops.
Implementations§
Source§impl RealtimeServerEventInputAudioBufferSpeechStarted
impl RealtimeServerEventInputAudioBufferSpeechStarted
Sourcepub fn builder() -> RealtimeServerEventInputAudioBufferSpeechStartedBuilder<((), (), ())>
pub fn builder() -> RealtimeServerEventInputAudioBufferSpeechStartedBuilder<((), (), ())>
Create a builder for building RealtimeServerEventInputAudioBufferSpeechStarted.
On the builder, call .event_id(...), .audio_start_ms(...), .item_id(...) to set the values of the fields.
Finally, call .build() to create the instance of RealtimeServerEventInputAudioBufferSpeechStarted.
Trait Implementations§
Source§impl Clone for RealtimeServerEventInputAudioBufferSpeechStarted
impl Clone for RealtimeServerEventInputAudioBufferSpeechStarted
Source§fn clone(&self) -> RealtimeServerEventInputAudioBufferSpeechStarted
fn clone(&self) -> RealtimeServerEventInputAudioBufferSpeechStarted
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for RealtimeServerEventInputAudioBufferSpeechStarted
impl<'de> Deserialize<'de> for RealtimeServerEventInputAudioBufferSpeechStarted
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl PartialEq for RealtimeServerEventInputAudioBufferSpeechStarted
impl PartialEq for RealtimeServerEventInputAudioBufferSpeechStarted
Source§fn eq(&self, other: &RealtimeServerEventInputAudioBufferSpeechStarted) -> bool
fn eq(&self, other: &RealtimeServerEventInputAudioBufferSpeechStarted) -> bool
self and other values to be equal, and is used by ==.