mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-30 10:35:20 -04:00
Fix configure when not speaking causing a pause event
This commit is contained in:
@@ -170,8 +170,8 @@ class TTSManager(QObject):
|
||||
rd = ResumeData()
|
||||
rd.is_speaking = self._tts is not None and self.state in (
|
||||
QTextToSpeech.State.Speaking, QTextToSpeech.State.Synthesizing, QTextToSpeech.State.Paused)
|
||||
self._resuming_after_configure = True
|
||||
if self.state is not QTextToSpeech.State.Paused:
|
||||
self._resuming_after_configure = rd.is_speaking
|
||||
if self.state is not QTextToSpeech.State.Paused and rd.is_speaking:
|
||||
self.tts.pause()
|
||||
self.state_event.emit('pause')
|
||||
yield rd
|
||||
|
||||
@@ -237,7 +237,6 @@ class Piper(TTSBackend):
|
||||
|
||||
def reload_after_configure(self) -> None:
|
||||
self.shutdown()
|
||||
self.process
|
||||
|
||||
@property
|
||||
def state(self) -> QTextToSpeech.State:
|
||||
|
||||
Reference in New Issue
Block a user