Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Speeched wont work with Cron daemon or su to root
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
GoofyHMG
Tux's lil' helper
Tux's lil' helper


Joined: 24 Dec 2004
Posts: 77

PostPosted: Mon Nov 26, 2007 1:15 pm    Post subject: Speeched wont work with Cron daemon or su to root Reply with quote

I can do this when I log in as my regular user and it works with mbrola voice

echo "I'm this annoying little blonde speaking from a Gentoo Box" | festival --tts


however when I try to put it on a cron job or even su to root and do the same i get the following wither in a terminal window or dead.letter.

sh: mbrola: command not found
Cannot open file /tmp/est_09158_00000.au as tokenstream
Wave load: can't open file "/tmp/est_09158_00000.au"
Cannot load wavefile: /tmp/est_09158_00000.au


does anyone have a clue?
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1471
Location: /uk/sheffield

PostPosted: Mon Nov 26, 2007 1:46 pm    Post subject: Re: Speeched wont work with Cron daemon or su to root Reply with quote

GoofyHMG wrote:
I can do this when I log in as my regular user and it works with mbrola voice

echo "I'm this annoying little blonde speaking from a Gentoo Box" | festival --tts


however when I try to put it on a cron job or even su to root and do the same i get the following wither in a terminal window or dead.letter.

sh: mbrola: command not found
Cannot open file /tmp/est_09158_00000.au as tokenstream
Wave load: can't open file "/tmp/est_09158_00000.au"
Cannot load wavefile: /tmp/est_09158_00000.au


does anyone have a clue?


The first line of the above is the bash shell telling you that it can't find the command 'mbrola' which is likely to be something that festival is calling.

As a user open a terminal and type...

Code:

$ which mbrola


This will tell you where the mbrola executable is located. Repeat this as root and your likely to get something similar to....
Code:

# which mbrola
which: no mbrola in (/sbin:/bin:/usr/sbin:/usr/bin)


You either need to add the directory that mbrola is located in to root's PATH (an appropriate entry in /root/.bashrc will do this) or place a symbolic link in /sbin or /bin or /usr/sbin or /usr/bin to the location of mbrola so that its in root's PATH environment.

slack
Back to top
View user's profile Send private message
GoofyHMG
Tux's lil' helper
Tux's lil' helper


Joined: 24 Dec 2004
Posts: 77

PostPosted: Mon Nov 26, 2007 10:51 pm    Post subject: somewhat fixed Reply with quote

Thanks for the help that fixed my cron jobs

I did the following ln -s /opt/bin/mbrola mbrola


Although this wasn't the original post when I do it from the terminal session I get this

echo "Hello" | festival --tts
ESD: error writing - Bad file descriptor


Any idea on that It kinda doesn't make sense why it would work with any other user and not root?
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1471
Location: /uk/sheffield

PostPosted: Tue Nov 27, 2007 8:11 am    Post subject: Re: somewhat fixed Reply with quote

GoofyHMG wrote:
Thanks for the help that fixed my cron jobs

I did the following ln -s /opt/bin/mbrola mbrola



I assume you were in one of the directories that is in root's path when you did this (i.e. /sbin:/bin:/usr/sbin:/usr/bin)?

GoofyHMG wrote:
Thanks for the help that fixed my cron jobs
Although this wasn't the original post when I do it from the terminal session I get this

echo "Hello" | festival --tts
ESD: error writing - Bad file descriptor


Any idea on that It kinda doesn't make sense why it would work with any other user and not root?


Not sure what the cause of this might be (I've never used festival myself). Sounds like it may not like the piping of "Hello" as there is no file description, does it throw the same message when you pass it a text file that contains "Hello"...

Code:

echo "Hello" > /tmp/text.txt && festival --tts /tmp/test.txt


slack
Back to top
View user's profile Send private message
GoofyHMG
Tux's lil' helper
Tux's lil' helper


Joined: 24 Dec 2004
Posts: 77

PostPosted: Tue Nov 27, 2007 11:48 am    Post subject: Reply with quote

yes i was in the /usr/bin directory when I created the soft link

I tried your recommendation with the text file but I get the same error.

localhost / # festival --tts /tmp/text.txt
ESD: error writing - Bad file descriptor
Back to top
View user's profile Send private message
slackline
Veteran
Veteran


Joined: 01 Apr 2005
Posts: 1471
Location: /uk/sheffield

PostPosted: Tue Nov 27, 2007 11:56 am    Post subject: Reply with quote

GoofyHMG wrote:
yes i was in the /usr/bin directory when I created the soft link

I tried your recommendation with the text file but I get the same error.

localhost / # festival --tts /tmp/text.txt
ESD: error writing - Bad file descriptor


I've no idea I'm afraid, as I said I've not used festival for anything. Perhaps the mailing list at festival project might be of use.

slack
Back to top
View user's profile Send private message
GoofyHMG
Tux's lil' helper
Tux's lil' helper


Joined: 24 Dec 2004
Posts: 77

PostPosted: Tue Nov 27, 2007 10:20 pm    Post subject: Reply with quote

hey dont worry you kinda got me what I wanted. I am going to continue searching for the answer and if I find it I will post it here. Thanks for the help!!!
Back to top
View user's profile Send private message
thewtex
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2007
Posts: 93

PostPosted: Sat Dec 08, 2007 12:37 am    Post subject: Reply with quote

for the ESD error, you need to configure festival to use alsa: see
http://gentoo-wiki.com/HOWTO_speechd
Back to top
View user's profile Send private message
GoofyHMG
Tux's lil' helper
Tux's lil' helper


Joined: 24 Dec 2004
Posts: 77

PostPosted: Sun Dec 09, 2007 3:27 am    Post subject: Reply with quote

thewtex thanks for the input on the ESD error that worked!!!

Is there a reason why I cant put that line in the server.scm file? I tried putting it in there but it did nothing. I though things in these files were interchangeable.

Anyway, I just put this
(Parameter.set 'Audio_Command "aplay -q -c 1 -t raw -f s16 -r $SR $FILE") (Parameter.set 'Audio_Method 'Audio_Command)

in the ~/.festivalrc file and it worked...
Back to top
View user's profile Send private message
thewtex
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2007
Posts: 93

PostPosted: Sun Dec 09, 2007 3:43 am    Post subject: Reply with quote

not server.scm but /etc/festival/siteinit.scm

also regarding your initial post, it was probably because you did not have the mbrola USE flag enabled on festival[/b]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum