1
0
mirror of https://github.com/ndarilek/tts-rs.git synced 2024-11-17 09:29:37 +00:00

Switch Speech-dispatcher initialization to threaded mode so callbacks work and is_speaking is correct.

This commit is contained in:
Nolan Darilek 2020-08-25 11:50:25 -05:00
parent d3ffd5078f
commit 6c091f3284
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "tts"
version = "0.6.1"
version = "0.6.2"
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
repository = "https://github.com/ndarilek/tts-rs"
description = "High-level Text-To-Speech (TTS) interface"

View File

@ -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);