mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-17 13:09:37 +00:00
When speech is interrupted on AVFoundation, only stop if already speaking. May address a possible deadlock.
This commit is contained in:
parent
a22ee53727
commit
1d075f7ece
|
@ -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…
Reference in New Issue
Block a user