Wednesday 16 December 2015

How to make your PC Talk Just Like JARVIS in Ironman

So Lets Get It Started, Tools You Need :
Windows 7 or 8 ( vista will not )
# Windows Speech Recognition Macros.
(Download Here )
# A Bluetooth/Wireless Headset With Mic
(optional)
# JARVIS Theme. (read below)
Step 1 : Train Your Windows Speech
Recognition Program :
Yeah I Know, A Basic Step, But The Most
Important part of "convert-to-Jarvis" mission,
what you gotta do is fire up the windows
speech recognition program, which comes pre-
installed with the Windows, way to access it is
via start bar.
Now choose the required Fields,and after it is
done, visit the "Train your computer to better
understand you" section, it is not necessary
for people with clear voice/accent, but I
strongly advise you to spend at least 5
Minutes on this so your computer can
understand you better.
Step 2 : Setting Up The Windows Speech
Recognition Macros : 5 Minutes :
Now if you Have set-up- the Windows Speech
Recognition Program, you would have been
trying out all sorts of cool commands, But
now to spice it up, We'll use the Windows
Speech Macros.I assume you would have
already downloaded it from the link above and
installed it.After Installing it i would advise
you to put its shortcuts in two places, One in
the desktop and other in the start-up folder,
so it would start the second your computer
boots up.So a little walk through to this
software, This is a super-cool, little software
that teaches your computer to talk to you
interactively.Here is how to set up the
commands :
Double Click The Macros Icon, and when the
window pops up asking "What should the
macro do?" click "Advanced." For those of you
familiar with creating websites, this should be
a welcome site. WSRM uses XML for
commands... which makes creating custom
commands relatively simple. For those of you
who aren't aware of XML, it's still easy.Here Is
A Little Sypnosis at what are you looking at :
<speechMacros> - This is the starting Tag, it
just tells the computer that this XML file uses
the Speech Macros to execute.
<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 I think you can
figure out why this is here.
Since I'm going to name my computer Jarvis,
I'm going to tell my computer to listen for it's
name by changing the <listenFor> tags to say
the following :   <listenFor>Jarvis</listenFor>
Here Is A Little Applet That will teach my
laptop to Reply Me :
________________________________________________________________________________
_
<speechMacros>
<command>
<listenFor>Wake Up Jarvis</listenFor>
<speak>Systems Online, Database Check, Good
Morning Sir !</speak>
</command>
</speechMacros>
________________________________________________________________________________
_
So Whenever I Say "Hey Jarvis" My Computer
will reply me with "System Online,Database
Check, Good Morning Sir ! ", You can change
it to whatever you like !
An Speech Macro For Getting The Weather :
________________________________________________________________________________
_
<?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>
<script language="JScript">
<![CDATA[
<var xml_doc = new ActiveXObject
("Microsoft.XMLDOM");
<xml_doc.async = false;
<xml_doc.load(" http://www.rssweather.com/
zipcode/{[zipCode]}/rss.php");
<var titles = xml_doc.getElementsByTagName
("title");
<var descriptions =
xml_doc.getElementsByTagName
("description");
<Application.Speak(titles.item(2).text + " in
{[*CityName]}");
<Application.Speak(descriptions.item
(2).text);]]>
</script>
</command>
<listenForList name="CityName"
propname="zipCode">
<item propval="65201">Columbia</item>
<item propval="37201">Nashville</item>
</listenForList>
</speechMacros>
________________________________________________________________________________
_
A Macro To Restart The Computer :
You will just have to say "Nuke It!" and the
computer will restart :
________________________________________________________________________________
_
<speechMacros>
<command>
<listenFor>Nuke it</listenFor>
<speak>Rebooting The System.</speak>
<run command="C:\Windows
\System32\shutdown.exe" params="-r -t 00"/
>
</command>
</speechMacros>
________________________________________________________________________________
_
Another One To Shut Down The Computer :
You will have to say "Goodbye Jarvis" And the
Pc Will Shut Down :
________________________________________________________________________________
_
<speechMacros>
<command>
<listenFor>GoodBye Jarvis !</listenFor>
<speak>Getting Offline,Bye Sir</speak>
<run command="C:\Windows
\System32\shutdown.exe" params="-s -t 00"/
>
</command>
</speechMacros>
________________________________________________________________________________
_
Download This Pretty Little App And Extract It
To C:\NIR\ and you will add more intelligence
to your PC :
Volume Up:
<speechMacros>
<command>
<listenFor>volume up</listenFor>
<run command="C:\nir\nircmd.exe"
params="changesysvolume +5000"/>
<speak>Volume Up</speak>
</command>
</speechMacros>
________________________________________________________________________________
_
Volume Down:
<speechMacros>
<command>
<listenFor>volume down</listenFor>
<run command="C:\nir\nircmd.exe"
params="changesysvolume -5000"/>
<speak>Volume Down</speak>
</command>
</speechMacros>
________________________________________________________________________________
_
Volume Medium :
<speechMacros>
<command>
<listenFor>volume medium</listenFor>
<run command="C:\nir\nircmd.exe"
params="setsysvolume 30000"/>
<speak>Volume at medium listening level</
speak>
</command>
</speechMacros>
________________________________________________________________________________
_
For More Interactivity, install Voice Search on
Google chrome or some similar app in Firefox !

No comments:

Post a Comment