pub struct VoiceManager { /* private fields */ }Expand description
Manages the local Text-to-Speech pipeline.
Uses the all-Rust kokoros engine for streaming synthesis.
Implementations§
Source§impl VoiceManager
impl VoiceManager
pub fn new(event_tx: Sender<InferenceEvent>) -> Self
pub fn speak(&self, text: String)
pub fn flush(&self)
pub fn toggle(&self) -> bool
pub fn is_enabled(&self) -> bool
pub fn is_available(&self) -> bool
Sourcepub fn set_voice(&self, voice_id: &str)
pub fn set_voice(&self, voice_id: &str)
Change the active voice. Takes effect on the next spoken sentence.
pub fn current_voice_id(&self) -> String
pub fn set_speed(&self, speed: f32)
pub fn set_volume(&self, volume: f32)
Auto Trait Implementations§
impl Freeze for VoiceManager
impl !RefUnwindSafe for VoiceManager
impl Send for VoiceManager
impl Sync for VoiceManager
impl Unpin for VoiceManager
impl UnsafeUnpin for VoiceManager
impl !UnwindSafe for VoiceManager
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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