On the mac there is a feature which allows you to get your computer to verbally announce the time on the hour, is there something similar on Ubuntu? That is is there a package which already does this or do I need to configure something like say to read out the time on the hour? And if so then how do I do that? I am running Ubuntu GNOME 15.04 with GNOME 3.16.
Asked
Active
Viewed 2,536 times
13
2 Answers
24
You could use your crontab
Create a little script
mkdir -p ~/bin nano ~/bin/say_hour
add the code below
#!/usr/bin/env bash
my_date=$(date +'%H:%M:%S')
padsp espeak "$my_date"
and set executable rights
chmod +x ~/bin/say_hour
Edit your crontab via
crontab -e
and add the configuration below
0 * * * * bin/say_hour
You can replace the espeak line with one of the possibilities below
sudo apt-get install espeak
espeak $(date +"%H:%M:%S")
espeak $(date +%T)
Adjust speed with -s, in words per minute, default is 160
espeak -s 10 $(date +"%H:%M:%S")
or
sudo apt-get install festival
date +"%H:%M:%S" | festival --tts
date +%T | festival --tts
or
sudo apt-get install speech-dispatcher
spd-say $(date +"%H:%M:%S")
spd-say $(date +%T)
Adjust speed with (-100 .. 0 .. 100)
spd-say -r -50 $(date +%T)
%I– hour (01..12) format%H– hour in (00..23) format%M– minute (00..59)%S– second (00..60)%P– period (AM/PM)%T–HH:MM:SSin 24 Format
More options via man date, man espeak, man festival and man spd-say
A.B.
- 92,125
5
This gives you the time in speech (thanks to kos for providing better syntax) :
First install say , which is found in gnustep-gui-runtime:
sudo apt-get install gnustep-gui-runtime
Then run it.
24-hour mode:
say "$(date +%R)"
12-hour mode
say "$(date +%I:%M%p)"
Promille
- 508