pub struct RealtimeInputFrame { /* private fields */ }Expand description
Portable host representation of one realtime input frame.
Implementations§
Source§impl RealtimeInputFrame
impl RealtimeInputFrame
Sourcepub fn new(batch: usize, input_audio_tokens: Vec<i32>) -> Self
pub fn new(batch: usize, input_audio_tokens: Vec<i32>) -> Self
Creates one batch-major encoded input-audio frame.
Sourcepub fn with_forced_generated_audio(self, tokens: Vec<i32>) -> Self
pub fn with_forced_generated_audio(self, tokens: Vec<i32>) -> Self
Forces every generated-audio decision from batch-major token values.
Sourcepub fn with_partially_forced_generated_audio(
self,
tokens: Vec<i32>,
codebooks: Vec<bool>,
) -> Self
pub fn with_partially_forced_generated_audio( self, tokens: Vec<i32>, codebooks: Vec<bool>, ) -> Self
Forces selected generated-audio codebooks from batch-major token values.
Sourcepub fn with_forced_text(self, tokens: Vec<i32>) -> Self
pub fn with_forced_text(self, tokens: Vec<i32>) -> Self
Forces one text decision per batch row.
Sourcepub fn with_diagnostics(self) -> Self
pub fn with_diagnostics(self) -> Self
Requests complete decision logits in the observed step output.
Sourcepub fn input_audio_tokens(&self) -> &[i32]
pub fn input_audio_tokens(&self) -> &[i32]
Batch-major input-audio tokens.
Sourcepub fn forced_generated_audio_tokens(&self) -> Option<&[i32]>
pub fn forced_generated_audio_tokens(&self) -> Option<&[i32]>
Optional batch-major generated-audio forcing tokens.
Sourcepub fn forced_generated_audio_codebooks(&self) -> Option<&[bool]>
pub fn forced_generated_audio_codebooks(&self) -> Option<&[bool]>
Optional generated-codebook forcing mask.
Sourcepub fn forced_text_tokens(&self) -> Option<&[i32]>
pub fn forced_text_tokens(&self) -> Option<&[i32]>
Optional forced text tokens, one per batch row.
Sourcepub const fn retains_diagnostics(&self) -> bool
pub const fn retains_diagnostics(&self) -> bool
Whether complete decision diagnostics were requested.
Trait Implementations§
Source§impl Clone for RealtimeInputFrame
impl Clone for RealtimeInputFrame
Source§fn clone(&self) -> RealtimeInputFrame
fn clone(&self) -> RealtimeInputFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RealtimeInputFrame
impl Debug for RealtimeInputFrame
impl Eq for RealtimeInputFrame
Source§impl PartialEq for RealtimeInputFrame
impl PartialEq for RealtimeInputFrame
impl StructuralPartialEq for RealtimeInputFrame
Auto Trait Implementations§
impl Freeze for RealtimeInputFrame
impl RefUnwindSafe for RealtimeInputFrame
impl Send for RealtimeInputFrame
impl Sync for RealtimeInputFrame
impl Unpin for RealtimeInputFrame
impl UnsafeUnpin for RealtimeInputFrame
impl UnwindSafe for RealtimeInputFrame
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
Mutably borrows from an owned value. Read more