pub struct VoiceSpec {
pub language: Option<String>,
pub name: Option<String>,
pub gender: Gender,
pub age: u8,
}Expand description
Voice selection criteria, mirroring espeak_VOICE from speak_lib.h.
Build one with VoiceSpec::builder() or use VoiceSpec::by_name
for the common case of selecting a voice by language code.
§Examples
use espeak_ng::VoiceSpec;
let v = VoiceSpec::by_name("en");
let v = VoiceSpec::builder().language("fr").gender(espeak_ng::Gender::Female).build();Fields§
§language: Option<String>BCP-47 language tag, e.g. "en", "en-gb", "de".
name: Option<String>Voice name as it appears in the espeak-ng voices directory.
gender: GenderPreferred gender.
age: u8Preferred speaker age (0 = unspecified).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VoiceSpec
impl RefUnwindSafe for VoiceSpec
impl Send for VoiceSpec
impl Sync for VoiceSpec
impl Unpin for VoiceSpec
impl UnsafeUnpin for VoiceSpec
impl UnwindSafe for VoiceSpec
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