#[non_exhaustive]pub struct StreamingResult {
pub text: String,
pub is_final: bool,
}Expand description
Output of a single StreamingSession::transcribe_chunk call.
Contains the partial transcript up to and including the latest chunk, plus the segment boundaries that the engine identified within the buffered audio.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: StringPartial transcript (joined text).
is_final: boolTrue iff the engine considers the buffered audio complete (e.g. silence detected).
Implementations§
Source§impl StreamingResult
impl StreamingResult
Sourcepub fn partial(text: impl Into<String>) -> StreamingResult
pub fn partial(text: impl Into<String>) -> StreamingResult
Construct a non-final partial result with the given text.
Sourcepub fn final_(text: impl Into<String>) -> StreamingResult
pub fn final_(text: impl Into<String>) -> StreamingResult
Construct a final result with the given text.
Trait Implementations§
Source§impl Clone for StreamingResult
impl Clone for StreamingResult
Source§fn clone(&self) -> StreamingResult
fn clone(&self) -> StreamingResult
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 StreamingResult
impl Debug for StreamingResult
Source§impl Default for StreamingResult
impl Default for StreamingResult
Source§fn default() -> StreamingResult
fn default() -> StreamingResult
Returns the “default value” for a type. Read more
impl Eq for StreamingResult
Source§impl PartialEq for StreamingResult
impl PartialEq for StreamingResult
impl StructuralPartialEq for StreamingResult
Auto Trait Implementations§
impl Freeze for StreamingResult
impl RefUnwindSafe for StreamingResult
impl Send for StreamingResult
impl Sync for StreamingResult
impl Unpin for StreamingResult
impl UnsafeUnpin for StreamingResult
impl UnwindSafe for StreamingResult
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