Wednesday, April 1, 2009

Cause your computer to speak - from command-line.

NirCmd utility has a new 'speak' command that allows you to easily cause your computer to speak the text that you wish. In this command, NirCmd uses the Speech library (SAPI) that is installed with any instance of Windows XP and Windows Vista.
The speak command is not the most useful command in NirCmd, but it's a nice and funny addition for April Fools' Day.

Here's a few examples of what you can do with the new speak command:

nircmd.exe speak text "Please don't touch my computer !"

If you want to wait 60 seconds and then speak something, you can try this: (60 seconds = 60000 milliseconds)

nircmd.exe cmdwait 60000 speak text "Get out of my room !"

If you want to speak the text that is currently in the clipboard, use this:
nircmd.exe speak text ~$clipboard$

If you want that the computer will speak the entire content of a text file, use this:
nircmd.exe speak file "c:\temp\speak1.txt"

Be aware that Windows XP comes with a default "robotic" voice known as "Microsoft Sam", while Windows Vista provides much better woman voice, known as "Microsoft Anna".


OpenID zeroes1 said...

cool feature! :)

April 1, 2009 3:24 AM  
Blogger Brad said...

:: Speak the time of day
time /t | clip | nircmd speak text ~$clipboard$

note: clip.exe is not available in windows XP or 2K, but should work if you copy it from Vista or Server 2003.

April 3, 2009 1:54 PM  
Blogger Winhelponline said...

Fun Tip: Add "Speak" Option to the Context Menu for Text Files - The Winhelponline Blog:

April 8, 2009 11:00 AM  
OpenID sgtevmckay said...

On the speaking time....way too much trouble...especially in Windows 7

Try the following for time:
nircmd speak text "Time is"-~$currtime.h$" "~$$~$currtime.t$"M" -2 100

For the Date:
speak text ~$currdate.dddd$" "~$currdate.dd$" "~$currdate.MMMM$" "~$currdate.yyyy$ -2 100

This will keep the dialect simple and system dependent out side of attempting to utilize Clip.exe and the probable issue associated with Clip

January 13, 2010 8:41 AM  

Post a Comment

<< Home