mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-11-22 18:15:56 +00:00
Fix JavaScript rate-scaling.
This commit is contained in:
parent
bf6372a1a8
commit
3b067faecd
2
TTS.gd
2
TTS.gd
|
@ -40,7 +40,7 @@ func speak(text, interrupt := true):
|
||||||
if tts != null:
|
if tts != null:
|
||||||
tts.speak(text, interrupt)
|
tts.speak(text, interrupt)
|
||||||
elif OS.has_feature('JavaScript'):
|
elif OS.has_feature('JavaScript'):
|
||||||
var scaled_rate = javascript_rate / 2
|
var scaled_rate = javascript_rate / 25
|
||||||
var code = """
|
var code = """
|
||||||
let utterance = new SpeechSynthesisUtterance("%s")
|
let utterance = new SpeechSynthesisUtterance("%s")
|
||||||
utterance.rate = %s
|
utterance.rate = %s
|
||||||
|
|
Loading…
Reference in New Issue
Block a user