Local, full Windows search replacement, clipboard manager, and launcher: files, apps, settings and semantic media search with Google's EmbeddingGemma 2.
Rust clipboard-historyembedding-modelsembeddinggemma-2embeddinggemma2embeddingslocal-firstmcp-serversearchsemantic-searchwindows-11
/// Speak the given text out loud.
pub fn speak(text: &str) {
if text.is_empty() {
return;
}
if let Some(window) = web_sys::window() {
log::debug!("Speaking {text:?}");
if let Ok(speech_synthesis) = window.speech_synthesis() {
speech_synthesis.cancel(); // interrupt previous speech, if any
if let Ok(utterance) = web_sys::SpeechSynthesisUtterance::new_with_text(text) {
utterance.set_rate(1.0);
utterance.set_pitch(1.0);
utterance.set_volume(1.0);
speech_synthesis.speak(&utterance);
}
}
}
}