Right click on that icon and you will receive some options. Click on “New speech macro”.
Now here you have a variety of options. Basically, Windows Speech Recognition is meant to create your own commands with specific actions. We can’t be satisfied with the basic functions only right?
Here are the alternatives you have, explained in brief:
Insert Text: Suppose if you use Microsoft Word through Speech Recognition and don’t want to type your address again, you can set a specific phrase for your address and whenever you say that phrase, your address would by typed automatically.
Run a Program: There are default commands such as “Start WordPad” and “Start Notepad” for WordPad and Notepad respectively. There are commands for some other programs too! But what about the rest? This option can allow you to execute any program, maybe your favourite game by just speaking!
Send Keystrokes: Take a situation where you want to select all the text and copy it into the clipboard. Can you do it by just speaking? Oh yes, why not? This option allows you to add phrases for different keystrokes such as Ctrl+A and Ctrl+C!
Emulate Recognition: This is for the commands already supported by Windows Vista Speech Recognition.
Advanced: There are certain complex commands that we would like our JARVIS to do. However, this requires brief knowledge of XML. I have explained some of the commands you can use below:
(Note that the commands are listed in the order in which they are supposed to be used)
<speechMacros> – This is just a starting tag. This indicates that the code is actually for Windows Speech Recognition Macros.<command> – This, in short words, is the command to be executed. Sometimes your demands are fulfilled with just a single command. However, in some cases you would need more than one command too!
<listenFor></listenFor> – Whatever you are going to speak is supposed to be written between these two tags. Don’t forget the close tag else your code will not work.
<speak></speak> These tags should include the text your system is supposed to speak after listening to your command.
</command> – This is the closing tage of <command> tag. XML is like HTML. It has both opening and closing tags for every element, with a few exceptions.
</speechMacros> – This is the closing tag of <speechMacros>!
Now, I will show you some examples to explain it better.
But before that, I want to tell you that it is extremely important to digitally sign your macros! So before creating every single macro, you have to create a signing certificate! Every macro will need one certificate.
For creating a signing certificate, right click the Windows Speech Recognition icon in the notification pane, then go to Security, then press “Create Signing Certificate”.
Suppose if you want your computer to greet you when you command it to wake up, you can use the below Macros:
<speechMacros>
<command>
<listenFor>Wake Up Jarvis</listenFor>
<speak>Systems Online, Database Check, Good Morning Sir !</speak>
</command>
</speechMacros>
I love this one the most!
Here is a Macro for getting the weather. You can see that it’s a bit complicated to understand. But no worries! You just have to copy this macro and replace the text in bold with the desired details.
<?xml version=”1.0″ encoding=”UTF-16″?>
<speechMacros>
<command>
<listenFor>Pull up the weather in [CityName]</listenFor>
<run command=”http://www.weather.com/weather/local/{[CityName.zipCode]}”/>
</command>
<command>
<listenFor>Is it cold in [CityName]?</listenFor>
<speak>Let me check… just a moment.</speak>
</command>
<listenForList name=”CityName” propname=”zipCode”>
<item propval=”65201″>Columbia</item>
<item propval=”37201″>Nashville</item>
</listenForList>
</speechMacros>
Woah! What a lengthy piece of code. If you aren’t much into this coding stuff, I would suggest you to leave the above macro.
This is a Macro for restarting your computer. Simply say “Restart JARVIS” and your system will restart!
<speechMacros>
<command>
<listenFor>Restart JARVIS</listenFor>
<speak>Rebooting The System. See you shortly, Sir!</speak>
<run command=”C:WindowsSystem32shutdown.exe” params=”-r -t 00″/>
</command>
</speechMacros>
Here is a Macro for shutting down your system. Say “Goodbye JARVIS” and your system will shut down!
<speechMacros>
<command>
<listenFor>Goodbye JARVIS!</listenFor>
<speak>Getting offline, good bye Sir</speak>
<run command=”C:WindowsSystem32shutdown.exe” params=”-s -t 00″/>
</command>
</speechMacros>
If you want your system to tell you the time, use this macro:
<?xml version=”1.0″ encoding=”UTF-16″?>
<speechMacros>
<command>
<listenFor>What’s the time, Jarvis?</listenFor>
dim currentTime
currentTime = FormatDateTime(Time(), 1)
Application.Speak Time
Application.SetTextFeedback Time
]]>
</command>
</speechMacros>
Likewise, if you want your system to tell you the date, use the below macro:
?xml version=”1.0″ encoding=”UTF-16″?>
<speechMacros>
<command>
<listenFor>What’s the date, Jarvis?</listenFor>
dim todaysDate
todaysDate = Date
Application.Speak Date
Application.SetTextFeedback Date
]]>
</command>
</speechMacros>
Suppose you have just opened a file or a folder and you want to delete it, simply use the below macro:
<?xml version=”1.0″ encoding=”UTF-16″?>
<speechMacros>
<command>
<listenFor>Delete it!</listenFor>
<sendKeys>{DELETE}</sendKeys>
<speak> File has been Deleted, Sir </speak>
</command>
</speechMacros>
The last one! Want to empty your recycle bin? The below macro is to the rescue:
<?xml version=”1.0″ encoding=”UTF-16″?>
<speechMacros>
<command>
<listenFor>Empty the Recycle Bin</listenFor>
<run command=”C:nirnircmd.exe” params=”emptybin” />
<speak> Done, Sir </speak>
</command>
</speechMacros>
Did I horrify you with too many codes! Note that NONE OF THE CODES GIVEN HERE ARE MANDATORY and you can always skip or modify any piece of code! After all, your system, your rules!