Make Your Computer Talk

Introduction: Make Your Computer Talk

About: High schooler, Programmer, Gamer

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.

2 People Made This Project!

Recommendations

  • Make it Glow Contest

    Make it Glow Contest
  • First Time Author Contest

    First Time Author Contest
  • PCB Challenge

    PCB Challenge

40 Discussions

0
Back NF
Back NF

5 years ago on Introduction

Ok I've made it , but how do you get to tell you to do something at a specific time ? How do the end ifs work ?

0
daniel.branton343
daniel.branton343

Reply 2 months ago

just try naming the time if you know what i mean.

0
daniel.branton343
daniel.branton343

Reply 2 months ago

you see you have to give it a specific CODE for what time and sadly.....i do not know that CODE

0
001DeLeon
001DeLeon

4 years ago

Yah........... My stuff is better......

0
daniel.branton343
daniel.branton343

2 months ago

hi i'm just here to give you positivity and encourage you. so if you have a question feel free to ask.

0
mg1-command
mg1-command

Question 1 year ago

I used the code to turn statements into computer voiced statements but I know there is a way to set the notepad code to automatically activate with already saved statements so the computer will ask questions or say a greeting when the computers desktop is opened. So, my question is what is the coding for this to happen?

0
SiobhanG2
SiobhanG2

3 years ago

hi.Thank you but I got an error message saying;Object doesn't support this property or method:"Setsapi". Code 800AO1B6

????

thanks

0
daniel.branton343
daniel.branton343

Reply 2 months ago

don't worry,try to reroute it.

0
daniel.branton343
daniel.branton343

Reply 2 months ago

nice! keep up the good work

0
RishabhN6
RishabhN6

3 years ago

Its not working on my bank computer nd giving an error
Windows can't find C/users/hp/desktop /hello.vbs. Make sure you typed the name correctly and then try again

What should I do???

0
daniel.branton343
daniel.branton343

Reply 2 months ago

try overriding the error. worked for me

0
Tony Cicero
Tony Cicero

7 years ago

We can easily keep the the box open by creating a loop. Simply put the word "Do" without quotes in front of the rest of the code, and end with "loop until text = false" I hope this isn't to confusing.

0
tigars
tigars

Reply 7 years ago on Introduction

Great, works fine, thank you