pub struct RealtimeSessionTurnDetection {
pub type: String,
pub eagerness: Option<String>,
pub threshold: Option<f64>,
pub prefix_padding_ms: Option<i32>,
pub silence_duration_ms: Option<i32>,
pub create_response: Option<bool>,
pub interrupt_response: Option<bool>,
}Expand description
Configuration for turn detection (VAD) in a Realtime session.
§Used By
RealtimeSessionRealtimeSessionCreateResponseRealtimeSessionCreateRequestRealtimeTranscriptionSessionCreateResponseRealtimeTranscriptionSessionCreateRequest
Fields§
§type: StringType of turn detection (server_vad or semantic_vad). Defaults to server_vad.
eagerness: Option<String>Eagerness for semantic_vad (low, medium, high, auto). Defaults to auto.
threshold: Option<f64>Activation threshold for server_vad (0.0 to 1.0). Defaults to 0.5.
prefix_padding_ms: Option<i32>Audio padding before VAD start for server_vad (ms). Defaults to 300ms.
silence_duration_ms: Option<i32>Silence duration to detect speech stop for server_vad (ms). Defaults to 500ms.
create_response: Option<bool>Whether to automatically create a response on VAD stop. Defaults to true.
interrupt_response: Option<bool>Whether to automatically interrupt ongoing response on VAD start. Defaults to true. Not applicable for transcription sessions.
Implementations§
Source§impl RealtimeSessionTurnDetection
impl RealtimeSessionTurnDetection
Sourcepub fn former() -> RealtimeSessionTurnDetectionFormer<RealtimeSessionTurnDetectionFormerDefinition<(), RealtimeSessionTurnDetection, ReturnPreformed>>
pub fn former() -> RealtimeSessionTurnDetectionFormer<RealtimeSessionTurnDetectionFormerDefinition<(), RealtimeSessionTurnDetection, ReturnPreformed>>
Provides a mechanism to initiate the formation process with a default completion behavior.
Trait Implementations§
Source§impl Clone for RealtimeSessionTurnDetection
impl Clone for RealtimeSessionTurnDetection
Source§fn clone(&self) -> RealtimeSessionTurnDetection
fn clone(&self) -> RealtimeSessionTurnDetection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RealtimeSessionTurnDetection
impl Debug for RealtimeSessionTurnDetection
Source§impl<'de> Deserialize<'de> for RealtimeSessionTurnDetection
impl<'de> Deserialize<'de> for RealtimeSessionTurnDetection
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<__Context, __Formed, __End> EntityToDefinition<__Context, __Formed, __End> for RealtimeSessionTurnDetectionwhere
__End: FormingEnd<RealtimeSessionTurnDetectionFormerDefinitionTypes<__Context, __Formed>>,
impl<__Context, __Formed, __End> EntityToDefinition<__Context, __Formed, __End> for RealtimeSessionTurnDetectionwhere
__End: FormingEnd<RealtimeSessionTurnDetectionFormerDefinitionTypes<__Context, __Formed>>,
Source§type Definition = RealtimeSessionTurnDetectionFormerDefinition<__Context, __Formed, __End>
type Definition = RealtimeSessionTurnDetectionFormerDefinition<__Context, __Formed, __End>
FormerDefinition associated with this entity. Read moreSource§type Types = RealtimeSessionTurnDetectionFormerDefinitionTypes<__Context, __Formed>
type Types = RealtimeSessionTurnDetectionFormerDefinitionTypes<__Context, __Formed>
FormerDefinitionTypes associated with this entity. Read moreSource§impl<__Context, __Formed> EntityToDefinitionTypes<__Context, __Formed> for RealtimeSessionTurnDetection
impl<__Context, __Formed> EntityToDefinitionTypes<__Context, __Formed> for RealtimeSessionTurnDetection
Source§impl<Definition> EntityToFormer<Definition> for RealtimeSessionTurnDetectionwhere
Definition: FormerDefinition<Storage = RealtimeSessionTurnDetectionFormerStorage>,
impl<Definition> EntityToFormer<Definition> for RealtimeSessionTurnDetectionwhere
Definition: FormerDefinition<Storage = RealtimeSessionTurnDetectionFormerStorage>,
Source§impl PartialEq for RealtimeSessionTurnDetection
impl PartialEq for RealtimeSessionTurnDetection
Source§fn eq(&self, other: &RealtimeSessionTurnDetection) -> bool
fn eq(&self, other: &RealtimeSessionTurnDetection) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RealtimeSessionTurnDetection
Auto Trait Implementations§
impl Freeze for RealtimeSessionTurnDetection
impl RefUnwindSafe for RealtimeSessionTurnDetection
impl Send for RealtimeSessionTurnDetection
impl Sync for RealtimeSessionTurnDetection
impl Unpin for RealtimeSessionTurnDetection
impl UnwindSafe for RealtimeSessionTurnDetection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Source§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
Entry in complex collections.
For example, in a HashMap, while Entry might be a ( key, value ) tuple, Val might only be the value part.Source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry function of the CollectionValToEntry trait to convert the value to an entry.
Source§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Entry is defined by the Collection trait.