Advertisement
Combreal

createAudio.vbs

May 10th, 2021
1,593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Const SAFT48kHz16BitStereo = 39
  2. Const SSFMCreateForWrite = 3
  3.  
  4. Dim oFileStream, oVoice
  5.  
  6. Set oFileStream = CreateObject("SAPI.SpFileStream")
  7. oFileStream.Format.Type = SAFT48kHz16BitStereo
  8. oFileStream.Open "C:\Temp\Sample.wav", SSFMCreateForWrite
  9.  
  10. Set oVoice = CreateObject("SAPI.SpVoice")
  11. Set oVoice.AudioOutputStream = oFileStream
  12. oVoice.Speak "FWAAAAAAAAAAF"
  13.  
  14. oFileStream.Close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement