When speech is interrupted on AVFoundation, only stop if already speaking. May address a possible deadlock.

pull/11/head
Nolan Darilek 2 years ago
parent a22ee53727
commit 1d075f7ece
  1. 2
      src/backends/av_foundation.rs

@ -145,7 +145,7 @@ impl Backend for AvFoundation {
fn speak(&mut self, text: &str, interrupt: bool) -> Result<Option<UtteranceId>, Error> {
trace!("speak({}, {})", text, interrupt);
if interrupt {
if interrupt && self.is_speaking()? {
self.stop()?;
}
let utterance: id;

Loading…
Cancel
Save