pub struct AudioKNN { /* private fields */ }Expand description
KNN-based utilities for audio similarity and feature extraction
Implementations§
Source§impl AudioKNN
impl AudioKNN
Sourcepub fn find_neighbors(
&self,
query: ArrayView2<'_, f32>,
data: ArrayView2<'_, f32>,
) -> Vec<Vec<(usize, f32)>>
pub fn find_neighbors( &self, query: ArrayView2<'_, f32>, data: ArrayView2<'_, f32>, ) -> Vec<Vec<(usize, f32)>>
Find k nearest neighbors using Euclidean distance Returns indices and distances of nearest neighbors
Sourcepub fn find_similar_segments(
&self,
segment: ArrayView2<'_, f32>,
audio: ArrayView2<'_, f32>,
hop_size: usize,
) -> Vec<(usize, f32)>
pub fn find_similar_segments( &self, segment: ArrayView2<'_, f32>, audio: ArrayView2<'_, f32>, hop_size: usize, ) -> Vec<(usize, f32)>
Find similar audio segments within a larger audio buffer
Auto Trait Implementations§
impl Freeze for AudioKNN
impl RefUnwindSafe for AudioKNN
impl Send for AudioKNN
impl Sync for AudioKNN
impl Unpin for AudioKNN
impl UnwindSafe for AudioKNN
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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more