#[non_exhaustive]pub struct AvatarConfig {
pub avatar_name: Option<String>,
pub customized_avatar: Option<CustomizedAvatar>,
pub audio_bitrate_bps: Option<u32>,
pub video_bitrate_bps: Option<u32>,
}Expand description
Live Avatar video output (Gemini 3.8 Live): a prebuilt avatar by name, or a custom one generated from a reference image.
Setting an avatar makes the model answer with synchronized 24 FPS video
(responseModalities: ["VIDEO"]), delivered as
SessionEvent::Media chunks.
let ben = AvatarConfig::prebuilt("Ben");
assert_eq!(serde_json::to_value(&ben).unwrap(), serde_json::json!({"avatarName": "Ben"}));Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.avatar_name: Option<String>Name of a prebuilt avatar (e.g. "Ben").
customized_avatar: Option<CustomizedAvatar>A custom avatar generated from a reference image (allow-listed customers only).
audio_bitrate_bps: Option<u32>Audio bitrate of the avatar stream, in bits per second.
video_bitrate_bps: Option<u32>Video bitrate of the avatar stream, in bits per second.
Implementations§
Source§impl AvatarConfig
impl AvatarConfig
Sourcepub fn custom(image: &[u8], image_mime_type: impl Into<String>) -> Self
pub fn custom(image: &[u8], image_mime_type: impl Into<String>) -> Self
A custom avatar from a reference image.
The documented requirements: PNG recommended (alpha avoids a visible
box), RGB, at least 704×1280, under 5 MB, a neutral bust shot facing
the camera. image_mime_type is sent as given; the API’s own example
uses "png". You are responsible for the consents and rights needed
to process the likeness.
Trait Implementations§
Source§impl Clone for AvatarConfig
impl Clone for AvatarConfig
Source§fn clone(&self) -> AvatarConfig
fn clone(&self) -> AvatarConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AvatarConfig
impl Debug for AvatarConfig
Source§impl Default for AvatarConfig
impl Default for AvatarConfig
Source§fn default() -> AvatarConfig
fn default() -> AvatarConfig
Source§impl<'de> Deserialize<'de> for AvatarConfig
impl<'de> Deserialize<'de> for AvatarConfig
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 AvatarConfig
impl PartialEq for AvatarConfig
Source§impl Serialize for AvatarConfig
impl Serialize for AvatarConfig
impl Eq for AvatarConfig
impl StructuralPartialEq for AvatarConfig
Auto Trait Implementations§
impl Freeze for AvatarConfig
impl RefUnwindSafe for AvatarConfig
impl Send for AvatarConfig
impl Sync for AvatarConfig
impl Unpin for AvatarConfig
impl UnwindSafe for AvatarConfig
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<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].