mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-11-08 18:35:57 +00:00
18 lines
297 B
GDScript
18 lines
297 B
GDScript
extends Node
|
|
|
|
const TTS = preload("godot-tts.gdns")
|
|
|
|
var tts = TTS.new()
|
|
|
|
func speak(text, interrupt := true):
|
|
tts.speak(text, interrupt)
|
|
|
|
func stop():
|
|
tts.stop()
|
|
|
|
func singular_or_plural(count, singular, plural):
|
|
if count == 1:
|
|
return singular
|
|
else:
|
|
return plural
|