This commit is contained in:
Kovid Goyal 2024-09-26 10:39:52 +05:30
parent f7c4d8c02c
commit 95014dffb1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -100,6 +100,7 @@ class QtTTSBackend(TTSBackend):
# start and length values are totally wrong, so track manually # start and length values are totally wrong, so track manually
# print(f'{repr(word)=} {idx=} {start=} {length=}, {repr(self.speaking_text[start:start+length])=}') # print(f'{repr(word)=} {idx=} {start=} {length=}, {repr(self.speaking_text[start:start+length])=}')
key = word, start, length key = word, start, length
# Qt sometimes repeats words with windows modern engine at least, for a test case see https://bugs.launchpad.net/calibre/+bug/2080708
if self.last_spoken_word == key: if self.last_spoken_word == key:
return return
self.last_spoken_word = key self.last_spoken_word = key