pub struct Session<'a, T, M: Mode, L = ()> { /* private fields */ }Expand description
One transcription run over audio that arrives while the run is live.
Constructed over a recording the caller feeds, or straight from the
microphone where one exists. stop waits for input to end, drains the
tail, and returns the completed transcript.
Implementations§
Source§impl<'a, T: Transcriber, M: Mode, L: Layer> Session<'a, T, M, L>
impl<'a, T: Transcriber, M: Mode, L: Layer> Session<'a, T, M, L>
Sourcepub fn over(
transcription: &'a Transcription<T, M, L>,
language: &'a Language,
recording: RecordingReader,
) -> Result<Self, TranscriptionError>
pub fn over( transcription: &'a Transcription<T, M, L>, language: &'a Language, recording: RecordingReader, ) -> Result<Self, TranscriptionError>
Runs against a recording the caller already has. Whoever feeds it also
ends it; stop only waits for that end and finishes the transcript.
Sourcepub fn stop(self) -> Result<Transcript, TranscriptionError>
pub fn stop(self) -> Result<Transcript, TranscriptionError>
Waits for input to end, drains whatever remains, and returns the
completed transcript — or TranscriptionError::NoSpeech when
nothing was said.
Source§impl<'a, T: Transcriber, L: Layer> Session<'a, T, Streaming, L>
impl<'a, T: Transcriber, L: Layer> Session<'a, T, Streaming, L>
Sourcepub fn next_finalized(
&mut self,
) -> Result<Option<TranscriptSegment>, TranscriptionError>
pub fn next_finalized( &mut self, ) -> Result<Option<TranscriptSegment>, TranscriptionError>
The next committed stretch of words, or None once the input has
ended and the tail is delivered. Committed words are never revised.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T, M, L = ()> !RefUnwindSafe for Session<'a, T, M, L>
impl<'a, T, M, L = ()> !Sync for Session<'a, T, M, L>
impl<'a, T, M, L = ()> !UnwindSafe for Session<'a, T, M, L>
impl<'a, T, M, L> Freeze for Session<'a, T, M, L>
impl<'a, T, M, L> Send for Session<'a, T, M, L>
impl<'a, T, M, L> Unpin for Session<'a, T, M, L>
impl<'a, T, M, L> UnsafeUnpin for Session<'a, T, M, L>
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