pub struct VoiceManager { /* private fields */ }Expand description
The screen for the voice: which model speaks, and how. The values start as its model card recommends, and are kept in the models’ folder.
Implementations§
Source§impl VoiceManager
impl VoiceManager
Sourcepub fn new(catalog: &[LocalModel], root: impl Into<PathBuf>) -> Self
pub fn new(catalog: &[LocalModel], root: impl Into<PathBuf>) -> Self
The models of catalog in root, as many as fit this machine.
Sourcepub fn for_machine(
catalog: &[LocalModel],
root: impl Into<PathBuf>,
machine: &Machine,
) -> Self
pub fn for_machine( catalog: &[LocalModel], root: impl Into<PathBuf>, machine: &Machine, ) -> Self
The same, for machine.
Sourcepub fn labels(self, labels: VoiceLabels) -> Self
pub fn labels(self, labels: VoiceLabels) -> Self
What it says.
Sourcepub fn settings(&self) -> SpeechSettings
pub fn settings(&self) -> SpeechSettings
How to speak, as it is set now.
Sourcepub fn voice(&self) -> Option<LocalVoice>
pub fn voice(&self) -> Option<LocalVoice>
The voice in use, if any.
Sourcepub fn say(&self, text: String, waker: UiWaker)
pub fn say(&self, text: String, waker: UiWaker)
Says text with the voice in use and the current settings, if there is one.
Sourcepub fn reads_aloud(&self) -> bool
pub fn reads_aloud(&self) -> bool
Whether answers should be read when they arrive.
Sourcepub fn play_ready(&self, sound: &Sound)
pub fn play_ready(&self, sound: &Sound)
Plays what is ready. Call it when building a view that stays on the screen while it speaks.
Trait Implementations§
Source§impl Clone for VoiceManager
impl Clone for VoiceManager
Source§fn clone(&self) -> VoiceManager
fn clone(&self) -> VoiceManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VoiceManager
impl Debug for VoiceManager
Auto Trait Implementations§
impl !RefUnwindSafe for VoiceManager
impl !Send for VoiceManager
impl !Sync for VoiceManager
impl !UnwindSafe for VoiceManager
impl Freeze for VoiceManager
impl Unpin for VoiceManager
impl UnsafeUnpin for VoiceManager
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Adds padding inside the box, in logical pixels.
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Paints a background behind the content.
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
Fixes the width and/or height in logical pixels;
None keeps the content size.