speak.vbs 调用TTS,说中文

请到 http://g.iciba.com/dictdown/tts.html
下载 微软 TTS_51_eng.msi 和 TTS_51_chs.msi 安装后运行 speak.vbs

speak.vbs 内容:

set sp = createobject("SAPI.SpVoice")
set Voices = sp.GetVoices()  '获得语音引擎集合
for i=0 to Voices.count-1
    if Right(Voices(i).Id, 24)="MSSimplifiedChineseVoice" then cn=i
next
set sp.Voice = Voices.Item(cn)
set oArgs = WScript.Arguments  '命令行参数
For Each text In oArgs
        sp.speak(text)
Next


你可能感兴趣的:(Windows)