pub struct EmbeddingConfig {
pub embedding_dim: usize,
pub sample_rate: u32,
pub frame_length_ms: u32,
pub frame_shift_ms: u32,
pub n_mels: usize,
pub normalize: bool,
}Expand description
Configuration for speaker embedding extraction
Fields§
§embedding_dim: usizeOutput embedding dimension (typically 192 or 512)
sample_rate: u32Input sample rate (Hz)
frame_length_ms: u32Frame length in milliseconds
frame_shift_ms: u32Frame shift in milliseconds
n_mels: usizeNumber of mel filterbank channels
normalize: boolNormalize embeddings to unit length
Implementations§
Source§impl EmbeddingConfig
impl EmbeddingConfig
Sourcepub fn ecapa_tdnn() -> EmbeddingConfig
pub fn ecapa_tdnn() -> EmbeddingConfig
Configuration for ECAPA-TDNN model
Sourcepub fn x_vector() -> EmbeddingConfig
pub fn x_vector() -> EmbeddingConfig
Configuration for X-vector model
Sourcepub fn resnet() -> EmbeddingConfig
pub fn resnet() -> EmbeddingConfig
Configuration for ResNet-based embeddings
Sourcepub fn validate(&self) -> Result<(), VoiceError>
pub fn validate(&self) -> Result<(), VoiceError>
Validate configuration
Trait Implementations§
Source§impl Clone for EmbeddingConfig
impl Clone for EmbeddingConfig
Source§fn clone(&self) -> EmbeddingConfig
fn clone(&self) -> EmbeddingConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EmbeddingConfig
impl Debug for EmbeddingConfig
Source§impl Default for EmbeddingConfig
impl Default for EmbeddingConfig
Source§fn default() -> EmbeddingConfig
fn default() -> EmbeddingConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EmbeddingConfig
impl RefUnwindSafe for EmbeddingConfig
impl Send for EmbeddingConfig
impl Sync for EmbeddingConfig
impl Unpin for EmbeddingConfig
impl UnsafeUnpin for EmbeddingConfig
impl UnwindSafe for EmbeddingConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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