pub struct StyleDecoder { /* private fields */ }Expand description
Style decoder (main component)
Implementations§
Source§impl StyleDecoder
impl StyleDecoder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new style decoder with default configuration.
§Returns
A new StyleDecoder instance with neural vocoder synthesis enabled.
Sourcepub fn decode_and_synthesize(
&self,
content: &ContentRepresentation,
style: &StyleRepresentation,
sample_rate: u32,
) -> Result<Vec<f32>>
pub fn decode_and_synthesize( &self, content: &ContentRepresentation, style: &StyleRepresentation, sample_rate: u32, ) -> Result<Vec<f32>>
Decodes content and style representations and synthesizes output audio.
§Arguments
content- The content representation to preservestyle- The style representation to applysample_rate- The desired output sample rate in Hz
§Returns
A vector of synthesized audio samples.
§Errors
Returns an error if synthesis fails.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StyleDecoder
impl !UnwindSafe for StyleDecoder
impl Freeze for StyleDecoder
impl Send for StyleDecoder
impl Sync for StyleDecoder
impl Unpin for StyleDecoder
impl UnsafeUnpin for StyleDecoder
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