Only print TTS output if we aren't speaking.

This commit is contained in:
Nolan Darilek 2020-03-19 13:36:21 -05:00
parent 735c7ebfa6
commit be52e4c6ae

3
TTS.gd
View File

@ -36,7 +36,6 @@ func get_rate():
var rate setget set_rate, get_rate
func speak(text, interrupt := true):
print_debug("%s: %s" % [text, interrupt])
if tts != null:
tts.speak(text, interrupt)
elif OS.has_feature('JavaScript'):
@ -51,6 +50,8 @@ func speak(text, interrupt := true):
"""
code += "window.speechSynthesis.speak(utterance)"
JavaScript.eval(code)
else:
print_debug("%s: %s" % [text, interrupt])
func stop():
if tts != null: