pub struct EmbeddingManager { /* private fields */ }
Implementations§
Source§impl EmbeddingManager
impl EmbeddingManager
pub fn new(dimension: i32) -> Self
pub fn search(&mut self, embedding: &[f32], threshold: f32) -> Option<String>
pub fn get_best_matches( &mut self, embedding: &[f32], threshold: f32, n: i32, ) -> Vec<SpeakerMatch>
pub fn add(&mut self, name: String, embedding: &mut [f32]) -> Result<()>
Trait Implementations§
Source§impl Clone for EmbeddingManager
impl Clone for EmbeddingManager
Source§fn clone(&self) -> EmbeddingManager
fn clone(&self) -> EmbeddingManager
Returns a copy of the value. Read more
1.0.0 · 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 EmbeddingManager
impl Debug for EmbeddingManager
Source§impl Drop for EmbeddingManager
impl Drop for EmbeddingManager
impl Send for EmbeddingManager
impl Sync for EmbeddingManager
Auto Trait Implementations§
impl Freeze for EmbeddingManager
impl RefUnwindSafe for EmbeddingManager
impl Unpin for EmbeddingManager
impl UnwindSafe for EmbeddingManager
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