This commit is contained in:
2026-10-30 14:15:14 +07:00
parent 41837e487b
commit 348504c33a
5 changed files with 87 additions and 31 deletions
+4
View File
@@ -5,6 +5,10 @@ use tts::Tts;
/// Words per minute of an engine at its normal rate, for estimating speech duration.
const NORMAL_WPM: f32 = 160.0;
/// Extra time past the estimate before speech is considered finished, for backends that
/// cannot report utterance end.
pub const END_GRACE: Duration = Duration::from_secs(5);
/// Reads text aloud through the platform's speech backend, created on first use.
pub struct Speaker {
tts: Option<Tts>,