Intro: Text to Speech Batch Program
As I promised earlier, I have made this instructable. This is part of a set of instructables I am making that focuses around one of the original features in my Mega_Menu V 2.4 batch program. I have one other, previously made instructable on my address book program which you can find here.
This program has one major function only, making your computer "speak" whatever you write in the program. This is accomplished by creating a separate (temporary) VBs file that makes SAPI speak whatever you write. This file is deleted afterwards.
Onto the code:
Note: I made a mistake, don't use underscores, use hyphens. I have corrected this.
title Text to Speech Conversion
rem The user decides what to convert here
echo What do you want the computer to convert into speech?
set /p text=
rem Making the temp file
if exist temp%num%.vbs goto num
echo ' > "temp%num%.vbs"
echo set speech = Wscript.CreateObject("SAPI.spVoice") >> "temp%num%.vbs"
echo speech.speak "%text%" >> "temp%num%.vbs"
If you do not want the screen to close for no reason, I suggest you follow the tip given and don't use spaces; use hyphens (-) instead.
That's it. I don't know why I added this last step, but all the cool-kids are doing it nowadays. Have fun?
P.S It said I needed more photos, so I gave Instructables a cheetah.