A ShellScript for Mac-like Time Announcement
- Satisfy the requirements. ( See Requirements )
- Just download the script and put it anywhere you want.
- Edit variables. ( See Variables )
- Schedule a
cron
job for the script. - Now, forget about it and have a cup of coffee! Time will tell.
- Gnome 3, dbus
- On the other environments, modify
pid
variable - libnotify
- Festival, a speech synthesis system
- If you use Google Translate TTS API, this is not required.
- wget
- mpg123
- these two are required, if you use Google Translate TTS API.
- cron
There are a few variables you need to edit.
uname
- your username: ( e.g.,
Taro
) notify
yes
/no
- whether you want the notification OSD or not
engine
festival
/google
- which speech engine you use
- Google's one is unofficial. Use it at your own risk.
Open the script, and edit these values. You will find them at the top.
First, place the script into any folder you want to. In this instruction, it is /home/Taro/
.
Then, open it and edit like this:
uname=Taro # your username
notify=yes # do you want a notification OSD? ( yes / no )
engine=festival # which speech engine you use ( festival / google )
Finally, set up a scheduled job using crontab
. If you want announcement once every hour, it would be:
0 * * * * /home/Taro/announce.sh
Done! Enjoy!