mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-11-22 14:05:56 +00:00
Clean up TTS
initialization.
This commit is contained in:
parent
934a40e273
commit
e2f81c32dc
10
TTS.gd
10
TTS.gd
|
@ -6,15 +6,13 @@ var TTS
|
|||
var tts = null
|
||||
|
||||
func _ready():
|
||||
if not TTS:
|
||||
if OS.has_feature("JavaScript"):
|
||||
return
|
||||
if not OS.has_feature('JavaScript') and not Engine.has_singleton("AndroidTTS"):
|
||||
TTS = preload("godot-tts.gdns")
|
||||
if OS.has_feature('JavaScript'):
|
||||
pass
|
||||
elif Engine.has_singleton("AndroidTTS"):
|
||||
tts = Engine.get_singleton("AndroidTTS")
|
||||
elif TTS.can_instance() or Engine.editor_hint:
|
||||
else:
|
||||
TTS = preload("godot-tts.gdns")
|
||||
if TTS and (TTS.can_instance() or Engine.editor_hint):
|
||||
tts = TTS.new()
|
||||
else:
|
||||
print_debug("TTS not available!")
|
||||
|
|
Loading…
Reference in New Issue
Block a user