Skip to content

Commit 4868081

Browse files
author
Cyrille Bougot
committed
Fix skim reading
1 parent ee365d5 commit 4868081

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/speech/speech.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
SuppressUnicodeNormalizationCommand,
4141
CharacterModeCommand,
4242
WaveFileCommand,
43+
CallbackCommand,
4344
)
4445
from .shortcutKeys import getKeyboardShortcutsSpeech
4546

@@ -149,9 +150,10 @@ def _setLastSpeechString(
149150
priority: Spri,
150151
):
151152
# Check if the speech sequence contains text to speak
152-
if [item for item in speechSequence if isinstance(item, str)]:
153+
if any(isinstance(item, str) for item in speechSequence):
153154
global _lastSpeech
154-
_lastSpeech = speechSequence, symbolLevel
155+
log.debug(f"{speechSequence=}")
156+
_lastSpeech = [item for item in speechSequence if not isinstance(item, CallbackCommand)], symbolLevel
155157

156158

157159
def initialize():

0 commit comments

Comments
 (0)