CreateObject("SAPI.SpVoice").Speak "Hello"
Output into a .wav file
set x = createobject("SAPI.SpVoice")set ofs = createobject("SAPI.SpFileStream")ofs.Open "msg.wav", 3, vbFalseset x.AudioOutputStream = ofsx.Speak "Try me"
Output what you input
Dim message, sapimessage=InputBox(“Enter the text you want spoken”,”Speak This”)Set sapi=CreateObject(“sapi.spvoice”)sapi.Speak message
No comments:
Post a Comment