PDA

View Full Version : talking clock for ubuntu?



asnd16
August 3rd, 2007, 05:12 PM
has anyone been able to find a talking clock for ubuntu? Like talking as in speaking on every hour. . ? :guitar:

Onyros
August 3rd, 2007, 05:36 PM
has anyone been able to find a talking clock for ubuntu? Like talking as in speaking on every hour. . ? :guitar:Hahaha, that would be... errm... actually, I'd be afraid of throwing my laptop against the wall.

I hate time. :P

tennisplaya05
August 3rd, 2007, 05:55 PM
well, here's what i could find:
http://www.jumpstation.co.uk/scripts/talkingclock/

It seems to utilize alsa and bash, so i'd assume it should work in ubuntu.
all you need now are the wav files of the numbers themselves. I guess you could download those from somewhere. Or if you have a nice microphone, you could do them yourself, or find someone with a sexy voice to record them for you :)

reclusivemonkey
August 3rd, 2007, 06:35 PM
well, here's what i could find:
http://www.jumpstation.co.uk/scripts/talkingclock/

It seems to utilize alsa and bash, so i'd assume it should work in ubuntu.
all you need now are the wav files of the numbers themselves. I guess you could download those from somewhere. Or if you have a nice microphone, you could do them yourself, or find someone with a sexy voice to record them for you :)

There's a much easier way. Just install festival, and use the script I've attached (save it as clock.sh, make it executable). Run it via cron at whatever frequency you require.

init1
August 4th, 2007, 04:17 AM
There is something in the repos called saytime


sudo apt-get install saytime
watch -n 360 saytime

bicchi
August 12th, 2007, 09:40 AM
I really like the idea of doing this from a cron job that runs on the hour.
I also noticed that if I am playing music in the background festival does not work.
A workaround is to use the aoss command before festival. You might need to install: alsa-oss


echo "Its" `date "+%l oclock"` | aoss festival --tts

ways
September 8th, 2008, 12:26 PM
my script for this, partly inspired by posts above



#!/bin/bash
#
# call out the hour. run in crontab

HOUR=`date "+%k"`
FIRST=8
LAST=18
#SPEAK="espeak"
SPEAK="aoss espeak" #for multiple access to soundcard

#shh! its night time
[ $HOUR -lt $FIRST ] || [ $HOUR -gt $LAST ] && exit 1

#english
echo "Its $HOUR oclock" | $SPEAK

Tomosaur
September 8th, 2008, 02:39 PM
Simple command will do it:


date +"%A, %B %e %Y, %l:%M %p" | espeak


I have it bound to an alias called 'speaktime' in my ~/.bashrc file:


alias speaktime='date +"%A, %B %e %Y, %l:%M %p" | espeak'

qwill
October 10th, 2008, 09:55 PM
flite_time does the job too...

snova
October 10th, 2008, 10:40 PM
There was an entry to the IOCCC that did this. :)

rbolio
October 20th, 2008, 06:15 PM
I found this code somewhere in the net.... need2 more minutes to find out if it worked or if i need to keep terminal open...but here it is



(crontab -l;echo "0,15,30,45 * * * * (echo it is now;date +%I:%M%p )|espeak --stdout|sox -q -V0 -t wav - -t alsa pulse")|crontab -

rbolio
October 20th, 2008, 06:16 PM
There is something in the repos called saytime


sudo apt-get install saytime
watch -n 360 saytime



with this, how often will the time be said? hourly?

rbolio
October 20th, 2008, 06:57 PM
wait! raincheck.... i wrote a simple tutorial from what i have found on the net.... just waiting for it to be aproved... (pwnd) its really simple...ill post link as soon as i can.

Rodney9
November 6th, 2008, 04:45 AM
wait! raincheck.... i wrote a simple tutorial from what i have found on the net.... just waiting for it to be aproved... (pwnd) its really simple...ill post link as soon as i can.


I'm searching for a talking clock that will announce the time every half hour even when other audio is playing.

Rodney9
November 6th, 2008, 04:53 AM
I really like the idea of doing this from a cron job that runs on the hour.
I also noticed that if I am playing music in the background festival does not work.
A workaround is to use the aoss command before festival. You might need to install: alsa-oss


echo "Its" `date "+%l oclock"` | aoss festival --tts


Cool, this does play with streaming audio, so now I have to work out how to get it to run each half hour, any ideas ?

Rodney9
November 6th, 2008, 05:36 AM
I have tried adding

echo "Its" `date "+%l oclock"` | aoss festival --tts

to Gnome-Schedule, but it will not allow the percentage symbol %

How else can I run it every half hour, or is there some workaround with the % symbol ?

DougieFresh4U
November 6th, 2008, 06:14 AM
with this, how often will the time be said? hourly?

My machine is doing it on the half hour and hour

Rodney9
November 6th, 2008, 10:34 AM
I have tried adding

echo "Its" `date "+%l oclock"` | aoss festival --tts

to Gnome-Schedule, but it will not allow the percentage symbol %

How else can I run it every half hour, or is there some workaround with the % symbol ?


My machine is doing it on the half hour and hour

What did you use, can you hear it over music ?


echo "Its" `date "+%l oclock"` | aoss festival --tts

does work well, if only in Gnome-Schedule