Introduction: Make Your Windows XP Talk!
This instructable shows you how to write a simple vb script that allows you to use the microsoft SAPI
(Speech application Programming Interface).
quick version history of the SAPI in windows:
SAPI 1.0 - 1995
SAPI 2.0 - 1996
SAPI 3.0 - 1997
SAPI 4.0 - 1998
SAPI 5.0 - 2000
SAPI 5.1 - 2001
SAPI 5.2 - 2004
SAPI 5.3 - With Windows Vista
Windows XP and Windows Server 2003 come with Microsoft Sam but you can also download Microsoft Mary and Microsoft Mike. To find which ones you have installed you can run this Vbs script:
Set objVoice = CreateObject("SAPI.SpVoice")
For Each strVoice in objVoice.GetVoices
Step 1: The First Step...
Open up notepad, and write the following vbscript in it:
userInput = InputBox("Type below anything to hear you PC speak it!")
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
==> the second line allows the showing of the input box in which the user will enter his sentence that is to be read by the pc
==> the first line declares the variable userInput
==> the third line declares the SAPI and creates its object
==> and the last line tells the SAPI what to readwhich is in this case the variable userInput
Step 2: Save You Work...
now after entering the script you have to save it in the form of vbs file
click save and write in the place were you name you file:
the name that you want.vbs
*remark: i mean by "the name that you want" the naming that you are free to put for your file
after you save, just double click on the script file and the program will run were you will enter yousentence and the pc will read it!
hope you like this instructable
please do make a comment, thanks ;)
We have a be nice policy.
Please be positive and constructive.