pub struct Enrollment<E> { /* private fields */ }Available on non-
target_family=wasm only.Expand description
Samples gathered so far, and the engine that measures them.
Implementations§
Source§impl<E: Engine> Enrollment<E>
impl<E: Engine> Enrollment<E>
pub fn new(embedder: E) -> Self
Sourcepub fn add(&mut self, window: &[f32]) -> Result<(), EnrollmentError>
pub fn add(&mut self, window: &[f32]) -> Result<(), EnrollmentError>
Measures one utterance.
EnrollmentError::NoVoice means the window held nothing to embed —
too short, or too quiet. Whether that ends the enrollment or asks for
the sample again is the caller’s to decide.
Sourcepub fn finish(
self,
name: SpeakerName,
role: Role,
) -> Result<Enrolled, EnrollmentError>
pub fn finish( self, name: SpeakerName, role: Role, ) -> Result<Enrolled, EnrollmentError>
The profile the samples agree on, and how strongly they agree.
Auto Trait Implementations§
impl<E> Freeze for Enrollment<E>where
E: Freeze,
impl<E> RefUnwindSafe for Enrollment<E>where
E: RefUnwindSafe,
impl<E> Send for Enrollment<E>where
E: Send,
impl<E> Sync for Enrollment<E>where
E: Sync,
impl<E> Unpin for Enrollment<E>where
E: Unpin,
impl<E> UnsafeUnpin for Enrollment<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for Enrollment<E>where
E: UnwindSafe,
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