pub struct ConversionTarget {
pub characteristics: VoiceCharacteristics,
pub speaker_id: Option<String>,
pub reference_samples: Vec<AudioSample>,
pub strength: f32,
pub preserve_original: f32,
}Expand description
Conversion target specification
Fields§
§characteristics: VoiceCharacteristicsTarget voice characteristics
speaker_id: Option<String>Target speaker ID (if applicable)
reference_samples: Vec<AudioSample>Reference audio samples (if available)
strength: f32Conversion strength (0.0 to 1.0)
preserve_original: f32Preserve original characteristics partially
Implementations§
Source§impl ConversionTarget
impl ConversionTarget
Sourcepub fn new(characteristics: VoiceCharacteristics) -> Self
pub fn new(characteristics: VoiceCharacteristics) -> Self
Create new conversion target
Sourcepub fn with_speaker_id(self, speaker_id: String) -> Self
pub fn with_speaker_id(self, speaker_id: String) -> Self
Set target speaker
Sourcepub fn with_reference_sample(self, sample: AudioSample) -> Self
pub fn with_reference_sample(self, sample: AudioSample) -> Self
Add reference sample
Sourcepub fn with_strength(self, strength: f32) -> Self
pub fn with_strength(self, strength: f32) -> Self
Set conversion strength
Sourcepub fn with_preservation(self, preserve: f32) -> Self
pub fn with_preservation(self, preserve: f32) -> Self
Set preservation amount
Trait Implementations§
Source§impl Clone for ConversionTarget
impl Clone for ConversionTarget
Source§fn clone(&self) -> ConversionTarget
fn clone(&self) -> ConversionTarget
Returns a duplicate of the value. Read more
1.0.0 · 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 ConversionTarget
impl Debug for ConversionTarget
Source§impl<'de> Deserialize<'de> for ConversionTarget
impl<'de> Deserialize<'de> for ConversionTarget
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
Source§impl PartialEq for ConversionTarget
impl PartialEq for ConversionTarget
Source§impl Serialize for ConversionTarget
impl Serialize for ConversionTarget
impl StructuralPartialEq for ConversionTarget
Auto Trait Implementations§
impl Freeze for ConversionTarget
impl RefUnwindSafe for ConversionTarget
impl Send for ConversionTarget
impl Sync for ConversionTarget
impl Unpin for ConversionTarget
impl UnsafeUnpin for ConversionTarget
impl UnwindSafe for ConversionTarget
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,
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