mirror of https://github.com/ndarilek/tts-rs.git
Switch Speech-dispatcher initialization to threaded mode so callbacks work and `is_speaking` is correct.
This commit is contained in:
parent
d3ffd5078f
commit
6c091f3284
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tts"
|
name = "tts"
|
||||||
version = "0.6.1"
|
version = "0.6.2"
|
||||||
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
|
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
|
||||||
repository = "https://github.com/ndarilek/tts-rs"
|
repository = "https://github.com/ndarilek/tts-rs"
|
||||||
description = "High-level Text-To-Speech (TTS) interface"
|
description = "High-level Text-To-Speech (TTS) interface"
|
||||||
|
|
|
@ -20,7 +20,7 @@ lazy_static! {
|
||||||
impl SpeechDispatcher {
|
impl SpeechDispatcher {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
info!("Initializing SpeechDispatcher backend");
|
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 sd = SpeechDispatcher(connection);
|
||||||
let mut speaking = SPEAKING.lock().unwrap();
|
let mut speaking = SPEAKING.lock().unwrap();
|
||||||
speaking.insert(sd.0.client_id(), false);
|
speaking.insert(sd.0.client_id(), false);
|
||||||
|
|
Loading…
Reference in New Issue