diff --git a/Cargo.toml b/Cargo.toml index 7d0ac26..9c0a2cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tts" -version = "0.10.2" +version = "0.10.3" authors = ["Nolan Darilek "] repository = "https://github.com/ndarilek/tts-rs" description = "High-level Text-To-Speech (TTS) interface" diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 4a35999..f3fa7a8 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -27,6 +27,10 @@ fn main() -> Result<(), Error> { println!("Stopped speaking {:?}", utterance) })))?; } + let Features { is_speaking, .. } = tts.supported_features(); + if is_speaking { + println!("Are we speaking? {}", tts.is_speaking()?); + } tts.speak("Hello, world.", false)?; let Features { rate, .. } = tts.supported_features(); if rate { diff --git a/src/backends/winrt.rs b/src/backends/winrt.rs index aceffa4..618c810 100644 --- a/src/backends/winrt.rs +++ b/src/backends/winrt.rs @@ -269,7 +269,7 @@ impl Backend for WinRT { fn is_speaking(&self) -> std::result::Result { let state = self.player.playback_session()?.playback_state()?; - let playing = state == MediaPlaybackState::Opening || state == MediaPlaybackState::Playing; + let playing = state == MediaPlaybackState::Playing; Ok(playing) } }