Advertisement
Imthedude025

Text To Voice Via Batch v2 (Batch)

Feb 2nd, 2022
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <!-- : BATCH
  2. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  3. ::Text To Voice Via Batch 25DEC18 | Updated: 2FEB22 ::
  4. ::Created by RU$$ [http://russdev.mooo.com/] ::
  5. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  6. @ECHO OFF
  7.  
  8. Rem | cscript //nologo "%~f0?.wsf" "Message" "Male/Female"
  9. cscript //nologo "%~f0?.wsf" "Test 1" "0"
  10. cscript //nologo "%~f0?.wsf" "Test 2" "1"
  11.  
  12. pause>nul
  13. GOTO :EOF
  14. BATCH : --->
  15.  
  16. <job><script language="VBScript">
  17. Dim message, voice
  18. message=WScript.Arguments.Item(0)
  19. voice=WScript.Arguments.Item(1)
  20. set AIVoice = CreateObject("SAPI.SpVoice")
  21. with AIVoice
  22. Set .voice = .getvoices.item(voice)
  23. end with
  24. AIVoice.Speak(message)
  25. </script></job>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement