Speaking Clock Script

 

 

Sometime workaholic people, don’t even realize what time it is, though there is a clock in corner of every OS. So on idea of Mr. Arpit, I made a twitter bot called @GhantaGhar which tweet time every 30 minutes(in IST).

Recently I see replies of @GhantaGhar‘s  account and found that many people want some software which can give them hint or buzz them at certain period.

 

 

 

So here is the simple solution for the same:

I’m assuming you should have knowledge about following :

  1. Editing file in shell
  2. Basic shell scripting knowledge.
  3. About cron job
  4. Installing package
  5. Working sound card

 

To start with first make sure you have “espeak” package install. It may be available via your package manager or you can download it from http://espeak.sourceforge.net/

 

After perfect install, test espeak by passing following command

$ echo "hello world" | espeak -v en+m4

 

After that, lets create a shell file containing command. Create time.sh (obviously you can change file name with your’s :P)

 

Add following lines

 

 

!#/bin/bash
 
echo "Hi user its" $(date +%I\ %M\ %p) | espeak -v en+f5

 

 

save the file and next step will be editing your cron job by following command

$ crontab -eu username

 

replace username with your username, then add following lines

 

*/30 * * * * /bin/bash /path/to/script/time.sh &> /dev/null

 

save the crontab file

 

And yes it will do inform you time every 30 minutes.

Just a hint, you can even add notification for every 30 minutes, just search for required commands 😉

 

In case you are windows user you can visit my firend’s website for

By | 2018-04-09T06:35:52+00:00 December 18th, 2012|Editorial, Script, Tutorials|Comments Off on Speaking Clock Script

About the Author: