pub struct RealtimeSessionCreateResponseTurnDetection {
pub type: Option<String>,
pub threshold: Option<Number>,
pub prefix_padding_ms: Option<i64>,
pub silence_duration_ms: Option<i64>,
}
Expand description
Configuration for turn detection. Can be set to null
to turn off. Server
VAD means that the model will detect the start and end of speech based on
audio volume and respond at the end of user speech.
Fields§
§type: Option<String>
Type of turn detection, only server_vad
is currently supported.
threshold: Option<Number>
Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.
prefix_padding_ms: Option<i64>
Amount of audio to include before the VAD detected speech (in milliseconds). Defaults to 300ms.
silence_duration_ms: Option<i64>
Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms. With shorter values the model will respond more quickly, but may jump in on short pauses from the user.
Implementations§
Source§impl RealtimeSessionCreateResponseTurnDetection
impl RealtimeSessionCreateResponseTurnDetection
Sourcepub fn builder() -> RealtimeSessionCreateResponseTurnDetectionBuilder<((), (), (), ())>
pub fn builder() -> RealtimeSessionCreateResponseTurnDetectionBuilder<((), (), (), ())>
Create a builder for building RealtimeSessionCreateResponseTurnDetection
.
On the builder, call .r#type(...)
(optional), .threshold(...)
(optional), .prefix_padding_ms(...)
(optional), .silence_duration_ms(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of RealtimeSessionCreateResponseTurnDetection
.
Trait Implementations§
Source§impl Clone for RealtimeSessionCreateResponseTurnDetection
impl Clone for RealtimeSessionCreateResponseTurnDetection
Source§fn clone(&self) -> RealtimeSessionCreateResponseTurnDetection
fn clone(&self) -> RealtimeSessionCreateResponseTurnDetection
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for RealtimeSessionCreateResponseTurnDetection
impl Default for RealtimeSessionCreateResponseTurnDetection
Source§fn default() -> RealtimeSessionCreateResponseTurnDetection
fn default() -> RealtimeSessionCreateResponseTurnDetection
Source§impl<'de> Deserialize<'de> for RealtimeSessionCreateResponseTurnDetection
impl<'de> Deserialize<'de> for RealtimeSessionCreateResponseTurnDetection
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 RealtimeSessionCreateResponseTurnDetection
impl PartialEq for RealtimeSessionCreateResponseTurnDetection
Source§fn eq(&self, other: &RealtimeSessionCreateResponseTurnDetection) -> bool
fn eq(&self, other: &RealtimeSessionCreateResponseTurnDetection) -> bool
self
and other
values to be equal, and is used by ==
.