diff --git a/src/backends/winrt/mod.rs b/src/backends/winrt/mod.rs index 9b2d0f0..af9ca34 100644 --- a/src/backends/winrt/mod.rs +++ b/src/backends/winrt/mod.rs @@ -11,7 +11,7 @@ use bindings::Windows::{ Foundation::TypedEventHandler, Media::{ Core::MediaSource, - Playback::{MediaPlaybackState, MediaPlayer, MediaPlayerAudioCategory}, + Playback::{MediaPlayer, MediaPlayerAudioCategory}, SpeechSynthesis::SpeechSynthesizer, }, }; @@ -181,9 +181,7 @@ impl Backend for WinRt { utterances.push_back(utterance); } } - if no_utterances - && self.player.PlaybackSession()?.PlaybackState()? != MediaPlaybackState::Playing - { + if no_utterances { self.synth.Options()?.SetSpeakingRate(self.rate.into())?; self.synth.Options()?.SetAudioPitch(self.pitch.into())?; self.synth.Options()?.SetAudioVolume(self.volume.into())?;