#[non_exhaustive]pub enum VoiceSource {
#[non_exhaustive] Samples {
samples: Vec<Media>,
transcript: Option<String>,
language: Option<String>,
},
SampleId(String),
}Expand description
What a voice is created from, see create_voice.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
#[non_exhaustive]Samples
Recordings to clone. transcript is what is said in them, language the language
they are spoken in (a BCP-47 code such as pl).
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
SampleId(String)
The ID of a designed voice preview, see VoicePreview::sample_id.
Implementations§
Source§impl VoiceSource
impl VoiceSource
Sourcepub fn samples(samples: Vec<Media>, transcript: Option<&str>) -> Self
pub fn samples(samples: Vec<Media>, transcript: Option<&str>) -> Self
Recordings to clone, with the text said in them if known.
Sourcepub fn with_language(self, language: impl Into<String>) -> Self
pub fn with_language(self, language: impl Into<String>) -> Self
Sets the language the samples are spoken in. It does nothing for a
SampleId, whose provider keeps the language itself.
Trait Implementations§
Source§impl Clone for VoiceSource
impl Clone for VoiceSource
Source§impl Debug for VoiceSource
impl Debug for VoiceSource
Source§impl From<&VoicePreview> for VoiceSource
impl From<&VoicePreview> for VoiceSource
Source§fn from(preview: &VoicePreview) -> Self
fn from(preview: &VoicePreview) -> Self
Converts to this type from the input type.
Source§impl From<VoicePreview> for VoiceSource
impl From<VoicePreview> for VoiceSource
Source§fn from(preview: VoicePreview) -> Self
fn from(preview: VoicePreview) -> Self
Converts to this type from the input type.
Source§impl PartialEq for VoiceSource
impl PartialEq for VoiceSource
impl StructuralPartialEq for VoiceSource
Auto Trait Implementations§
impl Forget for VoiceSource
impl Freeze for VoiceSource
impl Move for VoiceSource
impl RefUnwindSafe for VoiceSource
impl Send for VoiceSource
impl Sync for VoiceSource
impl Unpin for VoiceSource
impl UnsafeUnpin for VoiceSource
impl UnwindSafe for VoiceSource
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