pub struct AudioFeatures {
pub spectral: Vec<f32>,
pub temporal: Vec<f32>,
pub prosodic: Vec<f32>,
pub speaker_embedding: Option<Vec<f32>>,
pub quality: Vec<f32>,
pub formants: Vec<f32>,
pub harmonics: Vec<f32>,
}Expand description
Audio features extracted for processing
Fields§
§spectral: Vec<f32>Spectral features (MFCCs, spectral centroid, etc.)
temporal: Vec<f32>Temporal features (energy, ZCR, etc.)
prosodic: Vec<f32>Prosodic features (F0, intensity, timing)
speaker_embedding: Option<Vec<f32>>Speaker embedding (if available)
quality: Vec<f32>Voice quality features (breathiness, roughness, etc.)
formants: Vec<f32>Formant frequencies
harmonics: Vec<f32>Harmonic features
Implementations§
Source§impl AudioFeatures
impl AudioFeatures
Sourcepub fn new(spectral: Vec<f32>, temporal: Vec<f32>, prosodic: Vec<f32>) -> Self
pub fn new(spectral: Vec<f32>, temporal: Vec<f32>, prosodic: Vec<f32>) -> Self
Create new audio features
Sourcepub fn with_speaker_embedding(self, embedding: Vec<f32>) -> Self
pub fn with_speaker_embedding(self, embedding: Vec<f32>) -> Self
Add speaker embedding
Sourcepub fn with_quality_features(self, quality: Vec<f32>) -> Self
pub fn with_quality_features(self, quality: Vec<f32>) -> Self
Add voice quality features
Sourcepub fn with_formants(self, formants: Vec<f32>) -> Self
pub fn with_formants(self, formants: Vec<f32>) -> Self
Add formant frequencies
Sourcepub fn with_harmonics(self, harmonics: Vec<f32>) -> Self
pub fn with_harmonics(self, harmonics: Vec<f32>) -> Self
Add harmonic features
Sourcepub fn similarity(&self, other: &AudioFeatures) -> f32
pub fn similarity(&self, other: &AudioFeatures) -> f32
Calculate similarity to another feature set
Sourcepub fn extract_speaker_identity(&self) -> Vec<f32>
pub fn extract_speaker_identity(&self) -> Vec<f32>
Extract speaker identity features
Trait Implementations§
Source§impl Clone for AudioFeatures
impl Clone for AudioFeatures
Source§fn clone(&self) -> AudioFeatures
fn clone(&self) -> AudioFeatures
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 moreAuto Trait Implementations§
impl Freeze for AudioFeatures
impl RefUnwindSafe for AudioFeatures
impl Send for AudioFeatures
impl Sync for AudioFeatures
impl Unpin for AudioFeatures
impl UnsafeUnpin for AudioFeatures
impl UnwindSafe for AudioFeatures
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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