mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-11-22 05:35:57 +00:00
Move TTS initiaization to _init
so script works either as a singleton or an instantiated object.
This commit is contained in:
parent
b78848f583
commit
dec1d2cc17
8
TTS.gd
8
TTS.gd
|
@ -7,9 +7,7 @@ var tts
|
|||
|
||||
signal done
|
||||
|
||||
|
||||
func _ready():
|
||||
pause_mode = Node.PAUSE_MODE_PROCESS
|
||||
func _init():
|
||||
if OS.get_name() == "Server" or OS.has_feature("JavaScript"):
|
||||
return
|
||||
elif Engine.has_singleton("AndroidTTS"):
|
||||
|
@ -22,6 +20,10 @@ func _ready():
|
|||
print_debug("TTS not available!")
|
||||
|
||||
|
||||
|
||||
func _ready():
|
||||
pause_mode = Node.PAUSE_MODE_PROCESS
|
||||
|
||||
func _get_min_rate():
|
||||
if OS.has_feature('JavaScript'):
|
||||
return 0.1
|
||||
|
|
Loading…
Reference in New Issue
Block a user