Advertisement
xzlui

Text to Speech

Dec 10th, 2017
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.40 KB | None | 0 0
  1. REM // simple af
  2.  
  3. @echo off
  4. title %~n0%~x0
  5. cd %temp%
  6. color 0a
  7.  
  8. :top
  9. cls
  10. set /p str=Say:
  11. if "%str%" == "%str%" goto doVoice
  12.  
  13. :doVoice
  14. cls
  15. echo Dim message, sapi>>doVoice.vbs
  16. echo message="%str%">>doVoice.vbs
  17. echo Set sapi=CreateObject("sapi.spvoice")>>doVoice.vbs
  18. echo sapi.Speak message>>doVoice.vbs
  19. start doVoice.vbs
  20. ping localhost -n 2 >nul
  21. if exist dovoice.vbs del doVoice.vbs>nul
  22. goto top
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement