#[non_exhaustive]pub enum MelNorm {
None,
Slaney,
L1,
L2,
}Expand description
Mel filterbank normalization strategy.
Determines how the triangular mel filters are normalized after construction.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
No normalization (triangular filters with peak = 1.0).
This is the default and fastest option.
Slaney
Slaney-style area normalization (librosa default).
Each mel filter is divided by its bandwidth in Hz: 2.0 / (f_max - f_min).
This ensures constant energy per mel band regardless of bandwidth.
Use this for compatibility with librosa’s default behavior.
L1
L1 normalization (sum of weights = 1.0).
Each mel filter’s weights are divided by their sum. Useful when you want each filter to act as a weighted average.
L2
L2 normalization (Euclidean norm = 1.0).
Each mel filter’s weights are divided by their L2 norm. Provides unit-norm filters in the L2 sense.
Trait Implementations§
impl Copy for MelNorm
Source§impl<'de> Deserialize<'de> for MelNorm
impl<'de> Deserialize<'de> for MelNorm
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MelNorm
impl StructuralPartialEq for MelNorm
Auto Trait Implementations§
impl Freeze for MelNorm
impl RefUnwindSafe for MelNorm
impl Send for MelNorm
impl Sync for MelNorm
impl Unpin for MelNorm
impl UnsafeUnpin for MelNorm
impl UnwindSafe for MelNorm
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