mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-11-26 00:55:56 +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
|
signal done
|
||||||
|
|
||||||
|
func _init():
|
||||||
func _ready():
|
|
||||||
pause_mode = Node.PAUSE_MODE_PROCESS
|
|
||||||
if OS.get_name() == "Server" or OS.has_feature("JavaScript"):
|
if OS.get_name() == "Server" or OS.has_feature("JavaScript"):
|
||||||
return
|
return
|
||||||
elif Engine.has_singleton("AndroidTTS"):
|
elif Engine.has_singleton("AndroidTTS"):
|
||||||
|
@ -22,6 +20,10 @@ func _ready():
|
||||||
print_debug("TTS not available!")
|
print_debug("TTS not available!")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pause_mode = Node.PAUSE_MODE_PROCESS
|
||||||
|
|
||||||
func _get_min_rate():
|
func _get_min_rate():
|
||||||
if OS.has_feature('JavaScript'):
|
if OS.has_feature('JavaScript'):
|
||||||
return 0.1
|
return 0.1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user