mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fix spurious speaking/ready event pair generated by piper backend on stop
This commit is contained in:
parent
672bdcc149
commit
9c565b70ed
@ -214,7 +214,9 @@ class Piper(TTSBackend):
|
||||
if self._process is not None:
|
||||
if self._state is not QTextToSpeech.State.Ready or self._utterances_being_synthesized or self._utterances_being_spoken:
|
||||
self.shutdown()
|
||||
self.process
|
||||
# We cannot re-create self.process here as that will cause the
|
||||
# audio device to go to active state which will cause a
|
||||
# speaking event to be generated
|
||||
|
||||
def shutdown(self) -> None:
|
||||
if self._process is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user