How To Make Your Computer Talk To You With VBScript5 min read

How to Make Your Computer Talk to You With VBScript

We see in the movie that intelligent machines capable of speech are often used in Sci-fi movies. It turns a computer talking person. Here some simple and cool script that makes you computer speak with us. In this article, I will show you how to make your computer talk with you. And I also set one-click copy to copy the code. Let’s get started

How to Make Your Computer Talk to You With VBScript

Single-Use VBScripts

You should have to create the VB Script it is very easy to and doesn’t require any special programming software. You should have to type that code on Microsoft’s Notepad.

Open the Notepad and type this following code or copy it with a single click and paste into your Notepad. You can change this section that says It has become appallingly obvious that our technology has exceeded our humanity” Or type whatever you want to hear it

dim speechobject
set speechobject=createobject("sapi.spvoice")
speechobject.speak "It has become appallingly obvious that our technology has exceeded our humanity"
How To Make Your Computer Talk To You With VBScript
How To Make Your Computer Talk To You With VBScript

When type this code and type the text you wish to hear in this VBscript, just press “File” and click on the “Save” option.

How To Make Your Computer Talk To You With VBScript
How To Make Your Computer Talk To You With VBScript

Now select your Destination at where you want to save the file.

Now save the file with name and extension with “.vbs”. In this case, I save the file with “voice test.vbs

How To Make Your Computer Talk To You With VBScript
How To Make Your Computer Talk To You With VBScript

when you have saved the file. Now simplify open the file and listen to whatever you write in it.

Also, Read This Article How To Create a Virus In Seconds (Notepad virus tricks)

Text To Speech Dialog Box Script

In this script we will learn is how to create a script that can able to type whatever you want to speak. This script will create a dialog box, you can type text into it and the computer will read it back for you.

Open your Notepad and type this script or copy it with a one-click and paste it into your Notepad.

Dim message, sapi
 message=InputBox("What shall I say, Type you word which you want to say?","I will speak for you.")
 Set sapi=CreateObject("sapi.spvoice")
 sapi.Speak message
How To Make Your Computer Talk To You With VBScript
How To Make Your Computer Talk To You With VBScript

When you Enter the code save the file as “Text to Speech box.vbs” save with same previous method when you done, Simple open that file and type test you want to speak

It will say what you write in the box.

How To Make Your Computer Talk To You With VBScript
How To Make Your Computer Talk To You With VBScript

 

Greetings Voice VBScript

This is a simple code for greeting message, It will respond you according to time of the day, on the basis of the system timing.

Open your Notepad and type this code or copy it with a single click. You can replace the greeting message section of the day with any word which you want to hear and you can also type your own name.

Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
 dim str
 if hour(time) < 12 then
 Sapi.speak "Good Morning TechGrinch "
 else
 if hour(time) > 12 then
 if hour(time) > 16 then
 Sapi.speak "Good evening TechGrinch "
 else
 Sapi.speak "Good afternoon TechGrinch "
 end if
 end if
 end if
How To Make Your Computer Talk To You With VBScript
How To Make Your Computer Talk To You With VBScript

Now you save your file with the same previous method with VBS file. When you have done then simply open the file it will say “Good morning, Good afternoon or Good evening TechGrinch ”

This script tells will say greeting message system timing.

Also, Read This Article How To Connect To Join Two Connection 2 Simple and Easy Method

Startup Greeting Message and Time

Now can also set the greeting message and time speaking on the startup of the system if you want to do this.

Open your Notepad and type this code or simply copy it with a single click and paste in you Notepad up. You can change the greeting message anything you want.

Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
 dim str
 if hour(time) < 12 then
 Sapi.speak "Good Morning TechGrinch "
 else
 if hour(time) > 12 then
 if hour(time) > 16 then
 Sapi.speak "Good evening TechGrinch "
 else
 Sapi.speak "Good afternoon TechGrinch "
 end if
 end if
 end if
 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

When you copy save the file with “Startup greeting message.vbs” or anything you want to save it with the name. Now you can test it by opening that file it greeting you a message according to system time.

Now We should have to add the file in startup program, It is because when you turn on your computer this file will be executed at that time and Greeting you a message according to system time. To do this

Note: You must turn on the option of show hide files to see the “AppData” folder

Go to C:\Users\[User-name]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

How To Make Your Computer Talk To You With VBScript
How To Make Your Computer Talk To You With VBScript

Now, When you turn on your computer this file will be executed and say greeting message and time, whenever you start your computer and log in.

If you like this article then comment us below and share with your friends.

Related posts

Leave a Comment