mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
piper: ensure an utterance is queued only once
regression introduced in the piper re-write
This commit is contained in:
parent
e9c1216ded
commit
36b690538f
@ -395,9 +395,10 @@ class Piper(TTSBackend):
|
|||||||
def _queue_current_utterance(self) -> None:
|
def _queue_current_utterance(self) -> None:
|
||||||
if self._utterances_being_synthesized:
|
if self._utterances_being_synthesized:
|
||||||
u = self._utterances_being_synthesized[0]
|
u = self._utterances_being_synthesized[0]
|
||||||
global_piper_instance().synthesize(u.id, u.sentence)
|
if not u.started:
|
||||||
u.started = True
|
global_piper_instance().synthesize(u.id, u.sentence)
|
||||||
debug(f'Utterance {u.id} synthesis queued')
|
u.started = True
|
||||||
|
debug(f'Utterance {u.id} synthesis queued')
|
||||||
|
|
||||||
def audio_sink_state_changed(self, state: QAudio.State) -> None:
|
def audio_sink_state_changed(self, state: QAudio.State) -> None:
|
||||||
self._update_status()
|
self._update_status()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user