pub struct LangIdSession { /* private fields */ }Expand description
A language ID session.
Implementations§
Source§impl LangIdSession
impl LangIdSession
Sourcepub fn set_cancel_token(&mut self, token: &CancelToken)
pub fn set_cancel_token(&mut self, token: &CancelToken)
Install a CancelToken so an in-flight run can be aborted from
another thread (the run then returns Error::Aborted).
Replaces any previously installed token.
Sourcepub fn clear_cancel_token(&mut self)
pub fn clear_cancel_token(&mut self)
Remove any installed cancel token.
Sourcepub fn run(
&mut self,
pcm: &[f32],
options: &LangIdOptions,
) -> Result<LangIdResult>
pub fn run( &mut self, pcm: &[f32], options: &LangIdOptions, ) -> Result<LangIdResult>
Identify the language of one clip of 16 kHz mono float32 PCM. Input
longer than LangIdInfo::max_audio_ms is scored on its first max_audio_ms.
Trait Implementations§
Source§impl Debug for LangIdSession
impl Debug for LangIdSession
Source§impl Drop for LangIdSession
impl Drop for LangIdSession
impl Send for LangIdSession
Auto Trait Implementations§
impl !Sync for LangIdSession
impl Freeze for LangIdSession
impl RefUnwindSafe for LangIdSession
impl Unpin for LangIdSession
impl UnsafeUnpin for LangIdSession
impl UnwindSafe for LangIdSession
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