1

If I right-click on the clock in Kubuntu 14.04, then Digital Clock Settings, then General, there is a nice option there where you can choose the interval, and then the clock is supposed to speak the time aloud. I choose "Speak time:every 15 minutes".

enter image description here

Nice, eh? Well, I wonder why that is there, because it doesn't work.

I installed espeak and festival.

I installed jovie. There is a stupid little man with a rainbow now, next to the battery icon, and he can read the contents of the clipboard with a metallic voice.

enter image description here

But no talking clock.

Then I activate "Enable text-to-speech" in System Settings - Accessibility. Yeah, very nice, but next time I reboot, it is deactivated and I have to activate it again.

enter image description here

Mephisto
  • 328

1 Answers1

1

You can use crontab to get a talking clock. Edit your crontab with

crontab -e

These lines

# Minute   Hour   Day of Month       Month          Day of Week        Command
# (0-59)  (0-23)     (1-31)    (1-12 or Jan-Dec)  (0-6 or Sun-Sat)
   *       *          *               *                 *             /bin/date '+It is \%-H and \%M'|/usr/bin/espeak >/dev/null 2>/dev/null

will tell the time every minute. (Use it for testing.)

If you want the time to be told every 15 minutes, you can replace the last line above with the following line,

   */15    *          *               *                 *             /bin/date '+It is \%-H and \%M'|/usr/bin/espeak >/dev/null 2>/dev/null

If you want another language than English, you can use the espeak option -v (and specify your language).


Please notice that

date '+It is %-H and %M'|espeak >/dev/null 2>/dev/null

(without backslashes and without full paths) works as a direct command (when not in crontab)

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • Thanks, but the voice says "backslash, seven" ... So I cannot for the moment accept the answer as correct. – Mephisto Dec 22 '17 at 04:59
  • @Mephisto, It seems that your system works differently from mine, and works without backslashes before the % characters. I will remove them from the answer. – sudodus Dec 22 '17 at 06:27
  • Wait, I am having issues and maybe my system is screwed up. – Mephisto Dec 22 '17 at 06:36
  • Yes, the backlashes are a problem. I have accepted your answer without any backslashes. That's what's working for me. – Mephisto Dec 22 '17 at 06:38
  • Sorry, the espeak command works, but not the cron job. I have to figure our what I am doing wrong. – Mephisto Dec 22 '17 at 07:35
  • @Mephisto, The date command works for me without the backslash, but when I put it into crontab, it wants the backslash. I run 16.04 LTS with the xenial kernel (based on 16.04.1 LTS). Please try with backslash before the % characters in the line in the crontab file, it might work for you too (even though you have 14.04 LTS and there are differences from my system). – sudodus Dec 23 '17 at 07:59
  • @Mephisto, You can also try with full explicit paths for 'date' and 'espeak' in crontab: /bin/date and /usr/bin/espeak; and please let me know if it works or does not work. – sudodus Dec 23 '17 at 08:03