pub struct StyleEncoder { /* private fields */ }Expand description
Style encoder (main component)
Implementations§
Source§impl StyleEncoder
impl StyleEncoder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new style encoder with default configuration.
§Returns
A new StyleEncoder instance with empty extractors and 256-dimensional embeddings.
Sourcepub fn encode_style(
&self,
audio: &[f32],
sample_rate: u32,
) -> Result<StyleRepresentation>
pub fn encode_style( &self, audio: &[f32], sample_rate: u32, ) -> Result<StyleRepresentation>
Encodes the style characteristics of audio into a compact representation.
§Arguments
audio- The input audio samplessample_rate- The sample rate of the audio in Hz
§Returns
A StyleRepresentation containing extracted features, embeddings, and confidence score.
§Errors
Returns an error if feature extraction or embedding computation fails.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StyleEncoder
impl !UnwindSafe for StyleEncoder
impl Freeze for StyleEncoder
impl Send for StyleEncoder
impl Sync for StyleEncoder
impl Unpin for StyleEncoder
impl UnsafeUnpin for StyleEncoder
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<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