pub struct VoiceProfile { /* private fields */ }Expand description
A voice profile representing a cloned speaker.
Contains the speaker embedding and optionally style information extracted from reference audio.
Implementations§
Source§impl VoiceProfile
impl VoiceProfile
Sourcepub fn with_embedding(speaker_id: String, embedding: SpeakerEmbedding) -> Self
pub fn with_embedding(speaker_id: String, embedding: SpeakerEmbedding) -> Self
Create profile with embedding
Sourcepub fn speaker_id(&self) -> &str
pub fn speaker_id(&self) -> &str
Get speaker ID
Sourcepub fn embedding(&self) -> Option<&SpeakerEmbedding>
pub fn embedding(&self) -> Option<&SpeakerEmbedding>
Get speaker embedding
Sourcepub fn style(&self) -> Option<&StyleVector>
pub fn style(&self) -> Option<&StyleVector>
Get style vector
Sourcepub fn set_embedding(&mut self, embedding: SpeakerEmbedding)
pub fn set_embedding(&mut self, embedding: SpeakerEmbedding)
Set speaker embedding
Sourcepub fn set_style(&mut self, style: StyleVector)
pub fn set_style(&mut self, style: StyleVector)
Set style vector
Sourcepub fn reference_duration(&self) -> f32
pub fn reference_duration(&self) -> f32
Get reference duration
Sourcepub fn set_reference_duration(&mut self, duration: f32)
pub fn set_reference_duration(&mut self, duration: f32)
Set reference duration
Sourcepub fn quality_score(&self) -> f32
pub fn quality_score(&self) -> f32
Get quality score
Sourcepub fn set_quality_score(&mut self, score: f32)
pub fn set_quality_score(&mut self, score: f32)
Set quality score
Sourcepub fn is_adapted(&self) -> bool
pub fn is_adapted(&self) -> bool
Check if profile has been adapted
Sourcepub fn set_adapted(&mut self, adapted: bool)
pub fn set_adapted(&mut self, adapted: bool)
Mark profile as adapted
Sourcepub fn similarity(&self, other: &Self) -> VoiceResult<f32>
pub fn similarity(&self, other: &Self) -> VoiceResult<f32>
Trait Implementations§
Source§impl Clone for VoiceProfile
impl Clone for VoiceProfile
Source§fn clone(&self) -> VoiceProfile
fn clone(&self) -> VoiceProfile
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 moreAuto Trait Implementations§
impl Freeze for VoiceProfile
impl RefUnwindSafe for VoiceProfile
impl Send for VoiceProfile
impl Sync for VoiceProfile
impl Unpin for VoiceProfile
impl UnwindSafe for VoiceProfile
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> 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