pub enum RealtimeTurnDetection {
ServerVAD {
create_response: Option<bool>,
idle_timeout_ms: Option<u32>,
interrupt_response: Option<bool>,
prefix_padding_ms: u32,
silence_duration_ms: u32,
threshold: f32,
},
SemanticVAD {
create_response: Option<bool>,
eagerness: String,
interrupt_response: Option<bool>,
},
}realtime only.Variants§
ServerVAD
Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.
Fields
create_response: Option<bool>Whether or not to automatically generate a response when a VAD stop event occurs.
idle_timeout_ms: Option<u32>Optional timeout after which a model response will be triggered automatically. This is useful for situations in which a long pause from the user is unexpected, such as a phone call. The model will effectively prompt the user to continue the conversation based on the current context.
The timeout value will be applied after the last model response’s audio has finished playing, i.e. it’s set to the response.done time plus audio playback duration.
An input_audio_buffer.timeout_triggered event (plus events associated with the Response) will be emitted when the timeout is reached. Idle timeout is currently only supported for server_vad mode.
interrupt_response: Option<bool>Whether or not to automatically interrupt any ongoing response with output to
the default conversation (i.e. conversation of auto) when a VAD start event occurs.
prefix_padding_ms: u32Used only for server_vad mode. Amount of audio to include before the VAD detected speech (in milliseconds). Defaults to 300ms.
SemanticVAD
Server-side semantic turn detection which uses a model to determine when the user has finished speaking.
Fields
create_response: Option<bool>Whether or not to automatically generate a response when a VAD stop event occurs.
Trait Implementations§
Source§impl Clone for RealtimeTurnDetection
impl Clone for RealtimeTurnDetection
Source§fn clone(&self) -> RealtimeTurnDetection
fn clone(&self) -> RealtimeTurnDetection
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RealtimeTurnDetection
impl Debug for RealtimeTurnDetection
Source§impl<'de> Deserialize<'de> for RealtimeTurnDetection
impl<'de> Deserialize<'de> for RealtimeTurnDetection
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>,
Auto Trait Implementations§
impl Freeze for RealtimeTurnDetection
impl RefUnwindSafe for RealtimeTurnDetection
impl Send for RealtimeTurnDetection
impl Sync for RealtimeTurnDetection
impl Unpin for RealtimeTurnDetection
impl UnwindSafe for RealtimeTurnDetection
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)