Forgot to specify global when checking the speech delay.
This commit is contained in:
parent
943e2acf53
commit
7f62e6ccca
@ -344,6 +344,7 @@ def speak(text, interrupt=True):
|
|||||||
current_time = pygame.time.get_ticks()
|
current_time = pygame.time.get_ticks()
|
||||||
|
|
||||||
# Check if this is the same text within the delay window
|
# Check if this is the same text within the delay window
|
||||||
|
global lastSpoken
|
||||||
if (_lastSpoken["text"] == text and
|
if (_lastSpoken["text"] == text and
|
||||||
current_time - _lastSpoken["time"] < _speechDelay):
|
current_time - _lastSpoken["time"] < _speechDelay):
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user