Forum Thread: Let Your Windows Welcome You.

In this tutorial we will learn how to code a simple script which will trigger system narration to speak what you will throw at it.

We will make a VB script and place it in Windows 7 Startup folder. There after, every time you log in, a voice will greet you after the startup sound (if enabled).

For source code/Pre-made file:

Download the file. Right-click and Edit the file. Instead of "Welcome ... " you can type in anything what you like within the quotation mark.

If you're doing it by own then here is the code:

Dim speaks, speech
speaks="Welcome , abc"
Set speech=CreateObject("sapi.spvoice")
speech.Speak speaks

Save it as "Greetings.vbs" (without quotes) and change the file from text to "all files". Save it to some location which you prefer.

After all, we've to place the Greetings.vbs file in Startup folder.

Press START / All Programs / Startup and open the startup folder by right-clicking it. Now, Paste the Greetings.vbs file in the Startup folder.

Later, just restart the system or simply Log off and Log on again.

Note that you must be Logged in as Admin.

Type of voices: In Windows 7 and Windows Vista, the default female voice is Anna. In Windows XP and 2000 its Sam.

There is way to change the settings of this default voice in Windows 7 and Vista too. Click the Start Button, type "narrator". Narrator will open and begin to speak, just click the "Voice settings" and you will get the window where you can replace the voices with 3rd party voices.

Additional Coding Information:
You can add some parameters too, For example -

with speech
Set .voice = .getvoices.item(0)
.Volume = 100
.Rate = 0
end with

Here, volume is defined in percentage.
Other commands are:

.Pause : pause speaking

.resume : resume after pause

.Rate : speed of spoken words. The larger number, the faster pitch.

.Voice : If multiple exist on machine, say Sam and Anna are available, you can set any one.

.WaitUntilDone : Voice will wait still all the services loads

_Use Case: You can use this code in Schools, Colleges, Companies, Universities, Institutions, etc to greet users on Startup._

Be the First to Respond

Share Your Thoughts