From 6c091f3284c360c6d58d4beff10bc417f49071aa Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 25 Aug 2020 11:50:25 -0500 Subject: [PATCH] Switch Speech-dispatcher initialization to threaded mode so callbacks work and `is_speaking` is correct. --- Cargo.toml | 2 +- src/backends/speech_dispatcher.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 17afd2a..af088f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tts" -version = "0.6.1" +version = "0.6.2" authors = ["Nolan Darilek "] repository = "https://github.com/ndarilek/tts-rs" description = "High-level Text-To-Speech (TTS) interface" diff --git a/src/backends/speech_dispatcher.rs b/src/backends/speech_dispatcher.rs index b12f51a..009a8fb 100644 --- a/src/backends/speech_dispatcher.rs +++ b/src/backends/speech_dispatcher.rs @@ -20,7 +20,7 @@ lazy_static! { impl SpeechDispatcher { pub fn new() -> Self { info!("Initializing SpeechDispatcher backend"); - let connection = speech_dispatcher::Connection::open("tts", "tts", "tts", Mode::Single); + let connection = speech_dispatcher::Connection::open("tts", "tts", "tts", Mode::Threaded); let sd = SpeechDispatcher(connection); let mut speaking = SPEAKING.lock().unwrap(); speaking.insert(sd.0.client_id(), false);