Thursday, January 15, 2015

Krish Infotech Cuddalore: Make your Computer Talk...

Have you ever wondered how can you make your computer speak whatever you input to it like in the movies? Would it not be fun? If only it was possible! Rejoice, because now it is possible. Well, if you wish to know how to do this, then you have come to the right place. With this trick, you can create a script in Windows which will make your computer speak whatever you input to it.

To create one such talk script, follow the steps given below:-

Steps
1) Open Notepad.
2) Copy and paste the exact code given below.

          Dim Message, Speak
          Message=InputBox("Enter text","Speak")
          Set Speak=CreateObject("sapi.spvoice")
          Speak.Speak Message

3) Click on File Menu, Save As, select All Types in Save as Type option, and save the file as Speak.vbs or "*.vbs".
4)  Double click on the saved file, a window will open like the one in the image. Enter some text in enter text column and click OK.



Now your Computer will speak / talk what you typed in Step 4. Try it yourself.

Windows Compatibility: This VBS file can be executed on all versions of Windows including Windows XP, Windows Vista, Windows 7 and Windows 8.


(or by another method)




Step 1: Open Notepad



Open up Notepad on your windows xp, windows 7, or windows 8 computer.

Step 2: The Code



Type this into Notepad:

Dim text, sapi
text=inputbox("enter text to be spoken")
Set sapi=Createobject("sapi.spvoice")
sapi.Speak text

Now what does this mean?
-When you execute this script it first creates a input box which is recognized as "text". 
-Then the script sets up the sapi so we can now use it (this what will speak)
-Lastly it takes what was typed into input box "text" and sends it to the sapi to be spoken. 

Step 3: Save Your File



Now you need to save your file. 

First Click file>save as...

Next choose any file name but be sure to put .vbs afterwards. Ex. Filename.vbs

Then be sure to click next to Save as type: and then in the drop down menu click All Files

Click save.

Step 4: Execute Your File

The last step is to locate where you saved your file and double click it.

In the input field enter something and click ok.

Congratulations! You just made your computer talk!

Other notes:
• this is written in a Visual Basic scripting language (vbs)
• this only works with windows xp and higher
• if your having trouble or have questions feel free to ask me in the comments.

No comments:

Post a Comment