pub enum TranscriptEvent {
SpeechStarted {
channel: Channel,
ts_ms: u64,
},
SpeechEnded {
channel: Channel,
ts_ms: u64,
},
Partial {
channel: Channel,
ts_ms: u64,
text: String,
},
Final {
channel: Channel,
ts_ms: u64,
end_ms: u64,
text: String,
confidence: f32,
},
Warning(String),
}Expand description
One transcript event emitted by a StreamingAsr backend.
Variants§
SpeechStarted
Backend has begun receiving speech on this channel.
Optional — not every backend emits this; consumers must not gate
finals on having seen a SpeechStarted first.
SpeechEnded
Backend has detected end of speech on this channel.
Optional, same caveat as SpeechStarted.
Partial
In-flight transcript that may be revised before becoming
Final. Render but do not persist.
Final
Stable transcript for a segment. Persist this; drop any partials
that share the same channel and overlapping ts_ms..end_ms.
Fields
Warning(String)
Backend hit a non-fatal error and continues. Fatal errors come
back from StreamingAsr::push_audio / StreamingAsr::finish
as Err.
Trait Implementations§
Source§impl Clone for TranscriptEvent
impl Clone for TranscriptEvent
Source§fn clone(&self) -> TranscriptEvent
fn clone(&self) -> TranscriptEvent
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 moreAuto Trait Implementations§
impl Freeze for TranscriptEvent
impl RefUnwindSafe for TranscriptEvent
impl Send for TranscriptEvent
impl Sync for TranscriptEvent
impl Unpin for TranscriptEvent
impl UnsafeUnpin for TranscriptEvent
impl UnwindSafe for TranscriptEvent
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