2

There may not be a solution to this, but here's the problem nonetheless :)

  1. I'm on Ubuntu 14.04, using latest Chrome as my browser
  2. My sound card is busy being used by Google Hangouts
  3. My crontab is set up like this:

    * * * * * espeak "hello" > /path/to/my/error.log 2>&1
    

Monitoring the error log, I see no errors. But I hear no sound either. When I quit the hangouts, I start hearing the espeak "hello" output from my speakers every minute.

So, can espeak or any other program get around the fact that the sound card is busy? Thanks for reading the problem :)

Kevin Bowen
  • 20,055
  • 57
  • 82
  • 84

2 Answers2

4

Try something like this:

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

espeak seems to need the X server.

2

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.

roadmr
  • 34,802