6
1 January22, 2012 How to make your Windows 7/8 computer more human-like with Text to Speech Macros…Fire Photon Torpedoes. This is also a great way to show off for your friends... tell them you have a talking computer that does whatever you want it to do. You'll be amazed how simple this is. It just requires a free download, easy scripting and your imagination. Required Materials: *Windows 7/8 or Vista based computer (32 & 64-bit both work).* At least 2 gigs of memory although we now recommend 8.* At least a dual-core processor. How to Create WSR Text-To-Speech Commands By Tom Hamilton [email protected]

How to create wsr text to-speech commands

Embed Size (px)

Citation preview

Page 1: How to create wsr text to-speech commands

1

January22, 2012

How to make your Windows 7/8 computer more human-like with Text

to Speech Macros…Fire Photon Torpedoes.

This is also a great way to show off for your friends... tell them you have a talking computer that

does whatever you want it to do. You'll be amazed how simple this is. It just requires a free

download, easy scripting and your imagination.

Required Materials:

*Windows 7/8 or Vista based computer (32 & 64-bit both work).*

At least 2 gigs of memory although we now recommend 8.* At least a dual-core processor.

How to Create WSR

Text-To-Speech Commands

By Tom Hamilton – [email protected]

Page 2: How to create wsr text to-speech commands

2

*AMicrophone

Although an integrated soundcard may produce acceptable results, a USB microphone or analog

microphone with a USB Pod (external soundcard) will typically be more accurate; especially

with dictation. The same advice applies the microphones. A gaming microphone may produce

acceptable results will typically be as accurate as a proper speech recognition microphone.

* Windows Speech Recognition (part of the Windows Vista/7/8 operating system)

* Windows Speech Recognition Macros

* An imagination (this is the creative part), you can make your computer a source of fun or a

workhorse).

* Speakers (to listen to your results).

Begin by downloading Windows Speech Recognition Macros. Before you install the Macros,

make sure your microphone is attached and functioning properly, then go ahead and enable

Windows Speech Recognition in your Control Panel (Start Menu/Control Panel/Ease of

Access/Speech Recognition/Start Speech Recognition). While you're at it, it's a good idea to take

the speech tutorial to familiarize yourself with some common voice commands. We additionally

recommend reviewing the section: "Train your computer to better understand you." The process

only takes about 10 minutes.

Page 3: How to create wsr text to-speech commands

3

Once you have breezed through the tutorials, you should be ready to begin working with WSR

(Windows speech recognition).

Note that this is just the tip of the iceberg. You can also create your own custom commands.

Using Windows Speech Recognition Macros you can automate almost any function on your

computer. Now install Windows Speech Recognition Macros. Just double-click it from where

you saved the download .Then follow the prompts in the installation procedure. At the end of the

procedure, you will see a new desktop shortcut. Once this is done, you can optionally place a

shortcut to the Windows Speech Recognition Macros utility in your your startup folder by

clicking the Start Menu >All Programs>Startup. Right-click and choose "open." Then copy your

Windows Speech Recognition Macros shortcut to this location. This will launch the utility

whenever you boot Windows.

The Windows Speech Recognition Macros is a cool utility that allows you to create custom

automations for windows that execute whenever you say a trigger word or phrase. This is where

your imagination comes into play. See following examples.

Let’s board a time machine and travel back to Star Trek. We are now on the Star Ship Enterprise

and under attack from a newly discovered alien war vessel. First, make sure your Speech

Recognition is enabled, and Windows Speech Recognition Macros is running. You will find it in

the bottom right-hand corner of Taskbar. Double-click the Windows Speech Recognition Macros

icon and when the window pops up asking "What should the macro do?" click "Advanced."

WSRM uses XML for commands and that makes creating custom commands fairly simple.

Here's a quick overview of what you're looking at:

<speechMacros> - This is the starting Tag, it simply tells the computer that this XML file uses

the Speech Macros to execute.

Page 4: How to create wsr text to-speech commands

4

<command> - This is the command to be executed. Each command is basically one action... in

most cases you will only need one, but for some automations you'll want to include more than

one. You'll see an example of this later.

<listenFor></listenFor> - This tells the computer what word or phrase to listen for in order to do

an action. Notice that there is a closing tag (</listenFor>), this tells the XML that this spot in the

code is where to stop doing whatever function... in this case stop listening for a word or phrase

once the computer hears it.

</command> - The closing tag for the "Command" tag... again, in XML every tag will have an

opening/closing tag and what happens between the two is how it knows what to execute. In this

case it knows that the command is finished once the word/phrase has been detected.

</speechMacros> - By now you can figure out why this is here.

Since we’re under attack we had better defend ourselves so set your <listenFor> tags to say the

following: Spock

<listenFor>Spock</listenFor>

The entire macro looks like this now:

<speechMacros>

<command>

<listenFor>Spock</listenFor>

</command>

</speechMacros>

Page 5: How to create wsr text to-speech commands

5

So your computer is now listening for a spoken command of Spock, but nothing is going to

happen. We have to give it a way to interact, so we're going to add the <speak></speak> tags

which allow for the computer to speak whatever text we insert between the tags back to us.

<speechMacros>

<command>

<listenFor>Spock</listenFor>

<speak>Yes Captain, shields are up and launching all photon torpedoes</speak>

</command>

</speechMacros>

Hit "Save" then "Create" and then "OK." You might want to make sure you know where WSRM

is saving your macros before you hit "Create" I recommend using My Documents under a folder

called "Speech Macros." You have now successfully defended The Enterprise.