pub struct RealtimeTranscriptionSessionCreateResponseTurnDetection {
pub type: Option<String>,
pub threshold: Option<f64>,
pub prefix_padding_ms: Option<u64>,
pub silence_duration_ms: Option<u64>,
}
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<f64>
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<u64>
Amount of audio to include before the VAD detected speech (in milliseconds). Defaults to 300ms.
silence_duration_ms: Option<u64>
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 RealtimeTranscriptionSessionCreateResponseTurnDetection
impl RealtimeTranscriptionSessionCreateResponseTurnDetection
Sourcepub fn builder() -> RealtimeTranscriptionSessionCreateResponseTurnDetectionBuilder<((), (), (), ())>
pub fn builder() -> RealtimeTranscriptionSessionCreateResponseTurnDetectionBuilder<((), (), (), ())>
Create a builder for building RealtimeTranscriptionSessionCreateResponseTurnDetection
.
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 RealtimeTranscriptionSessionCreateResponseTurnDetection
.
Trait Implementations§
Source§impl Clone for RealtimeTranscriptionSessionCreateResponseTurnDetection
impl Clone for RealtimeTranscriptionSessionCreateResponseTurnDetection
Source§fn clone(&self) -> RealtimeTranscriptionSessionCreateResponseTurnDetection
fn clone(&self) -> RealtimeTranscriptionSessionCreateResponseTurnDetection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for RealtimeTranscriptionSessionCreateResponseTurnDetection
impl Default for RealtimeTranscriptionSessionCreateResponseTurnDetection
Source§fn default() -> RealtimeTranscriptionSessionCreateResponseTurnDetection
fn default() -> RealtimeTranscriptionSessionCreateResponseTurnDetection
Source§impl<'de> Deserialize<'de> for RealtimeTranscriptionSessionCreateResponseTurnDetection
impl<'de> Deserialize<'de> for RealtimeTranscriptionSessionCreateResponseTurnDetection
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 RealtimeTranscriptionSessionCreateResponseTurnDetection
impl PartialEq for RealtimeTranscriptionSessionCreateResponseTurnDetection
Source§fn eq(
&self,
other: &RealtimeTranscriptionSessionCreateResponseTurnDetection,
) -> bool
fn eq( &self, other: &RealtimeTranscriptionSessionCreateResponseTurnDetection, ) -> bool
self
and other
values to be equal, and is used by ==
.