pub struct VoiceTiming {
pub reprompt_after_ms: Option<u64>,
pub reprompt: Option<String>,
pub filler_after_ms: Option<u64>,
pub interruptible: Option<bool>,
pub end_of_speech_ms: Option<u64>,
pub context_delivery: Option<ContextDelivery>,
}Expand description
Voice pacing for one stage. Every field is optional; an unset field leaves the session’s own behaviour alone.
Fields§
§reprompt_after_ms: Option<u64>Reprompt once the user has been silent this long (ms) with the floor theirs.
reprompt: Option<String>What to tell the model when reprompting. Defaults to
DEFAULT_REPROMPT.
filler_after_ms: Option<u64>Cue a filler when a tool call runs longer than this (ms).
interruptible: Option<bool>Some(false) holds the floor for the model: the user cannot barge in
while it speaks (statutory readouts, disclosures).
end_of_speech_ms: Option<u64>How long a pause must last before the user’s turn ends (ms), under client activity authority.
context_delivery: Option<ContextDelivery>Context delivery while this stage is active.
Implementations§
Source§impl VoiceTiming
impl VoiceTiming
Sourcepub fn reprompt_after(self, silence: Duration) -> Self
pub fn reprompt_after(self, silence: Duration) -> Self
Reprompt after silence with the default reprompt.
Sourcepub fn reprompt_with(self, silence: Duration, text: impl Into<String>) -> Self
pub fn reprompt_with(self, silence: Duration, text: impl Into<String>) -> Self
Reprompt after silence, telling the model text.
Sourcepub fn filler_after(self, after: Duration) -> Self
pub fn filler_after(self, after: Duration) -> Self
Cue a filler once a tool call has run for after.
Sourcepub fn uninterruptible(self) -> Self
pub fn uninterruptible(self) -> Self
The user cannot interrupt the model in this stage.
Sourcepub fn end_of_speech(self, pause: Duration) -> Self
pub fn end_of_speech(self, pause: Duration) -> Self
The user’s turn ends after a pause of pause.
Sourcepub fn context_delivery(self, delivery: ContextDelivery) -> Self
pub fn context_delivery(self, delivery: ContextDelivery) -> Self
Deliver steering context this way while the stage is active.
Sourcepub fn holds_floor(&self) -> bool
pub fn holds_floor(&self) -> bool
Whether the model holds the floor (the user cannot barge in).
Sourcepub fn reprompt_text(&self) -> &str
pub fn reprompt_text(&self) -> &str
The reprompt text to send.
Sourcepub fn merge(&self, other: &Self) -> Self
pub fn merge(&self, other: &Self) -> Self
Combine the timing of two steps active at once, taking the more
cautious setting of each: the shorter reprompt and filler waits, the
longer end-of-speech pause, and no barge-in if either forbids it.
Context delivery and reprompt text come from self when set.
Trait Implementations§
Source§impl Clone for VoiceTiming
impl Clone for VoiceTiming
Source§fn clone(&self) -> VoiceTiming
fn clone(&self) -> VoiceTiming
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VoiceTiming
impl Debug for VoiceTiming
Source§impl Default for VoiceTiming
impl Default for VoiceTiming
Source§fn default() -> VoiceTiming
fn default() -> VoiceTiming
Source§impl<'de> Deserialize<'de> for VoiceTimingwhere
VoiceTiming: Default,
impl<'de> Deserialize<'de> for VoiceTimingwhere
VoiceTiming: Default,
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 JsonSchema for VoiceTiming
impl JsonSchema for VoiceTiming
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for VoiceTiming
impl PartialEq for VoiceTiming
Source§impl Serialize for VoiceTiming
impl Serialize for VoiceTiming
impl Eq for VoiceTiming
impl StructuralPartialEq for VoiceTiming
Auto Trait Implementations§
impl Freeze for VoiceTiming
impl RefUnwindSafe for VoiceTiming
impl Send for VoiceTiming
impl Sync for VoiceTiming
impl Unpin for VoiceTiming
impl UnwindSafe for VoiceTiming
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].