I switched to linux since last 11 months,I am on ubuntu 15.04, I have learned to use cron for various tasks.

I use Cron to announce time via festival tts(using mbrolla voice) hourly.

This is the command that I use in cron (it is saved as .sh script and its path pointed in Cron)

echo "Its" `date "+%l O clock now"` | festival --tts

The problem is it doesn't work when music or video is playing , however after music is stopped or paused it announces the time.

I googled for it and found that in order to have multiple access to sound card one must use aoss (alsa-oss) I installed the required alsa-oss package and I modified the command as per the search results like this

echo "Its" `date "+%l O clock now"` | aoss festival --tts

but still it doesn't work and if I run the command with aoss it gives some error as below:

ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libaoss.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.

I don't know if this error is related to it somehow.

Someone in Reddit mentioned to use Alsa or Pulse-audio with festival and pointed me to arch forums which states that to use Alsa or Pulse-Audio we must edit the ~/.festivalrc file, or /usr/share/festival/festival.scm and add some lines to it.

I added the lines mentioned in the link, but still it didn't solve my problem

Hence i need help from you guys. Please help me correct this so that the time is announced by Cron even when music or video is playing.

thank you