On 2014-02-01 14:56, martin helm wrote:
>
> Nice idea Carlos.
Thanks 
> Something like that avoids the tempfile
>
> Code:
> --------------------
> cat /proc/net/wireless | grep wlp2s0 | awk ‘{print $3}’ | espeak -v en --stdin -a 20
> --------------------
>
> (wlp2s0 is my wireless, has to be replaced of course)
The tempfile I use because I had at some time problems with pulseaudio
and the volume used. I use something similar to “speak” the local time
every half hour, from a cron job. A talking clock, you see 
This I used time ago:
/bin/date +"%B %e, %k hours %-M minutes " | /usr/bin/festival --tts
or this for Spanish:
> LANG=es_ES.ISO-8859-1 LC_ALL=es_ES.ISO-8859-1 /bin/date +"Es %e de %B, y son las %k horas y %-M minutos " | /usr/bin/festival --tts --language spanish
but festival does not use pulse, and thus failed if something else was
holding audio. Festival produces better output than espeak, but can not
be directed (or not easily) to a file. So I used “espeak” instead:
.... espeak -v en --stdin -a 20
but it had the problem of using full volume, despite the “-a” (bug at
some time?)
.... espeak -v en --stdin -a 20 -w fichero.wav
but did not work from inside cron. It needed at least
“ALSA_CONFIG_PATH=/etc/alsa-pulse.conf”, and was unreliable.
Then I turned to generating a tempfile instead, and playing it separately:
paplay -v tmpfile
This had some other problem I don’t remember (it is not in my notes).
Thus my final version was:
gst123 --verbose tempfile
or rather the silent version for cronjobs.
Long story 
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)