pub struct TextToSpeech { /* private fields */ }Expand description
Streaming text-to-speech engine.
Currently a stub – real sherpa-rs integration after VP.
Implementations§
Source§impl TextToSpeech
impl TextToSpeech
pub fn new(model_path: PathBuf, voice: String, speed: f32) -> Self
Sourcepub fn synthesize(&self, _text: &str) -> Result<TtsResult, String>
pub fn synthesize(&self, _text: &str) -> Result<TtsResult, String>
Synthesize text to audio samples.
Sourcepub fn synthesize_with_abort(
&self,
_text: &str,
_abort: &TtsAbortHandle,
) -> Result<TtsResult, String>
pub fn synthesize_with_abort( &self, _text: &str, _abort: &TtsAbortHandle, ) -> Result<TtsResult, String>
Synthesize with an abort handle for interruption support.
pub fn model_path(&self) -> &Path
pub fn voice(&self) -> &str
pub fn speed(&self) -> f32
Auto Trait Implementations§
impl Freeze for TextToSpeech
impl RefUnwindSafe for TextToSpeech
impl Send for TextToSpeech
impl Sync for TextToSpeech
impl Unpin for TextToSpeech
impl UnsafeUnpin for TextToSpeech
impl UnwindSafe for TextToSpeech
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