Friday, 15 July 2016

Multiple Ways to Make Your Computer Talk?

How to Make Your Computer Talk?

how to make your computer talk
All the methods here (except the last one) make use of a simple scripting language called Visual Basic aka VB.
Don’t worry!
You don’t have to learn the language from scratch as I am going to share the exact script with you. The only step then remains copy-paste.

How to Make Your Computer Talk Back to You? {Simple Message}

I am going to share a simple script with you to enable your computer’s tongue to say ‘Hello Master.’
Unlike most of the other programming language, you don’t need a software compiler for VB scripting. The in-house notepad is enough here.
Just follow the steps given below to hear hello from your computer.
Step 1: Open notepad. If you don’t know where you can find it, just hit the Start button and search for the same. (You can also follow Start>> Programs>> Accessories>> Notepad on earlier Windows versions).
how to make your computer talk mac
Step 2: Now, you have to enter a short code snippet into the notepad window. Just follow the code given below and paste it there.
dim speechobject
set speechobject=createobject(“sapi.spvoice”)
speechobject.speak “Hello Master”
 how to make your computer talk what you type
Step 3: In case you want to change the speaking phrase, just replace hello master in the code. And, press Ctrl+ S simultaneously or follow File>> Save to get save dialogue box.
how to make your computer talk like jarvis
Give a name with .vbs extension (for example, hello.vbs). And, hit Enter.
how to make your computer talk back to you
There you go! You can open the file (not an ordinary text file as you can see in the image) anytime to hear your computer say ‘Hello Master’ or the phrase you typed.
how to make your computer talk on startup

How to Make Your Computer Say the Time?

What if you want to hear the time from your computer? The above trick does not work as the time keeps on changing.
In such a situation, you can use the script given below. All the other steps are the same. You only have to replace the above script with the one given below.
Set Sapi = Wscript.CreateObject(“SAPI.SpVoice”)
 Sapi.speak “The current time is”
if hour(time) > 12 then
 Sapi.speak hour(time)-12
 else
 if hour(time) = 0 then
 Sapi.speak “12”
 else
 Sapi.speak hour(time)
 end if
 end if
if minute(time) < 10 then
 Sapi.speak “o”
 if minute(time) < 1 then
 Sapi.speak “clock”
 else
 Sapi.speak minute(time)
 end if
 else
 Sapi.speak minute(time)
 end if
if hour(time) > 12 then
 Sapi.speak “P.M.”
 else
 if hour(time) = 0 then
 if minute(time) = 0 then
 Sapi.speak “Midnight”
 else
 Sapi.speak “A.M.”
 end if
 else
 if hour(time) = 12 then
 if minute(time) = 0 then
 Sapi.speak “Noon”
 else
 Sapi.speak “P.M.”
 end if
 else
 Sapi.speak “A.M.”
 end if
 end if
 end if
Don’t forget to save the file with a .vbs extension. Or else, you can’t hear anything.

How to Make Your Computer Talk what You Type?

Say you need a text-to-speech solution. Being a Windows user, you can create a small app with the help of a Visual Basic script.
Just open notepad and paste the following script into it. Don’t forget to save it with .vbs extension here too.
Dim message, sapi
 message=InputBox(“What do you want me to talk?”,”I talk what you type.”)
 Set sapi=CreateObject(“sapi.spvoice”)
 sapi.Speak message
Now, open the file you saved.

How to Make Your Computer Talk on Startup?

Let’s say you want your computer to greet you on every startup. Then, what do you do? You can use the script I have prepared for you.
Along with the greeting, it will say time as well.
Set Sapi = Wscript.CreateObject(“SAPI.SpVoice”)
 dim str
 if hour(time) < 12 then
 Sapi.speak “Good Morning Master”
 else
 if hour(time) > 12 then
 if hour(time) > 16 then
 Sapi.speak “Good evening Master”
 else
 Sapi.speak “Good afternoon Master”
 end if
 end if
 end if
 Sapi.speak “The time now is”
if hour(time) > 12 then
 Sapi.speak hour(time)-12
 else
 if hour(time) = 0 then
 Sapi.speak “12”
 else
 Sapi.speak hour(time)
 end if
 end if
if minute(time) < 10 then
 Sapi.speak “o”
 if minute(time) < 1 then
 Sapi.speak “clock”
 else
 Sapi.speak minute(time)
 end if
 else
 Sapi.speak minute(time)
 end if
if hour(time) > 12 then
 Sapi.speak “P.M.”
 else
 if hour(time) = 0 then
 if minute(time) = 0 then
 Sapi.speak “Midnight”
 else
 Sapi.speak “A.M.”
 end if
 else
 if hour(time) = 12 then
 if minute(time) = 0 then
 Sapi.speak “Noon”
 else
 Sapi.speak “P.M.”
 end if
 else
 Sapi.speak “A.M.”
 end if
 end if
 end if
Save the file with .vbs extension just like you in all the processes above.
Now that you have created the script, the next job is to activate it on startup. You can do the same by following the steps below.
Step 1: Copy the file using Ctrl+ C. And, go to Start>> All Programs>> Startup.
Step 2: You will see a folder there. Paste the copied VBS file there without any hesitation.
how to make your computer talk using notepad
There you go! Restart the computer and you will hear the greeting along with current time.
In case you use Windows 10, chances are you can’t find Startup folder. Then, you need to open File Explorer and enterC:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup into the location bar.
how to make your computer talk to you like jarvis
That’s all! You will get Startup folder now. Paste the VBS file here.

How to Make Your Computer Talk on a Mac?

I recommend using a specific tool if you are using a Mac machine.
how to make your computer talk windows 7
You can use the free app called eSpeak as it has own voice engine to entice you up in case you are bored with OS’s default engine.

Wrapping Up

Now you know how to make your computer talk in notepad. I chose Notepad because it comes preloaded with every Windows PC.
Moreover, you can use Narrator tool as well.
I know there are dedicated speaking apps available on the market. But for fun purposes, the above methods are enough.
What are you waiting for? Just make your computer a Jarvis now.
Don’t forget to share this trick with all your friends (of course after making them jealous of you).

No comments:

Post a Comment

Disqus Shortname

Comments system