pub struct RealtimeOutputFrame { /* private fields */ }Expand description
Portable host observation of one completed realtime output frame.
Implementations§
Source§impl RealtimeOutputFrame
impl RealtimeOutputFrame
Sourcepub fn new(
batch: usize,
text_tokens: Vec<i32>,
decision_audio_tokens: Vec<i32>,
sampled_audio_tokens: Vec<i32>,
output_audio_tokens: Option<Vec<i32>>,
diagnostics: Vec<RealtimeDecisionDiagnostics>,
) -> Self
pub fn new( batch: usize, text_tokens: Vec<i32>, decision_audio_tokens: Vec<i32>, sampled_audio_tokens: Vec<i32>, output_audio_tokens: Option<Vec<i32>>, diagnostics: Vec<RealtimeDecisionDiagnostics>, ) -> Self
Creates a completed host observation in batch-major order.
Sourcepub fn text_tokens(&self) -> &[i32]
pub fn text_tokens(&self) -> &[i32]
One sampled text token per batch row.
Sourcepub fn decision_audio_tokens(&self) -> &[i32]
pub fn decision_audio_tokens(&self) -> &[i32]
Batch-major audio tokens resolved at every ordered depth decision.
Sourcepub fn sampled_audio_tokens(&self) -> &[i32]
pub fn sampled_audio_tokens(&self) -> &[i32]
Batch-major generated-audio tokens resolved for this frame.
Sourcepub fn output_audio_tokens(&self) -> Option<&[i32]>
pub fn output_audio_tokens(&self) -> Option<&[i32]>
Optional batch-major delay-aligned output-audio tokens.
Sourcepub fn diagnostics(&self) -> &[RealtimeDecisionDiagnostics]
pub fn diagnostics(&self) -> &[RealtimeDecisionDiagnostics]
Ordered decision diagnostics, empty unless explicitly requested.
Trait Implementations§
Source§impl Clone for RealtimeOutputFrame
impl Clone for RealtimeOutputFrame
Source§fn clone(&self) -> RealtimeOutputFrame
fn clone(&self) -> RealtimeOutputFrame
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 RealtimeOutputFrame
impl Debug for RealtimeOutputFrame
Source§impl PartialEq for RealtimeOutputFrame
impl PartialEq for RealtimeOutputFrame
impl StructuralPartialEq for RealtimeOutputFrame
Auto Trait Implementations§
impl Freeze for RealtimeOutputFrame
impl RefUnwindSafe for RealtimeOutputFrame
impl Send for RealtimeOutputFrame
impl Sync for RealtimeOutputFrame
impl Unpin for RealtimeOutputFrame
impl UnsafeUnpin for RealtimeOutputFrame
impl UnwindSafe for RealtimeOutputFrame
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