7,785
社区成员




' 转自贴吧http://tieba.baidu.com/p/2902813877
Private Sub Form_Load()
Const SSFMCreateForWrite = 3
strText = "hello world "
Set objVoice = CreateObject("SAPI.SpVoice")
Set objFile = CreateObject("SAPI.SpFileStream.1")
objFile.Open "c:\Test.wav", SSFMCreateForWrite
Set objVoice.AudioOutputStream = objFile
objVoice.Rate = 1 '速度:-10,10 0
objVoice.Volume = 100 '声音:0,100 100
objVoice.AllowAudioOutputFormatChangesOnNextSet = False
objVoice.Speak strText
objFile.Close
Set objVoice.AudioOutputStream = Nothing
Set objVoice = Nothing
End Sub