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