crontab with espeak doesn't work when sound card is busy with google hangouts

Try something like this:

* * * * * export DISPLAY=:0 ; espeak "hello" > /path/to/my/error.log 2>&1

espeak seems to need the X server.


espeak is probably trying to access the sound card directly, instead of using the system-wide audio server (pulseaudio). Pulseaudio can accept multiple streams from applications and combine them into a single output.

Use:

espeak -v en "Hello i am espeak" --stdout | aplay

See this answer: espeak returns error on ubuntu server

You can also try googling "espeak pulseaudio" for more information.