VB板块的同学救急啊:)
同学给我发这个小程序逗我
里面的代码是
CreateObject("SAPI.SpVoice").Speak "I love you"
我立刻有了个念头,是给我女朋友的七夕礼物的,但苦于不会VB,希望此版块高手帮帮我。给我个代码参照就好~
1) 怎样控制语速?
2) 能读汉字么?
最好是给个例子~谢谢了
本人不才,只会C,若有帮得上忙的,尽管开口:))
[解决办法]
1).rate
2)能,要下载安装微软TTS语音引擎(中文):http://mydown.yesky.com/soft/255/255680.html
Private Sub Command1_Click()Dim Vic As ObjectSet Vic = CreateObject("SAPI.SpVoice")Vic.Voice.Category.Default = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\MSSam"Vic.Volume = 30 '音量Vic.Rate = 10 '语速Vic.Speak "I love you"Vic.Voice.Category.Default = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\MSSimplifiedChineseVoice"Vic.Volume = 100 '音量Vic.Rate = 0 '语速Vic.Speak "别忘了请我喝酒"End Sub