pub enum VoiceUpdate {
Show 13 variants
Ready {
session_id: String,
input_rate: u32,
output_rate: u32,
},
Listening,
Speaking,
Heard {
text: String,
},
Prompted {
decision_id: Option<String>,
version: Option<u64>,
},
Pending {
decision_id: String,
cancel_until: DateTime<Utc>,
text: String,
},
PendingAction {
action_id: String,
cancel_until: DateTime<Utc>,
text: String,
heading: String,
},
ActionOutcome {
action_id: Option<String>,
done: bool,
text: String,
heading: Option<String>,
},
Outcome {
decision_id: String,
decided: bool,
text: Option<String>,
},
NeedsScreen {
decision_ids: Vec<String>,
},
BargeIn,
Ended,
Error {
code: String,
message: String,
},
}Expand description
A text frame the server sends down the voice socket: transient voice state only (spec 3.3 §5.6).
§Example
use adk_surface::voice::VoiceUpdate;
let update = VoiceUpdate::Heard { text: "allow once".into() };
assert_eq!(serde_json::to_value(&update).unwrap(), serde_json::json!({ "type": "heard", "text": "allow once" }));Variants§
Ready
The provider session is open.
Fields
Listening
The model waits for the person.
Speaking
The model speaks.
Heard
What the person said, as transcribed.
Prompted
The decision a spoken answer would apply to now, or none.
Pending
A spoken “allow once” takes effect at cancelUntil unless cancelled.
Fields
PendingAction
A spoken screen action runs at cancelUntil unless cancelled (spec 3.3 §5.6): “Snoozing
in 5 s”, under the heading “Move News digest to 19:00”.
Fields
action_id: StringThe action, for VoiceClientMessage::CancelAction.
ActionOutcome
A spoken screen action ended, or was not taken: done, cancelled, refused, or words that match several things (spec 3.3 §5.6).
Fields
Outcome
A spoken answer ended: read the card again for how.
Fields
NeedsScreen
The open decisions voice cannot approve: “Decide on screen”.
BargeIn
The person spoke over the model: flush the audio not yet played.
Ended
The conversation ended.
Error
Something failed or was refused.
Trait Implementations§
Source§impl Clone for VoiceUpdate
impl Clone for VoiceUpdate
Source§impl Debug for VoiceUpdate
impl Debug for VoiceUpdate
Source§impl<'de> Deserialize<'de> for VoiceUpdate
impl<'de> Deserialize<'de> for VoiceUpdate
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>,
impl Eq for VoiceUpdate
Source§impl JsonSchema for VoiceUpdate
impl JsonSchema for VoiceUpdate
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
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for VoiceUpdate
impl PartialEq for VoiceUpdate
Source§impl Serialize for VoiceUpdate
impl Serialize for VoiceUpdate
impl StructuralPartialEq for VoiceUpdate
Auto Trait Implementations§
impl Forget for VoiceUpdate
impl Freeze for VoiceUpdate
impl Move for VoiceUpdate
impl RefUnwindSafe for VoiceUpdate
impl Send for VoiceUpdate
impl Sync for VoiceUpdate
impl Unpin for VoiceUpdate
impl UnsafeUnpin for VoiceUpdatewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for VoiceUpdate
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> 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