pub struct ERes2NetV2Extractor(/* private fields */);Expand description
ERes2NetV2 speaker embedder (Interspeech 2024): 192-d output, same 80-bin log-mel fbank path as CAM++. Tuned for short (1–3 s) utterances. Weights are optional downloads (Apache-2.0); never bundled or default.
Implementations§
Source§impl ERes2NetV2Extractor
impl ERes2NetV2Extractor
Sourcepub fn new(
path: impl AsRef<Path>,
pool_size: usize,
ep: ExecutionProvider,
) -> Result<Self, EmbedderError>
pub fn new( path: impl AsRef<Path>, pool_size: usize, ep: ExecutionProvider, ) -> Result<Self, EmbedderError>
Load an ERes2NetV2 ONNX model. Default dim is Self::DIM (192).
Sourcepub fn with_dim(
path: impl AsRef<Path>,
dim: usize,
pool_size: usize,
ep: ExecutionProvider,
) -> Result<Self, EmbedderError>
pub fn with_dim( path: impl AsRef<Path>, dim: usize, pool_size: usize, ep: ExecutionProvider, ) -> Result<Self, EmbedderError>
Load with an explicit output dimension (for non-standard exports).
Trait Implementations§
Source§impl Embedder for ERes2NetV2Extractor
impl Embedder for ERes2NetV2Extractor
Source§fn embed(&self, audio: &[f32]) -> Result<Vec<f32>, EmbedderError>
fn embed(&self, audio: &[f32]) -> Result<Vec<f32>, EmbedderError>
Compute an embedding for one audio segment. Read more
Source§fn embed_batch(&self, audios: &[&[f32]]) -> Result<Vec<Vec<f32>>, EmbedderError>
fn embed_batch(&self, audios: &[&[f32]]) -> Result<Vec<Vec<f32>>, EmbedderError>
Compute embeddings for a batch of audio segments. Default implementation
is sequential; impls may override with a true batched ONNX call.
Auto Trait Implementations§
impl !Freeze for ERes2NetV2Extractor
impl !RefUnwindSafe for ERes2NetV2Extractor
impl !UnwindSafe for ERes2NetV2Extractor
impl Send for ERes2NetV2Extractor
impl Sync for ERes2NetV2Extractor
impl Unpin for ERes2NetV2Extractor
impl UnsafeUnpin for ERes2NetV2Extractor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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