renpy/lib/py2-windows-i686/say.vbs

19 lines
336 B
Plaintext
Raw Normal View History

2023-01-18 22:13:55 +00:00
Text = WScript.Arguments(0)
Speaker = WScript.Arguments(1)
2023-09-12 22:16:10 +00:00
Volume = WScript.Arguments(2)
2023-01-18 22:13:55 +00:00
Set s = CreateObject("SAPI.SpVoice")
2023-09-12 22:16:10 +00:00
s.Volume = Volume
2023-01-18 22:13:55 +00:00
For Each Voice In s.GetVoices
I = I + 1
If InStr(Voice.GetDescription, Speaker) > 0 Then
Set s.Voice = s.GetVoices.Item(I-1)
Exit For
End If
Next
s.Speak Text